Forum

NavSpark PROGMEM support

Hi,I've written a program for NavSpark that requires a database stored as a very large double array (about 10000 elements). As the array is copied into RAM as soon as the program is started, the program hangs due to having insufficient RAM available.As the database is just a constant, there is no need to copy it to RAM, it would suffice to read it's contents from Flash. Normally, the PROGMEM function from pgmspace.h is used for storing data only in Flash; I however cannot get this to work with NavSpark. Is this function not implemented, is there a NavSpark-specific way to use it or is there a workaround to store my array only in Flash?

You need to be a member of NavSpark Community to add comments!

Join NavSpark Community

Email me when people reply –

Replies

  • pgmspace.h is specific to AVR, it's not supported by NavSpark.

    You can simply declare a global constant double type like below, and it'll be stored in the code area; replace {0} with your list of double constants.

    const double tmp[10000] = {0};

This reply was deleted.