Closed mrquincle closed 2 years ago
The branch with host compilation has been merged. There's now also continuous integration of that part. The choice have been to bit by bit add the same Nordic files as present in the SDK, but then compiling on host. In the end we will be basically "emulating" the Nordic SDK on the host.
It is not so hard to restore the functionality to compile for host. For this we need to have the proper
source/CMakeLists.txt
file, for example, thisset_cmakefile.sh
Now, when compiling there are some small issues with respect to configuration, but it's easy to fix.
Dependencies
Then we'll run into issues like the following:
The file
test_InterleavedBuffer.cpp
obviously usescs_CircularBuffer.h
and it goes all the way tocs_BleCentralPackets.h
, but this is not a standalone file and requires the Nordic SDK for type definitions.Constrain dependencies
It would be great to constrain the dependencies on Nordic file in one location. This has been before the file https://github.com/crownstone/bluenet/blob/master/source/include/ble/cs_Nordic.h.
What this would mean is that we can have one location where we can provide host-specific functions.
Consequences
If we build this out, we will be able to run more and more on the host side. This will accelerate development a lot. A tool like this will be indispensable.
What can be better
Ideally we always want to run the host compilation, or else we'll have "code rot" like now. So no fancy symbolic links as in the script in this bug report. It must be something more solid.