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

Feature request: allow microapp to use ram dynamically #107

Closed mrquincle closed 2 years ago

mrquincle commented 3 years ago

Currently a microapp is linked with something like the following:

MEMORY
{
  FLASH (rx) : ORIGIN = APPLICATION_START_ADDRESS, LENGTH = APPLICATION_LENGTH
  RAM (rwx) :  ORIGIN = RAM_R1_BASE, LENGTH = (RAM_APPLICATION_AMOUNT)
  RAM_BLUENET_IPC (rwx): ORIGIN = (RAM_END - RAM_BLUENET_IPC_LENGTH), LENGTH = RAM_BLUENET_IPC_LENGTH
  CORE_BL_RAM (rw) :     ORIGIN = 0x2000fd00, LENGTH = 0x300
  UICR_BOOTADDR (r) :    ORIGIN = 0x10001014, LENGTH = 0x04
  UICR_MBRPARAMADDR (r): ORIGIN = 0x10001018, LENGTH = 0x04
}

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.

mrquincle commented 2 years ago

This issue has been moved to https://github.com/mrquincle/bluenet/issues/1