• That branch I posted earlier should help with the bigger MTU - unfortunately you have to request it when initialising the softdevice, and the SD then needs extra RAM. Realistically that means it's not something you can do at runtime because all variables would need to be relocated.

    Even so, I think it would be worth losing a bit of RAM permanently for - maybe not to max out the MTU, but at least to go for something significantly higher than 20.

  • and the SD then needs extra RAM. Realistically that means it's not something you can do at runtime because all variables would need to be relocated.

    as for C globals that are determined at link time those cannot be moved at runtime easily but can javascript variables be in two areas? Because it sounds interesting to restart softdevice with different parameters at runtime - like more concurrent client or server connections or MTU change.

    EDIT:
    Or maybe C globals could be above or right below the stack? so JS variables would be right above softdevice and could grow shrink from top to the bottom according to soft device requirements? Basically this https://github.com/espruino/Espruino/blo­b/master/targetlibs/nrf5x_12/nrf5x_linke­rs/linker_nrf52_ble_espruino.ld#L9 would start below reserved stack so all data/bss would fit and space for JS variables would be below and not part of this.

About

Avatar for fanoush @fanoush started