crownstone / bluenet

Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
https://crownstone.rocks
91 stars 62 forks source link

Update script files #72

Closed mrquincle closed 5 years ago

mrquincle commented 5 years ago

A lot of the dependencies are now part of an overarching cmake project. This means tools (like the cross-compiler, the JLink utility, etc.) are automatically downloaded using the two following commands:

mkdir build && cd build
cmake .. & make

What still has to be done is to create additional cmake targets, that upload to the remote board, debug remotely, etc.

In the source/CMakeLists.txt currently, there is a target added which is called upload. This calls nrfjprog under the hood.

To call this if you created a default target (replace default with your own config):

cd build/default
make upload

You can also specify another config, for example boardA.

cd config 
cp -r default boardA

To build this:

cd build
cmake .. -Dboard_target=boardA
make
cd boardA
make upload

You can use multiple processors, by e.g. make -j4.

What needs to be done is two things:

mrquincle commented 5 years ago

Almost all (phony) targets have been implemented. It can be optimized a bit, but 90% is done. Depending on the ease of use some more targets might be introduced. For example, we now combine the bootloader-settings with the bootloader. However, when changing the application, the bootloader-settings have to be updated as well. Hence, what to combine with what will be dictated by @vliedel

Latest commit concerning this process: https://github.com/crownstone/bluenet/tree/56a356c0c420d2ad9830d5f64dc7f868724fdb51

Created an up to date INSTALL guide: https://github.com/crownstone/bluenet/blob/master/docs/INSTALL.md

Created an extensive document on the build system: https://github.com/crownstone/bluenet/blob/master/docs/BUILD_SYSTEM.md