Tutorial for programming the BGM111

Hi,

First a disclaimer: I have seen a number of posts but I could not find one asking this question clearly, please point to it if I am duplicating a known post, thank you!

I am looking for a command line tutorial for programming the BGM111 on the Balena Fin v1.1 board that I have.

I have found from this forum the following examples, which I’ll explain my dissatisfaction with immediately:

  1. https://github.com/balena-io-playground/balena-fin-coprocessor-base.git
  2. https://github.com/balena-io/balena-fin-coprocessor-firmata.git

My problem is that they are:

  1. Huge (600MB / 250MB respectively)
  2. Seem overly complex.

I am looking for answers to the following:

  1. How can I write a hello world UART using example with c?
    2 How can I use the output (which format?) to program (this seems to be answered as openocd, using a fork pointed to via a third repository’s docker file, https://github.com/balena-io-playground/balena-fin-firmata-flash.git)

I’d appreciate any help with this, and of course ending with it in the official documentation would be great,
Alon

Hi @alon,

We’re actively working on improving the documentation of the development process for BGM111 and are aware getting started with the coprocessor is not as easy as it should be, yet.

There are two main methods to go about writing your own software for the coprocessor:

  1. Using the open project (based on cmake) that you referred to - https://github.com/balena-io-playground/balena-fin-coprocessor-base.git, navigating into the source/main.cpp file and modifying it to suit your requirements. Currently this project contains the source, SDK, binaries, libraries, etc. for a number of devices from Silicon Labs which is why it is fairly large and complex (and noted, we’ll shrink this down as many of those devices are not required for the coprocessor). The Firmata project is an example of where we have used this tool/libraries for our own implementation of the Firmata protocol.

  2. Downloading Simplicity Studio from Silicon Labs and using their development environment. This is currently the most straightforward method of development as it’s built upon an existing vendor tool and has the support of the Silicon Labs + their SDKs to get you started. However this does restricts you to their tooling/build process (which is the intention of our GitHub projects, to provide an alternative to Silicon Lab’s propriety tooling).

Our intention is to clean up the getting started process, along with adding some template examples for ‘hello world’ as well as various peripherals to help you when working with the Fin to our open project.

With regards to flashing the device, the method we are currently advising is via the raspberry pi compute module using the Firmata Flash project. This takes your compiled .bin and writes it to the coprocessor using OpenOCD running on the raspberry pi compute module via the internal SWD interface. I’ve started to extract this from the Firmata Flash repo into a more focused example but this still under development.

Thanks for your patience on this; we’re aware that these issues need addressing and are working on improving the documentation surrounding them!

Thanks!

1 Like

This really bore some fruit for me, to get a better understanding of what’s going on under the hood:
https://media.digikey.com/pdf/Data%20Sheets/Samsung%20PDFs/Artik_020_DS.pdf

1 Like

We’re also having issues on the same subject. I’ll leave the link to our thread below: