You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • That's a shame - very surprising about the lack of memory mapping. I wonder whether there's anything that can be done to trap memory access areas and effectively page in code as it's needed?

    I think without any built-in functions you could get the interpreter into 96k (especially if you could drop floating point support). You could then make the interpreter load built-in functions from flash into RAM and execute them on demand (but that'd probably require all the functions to be compiled with position-independent code).

    Thing is, that's going to be a hell of a lot of work I'm afraid, and even after that you won't have much RAM for code :(

  • That's a shame - very surprising about the lack of memory mapping.

    Yes, they simply expect everything to fit into SRAM including code. There is boot ROM which loads code from OTP ROM or SPI or UART into SRAM. I guess it is done for power saving (not sure how much flash in NRF5x draws?) and this solution may make perfect sense for lot of typical BLE use cases.

    They also have newer family DA1468x and they enlarged SRAM to 128KB and added XIP from SPI FLASH via additional 16KB cache (similar way how e.g. ESP8266/32 works). But still they have this mode optional and you can also select same mirror mode where you have 128+16=144KB SRAM loaded at boot time or resume from deep sleep.

    Thing is, that's going to be a hell of a lot of work I'm afraid, and even after that you won't have much RAM for code :(

    Yes, I guess so. This older DA1458x family is perhaps not a good fit for Espruino.

    Too bad I did not notice HX06 is Dialog and already ordered more than one. All other Lenovo devices supported in same android app has vendor marked as Nordic but only this one has Dialog there in the config. As it supported same communication protocol and otherwise looked the same I did not notice. Also the FCCID photos did not have cpu markings readable but had SWD pins marked so I guessed wrongly ARM Cortex implies Nordic.

    Anyway I'll try some minimal build just with serial console running and see. However most probably it will be better to port something lighter to this or directly write in C.

About

Avatar for Gordon @Gordon started