This page explains how to develop under Windows with the BG Tool showing where to download, install and use it. To program the BGM111 it is necessary not only the SiliconLab Sensor Node itself but also the board named SLWSTK6201A.
The software can be downloaded from the SiliconLabs website the version used in this guide is v0.9.2-446. In the silabs webpage under the download now you can find documents about BGScript, BGAPI, and example applications. Once it downloaded install following default options.
The board EZR32 Leopard Gecko Starter Kit is needed to program the firmware in the SiliconLab Sensor Node. It is used as a J-Link. Without this hardware it is not possible to flash the BGM111. It is necessary also to make connections from the connector of the board with the device. To make this connection please follow this scheme:
As in figure:
PT | Line |
---|---|
18 | VCC |
19 | GND |
11 | RESET |
7 | SWDIO |
8 | SWCLK |
Connect these lines to the SLWSTK6201A board, red connector:
Sensor Node | SLWSTK6201A | Line |
---|---|---|
TP18 | A Pin 1 | VCC |
TP19 | A Pin 2 | GND |
TP11 | A Pin 18 | RESET |
TP7 | A Pin 13 | SWDIO |
TP8 | A Pin 14 | SWCLK |
Before to continue, connect the SiliconLab Sensor Node to the SLWSTK6201A and connect the PC via USB to the SLWSTK6201A. Windows will install a virtual COM when recognizes the board.
The project is developed with the BGScript. This language is compiled by BGTool and interpreted by BGM111. To know details about this programming language we suggest to read the specific document Bluetooth Smart BGScript Developer Guide and read about the API functions with the document BGM API Reference Guide. Summarizing the BGScript is a simple event-driven BASIC-like application scripting language. It abstracts away the complexity of Bluetooth development, embedded programming and hardware interfaces. This kind of design enables fast, simple firmware development into BGM111 module. Obviously, it is not needed external MCU.
The BGScript project include several files:
Now, to compile the project first up, download from architechboards website the source code of the project. Extract it and launch BGTool. Choose BGM111 module and select the COM connected to the SLWSTK6201A board.
After that, go to the menu clicking on View->Upload Tool.
Will appear a new window where to open the project file.
Before to build the project select where to put the binary file, this file will be uploaded into the BGM111. The last step is flash the firmware, to do this verify that all the connections are steady and click on Upload button. In few seconds the board will be programmed.