Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
This hard codes the ram section to RAM_R1_BASE up to RAM_R1_BASE + RAM_APPLICATION_AMOUNT where these settings relate to the settings of the microapp itself (not general bluenet firmware).
What we would like is the ability to use other RAM pages for the microapp than known at link time. Note, that this is not yet addressing the FLASH part.
If this is too complicated, we can do something else.
Have the person writing the Arduino program indicating a slot where the program should be uploaded to. This is just a number, say 0 to 3 if we allow for four programs to be uploaded. (Note that we can support this even before we allow them to be enabled at the same time).
Translate this slot index into information for both FLASH and RAM, so that they are defined in tandem. For example a program at 0x69000 up to 0x69000 + 0x4000 is allowed to use RAM at 0x200FF00 - 0x800 up to 0x200FF00. The next program sits next in FLASH and in RAM accordingly, etc.
I think it's perfectly fine to only allow multiple apps on the nRF52840, but it's good to have an idea on how to do this.
We will have to provide our own upload tool anyway (either using bluetooth for Crownstones or using serial for dev. boards). That means that again running the linker when upload settings change, might even be an option.
Currently a microapp is linked with something like the following:
This hard codes the ram section to
RAM_R1_BASE
up toRAM_R1_BASE + RAM_APPLICATION_AMOUNT
where these settings relate to the settings of the microapp itself (not general bluenet firmware).What we would like is the ability to use other RAM pages for the microapp than known at link time. Note, that this is not yet addressing the FLASH part.
If this is too complicated, we can do something else.
0
to3
if we allow for four programs to be uploaded. (Note that we can support this even before we allow them to be enabled at the same time).0x69000
up to0x69000 + 0x4000
is allowed to use RAM at0x200FF00 - 0x800
up to0x200FF00
. The next program sits next in FLASH and in RAM accordingly, etc.