I'm using an Arduino Due where double have a size of 8 bytes. In my software, I use double table const stored in prog memory, I was using an UNO before and used pgm_read_float_near() to retreive these values. What function should I use ?
Arduino Due (ARM Cortex-M3) doesn't need anything like PROGMEM
as it has access into the flash memory in the same way as into the RAM
. The const
qualifier is enough to keep it in program memory only.
The AVR
based boards like UNO
needs PROGMEM because there are different instructions for fetching data from program memory and g++
is not very advanced in this way (some other compilers supports it directly - but usually expensive ones)
-
-
Yes, Jmaes, instruntions. They're what you hit microcontrollers with to make them work. – Majenko♦ May 17 '17 at 21:23