I just added defines to ignore these lines if bluetooth is disabled.
diff --git a/src/jswrap_process.c b/src/jswrap_process.c
index b25720f..288fb93 100644
--- a/src/jswrap_process.c
+++ b/src/jswrap_process.c
@@ -156,9 +156,11 @@ JsVar *jswrap_process_env() {
// Pointer to a list of predefined exports - eventually we'll get rid of the array above
jsvObjectSetChildAndUnLock(obj, "EXPTR", jsvNewFromInteger((JsVarInt)(size_t)exportPtrs));
[#ifdef](https://forum.espruino.com/search/?q=%23ifdef) NRF5X
+ [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) BUETOOTH
extern uint32_t app_ram_base;
if (app_ram_base)
jsvObjectSetChildAndUnLock(obj, "APP_RAM_BASE", jsvNewFromInteger((JsVarInt)app_ram_base));
+ [#endif](https://forum.espruino.com/search/?q=%23endif)
[#endif](https://forum.espruino.com/search/?q=%23endif)
[#endif](https://forum.espruino.com/search/?q=%23endif)
return obj;
It compiles and runs on the NRF52840DK and is the desired result i was looking for.
I think removing Softdevice entirely would save a lot more memory but it is not needed for my application.
Thanks alot!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for the detailed explanation!
The hex file you provided indeed does not run on the NRF52840DK. But i tried your fixes in
jshardware.c
and they worked. Even tho i got a linker error here (undefined reference to app_ram_base):https://github.com/espruino/Espruino/blob/edc64ce1ab231c608110797546ffa9d445745425/src/jswrap_process.c#L159
I just added defines to ignore these lines if bluetooth is disabled.
It compiles and runs on the NRF52840DK and is the desired result i was looking for.
I think removing Softdevice entirely would save a lot more memory but it is not needed for my application.
Thanks alot!