You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just an idea, at the moment - I may get some statistics to support it (or not), soon.
The 0-seriese "megaavr" chips have a unified address space where flash is accessible the same as RAM, and so LPM instructions are no longer needed to access constant tables stored in flash. An LDx from flash isn't actually any faster than an LPM, but there are a lot of extra addressing modes available
(indexing using X, Y, and Z, rather than only Z, for example), so I'd expect some overall improvement in behavior once the compiler gets it's register allocation optimization fingers in there.
That means that the various tables (notably the digital_pin_to* tables) can be allocated without specifying PROGMEM, and we don't need "pgm_read_*" functions to access them.
This is just an idea, at the moment - I may get some statistics to support it (or not), soon.
The 0-seriese "megaavr" chips have a unified address space where flash is accessible the same as RAM, and so LPM instructions are no longer needed to access constant tables stored in flash. An LDx from flash isn't actually any faster than an LPM, but there are a lot of extra addressing modes available
(indexing using X, Y, and Z, rather than only Z, for example), so I'd expect some overall improvement in behavior once the compiler gets it's register allocation optimization fingers in there.
That means that the various tables (notably the digital_pin_to* tables) can be allocated without specifying PROGMEM, and we don't need "pgm_read_*" functions to access them.
See also https://www.avrfreaks.net/comment/2593311#comment-2593311
(Hmm. FlashStringHelper could go away too. I guess
Serial.print("string")
is already automatically using this feature. (confirmed, BTW!))(Probably the best way to do this is to redefine the existing stuff as null macros, rather than eliminating it.
#define F(x) (x)
, for example`)http://forum.arduino.cc/index.php?topic=581415.msg3957672#msg3957672
The text was updated successfully, but these errors were encountered: