BigClown development on Windows
- How to download SDK
- How to install compiler
- How to install buildsystem
- How to compile SDK
- How to upload firmware over USB
- How to debug core module
- How to generate API documentation
- How to install virtual COM port driver
- How to install Mosquitto MQTT broker
- How to start the gateway
Our software stack and SDK can be easily run also on Windows. With few simple steps you can develop and test firmware, MQTT messages and more on Windows. This tutorial was tested on Windows 7 Professional x64.
How to download SDK
All our code is located on public GitHub account. You have to use GIT to clone the repository.
Download command line GIT utility or you can use graphical GitHub Desktop with easy graphical interface.
Git also installs unix utilities like
ls so our Makefile will perfectly work as long as you call
make from the Git Bash.
If you would like to compile SDK outside the Git Bash, in the Windows shell, then select the last radio button in the installer with "Use Git and optional Unix tools from the Windows Command Prompt".
https://github.com/bigclownlabs/bc-core-module to your machine.
git clone https://github.com/bigclownlabs/bc-core-module.git
How to install compiler
It's not necessary to be able compile firmwares for microcontroller. You can use our pre-compiled binaries if the fits your needs. In that case you would just need the DFU firmware flashing utility and drivers which is explained further.
Otherwise download latest GNU ARM Embedded Toolchain for Windows. We would suggest the installer because it is easiest solution. Install the GCC compiler and in the last wizard screen after the instalation select that you would like to add the tools to the PATH environment variable.
If you use more toolchains, change TOOLCHAIN variable to your absolute path in the Makefile. You have to use
/ symbol instead of
TOOLCHAIN = "C:/Program Files (x86)/GNU Tools ARM Embedded/5.4 2016q3/bin/arm-none-eabi-"
How to install buildsystem
You will need
make tool to compile our SDK. There is not simple installer yet so you have to download and copy it manually.
You have to download compiled make utility from this page and then copy it to to some directory which is already in the PATH variable. So you can call
make from any folder. You can copy it to your newly created GCC ARM Toolchain folder (
C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin\).
How to compile SDK
Now you can compile the SDK by typing
make in a project directory.
The downloaded GitHub firmware has empty user function. Please see the tutorials and add you application logic in
Congratulation for your first compiled firmware.
How to upload firmware over USB
This Device Firmware Update utility (
dfu-util) will allow you to upload compiled binary firmware just with USB.
Please follow this help how to setup USB driver and use DFU Util on Windows.
If you have the dfu-util in your PATH variable or you copy it to the GCC bin directory, you can then set the device to the boot mode and flash the firmware.
Set the device to DFU mode and flash it by typing
How to debug core module
To debug the running code on Core Module you can use Ozone debugger with J-Link debug probe. It is also possible to use GDB/OpenOCD with other debug probes but this is not documented yet.
Download the Ozone debugger here. Ozone folder also needs to be set in PATH environment variable or you can simply edit Makefile and set absolute path to the Ozone.exe file.
You start debugging by typing
How to generate API documentation
Our SDK is using Doxygen to automaticaly generate API documentation from C header files. This tool is not necessary to install. The generated API documentation is also on http://sdk.bigclown.com. Download the latest Doxygen here.
You generate the docs by
How to install virtual COM port driver
How to install Mosquitto MQTT broker
Mosquitto MQTT Broker is a MQTT server which is a central message hub in our system. Please download, install and run this broker. This broker needs to be running in the background all the time you use our Python Gateway.
To run the MQTT broker go to install directory and type
-v is for verbose, so you can see the messages.
How to start the gateway
Download and install Python 3 which is needed to run the Gateway. Gateway is a small python program which connects virtual USB serial port of Core Module and MQTT broker.
Connected core module appears as a USB serial device in your computer. The python gateway script interconnects the core module with MQTT broker. This section explains how to set up these pieces.
git clone https://github.com/bigclownlabs/bc-workroom-hub.git
Current bc-workroom-gateway.py needs that you comment out two lines of code where we use fcntl. Will be fixed in next revision
Then run the script with the correct COM port set.
python gateway/bc-workroom-gateway.py -d COM2
You have sucessfully installed SDK with gateway. Now you can explore and make new interesting projects.