Remove PROGMEM temporarily - make registers actually work on AVR

This needs some investigation if it is really possible to push the Registers into PROGMEM. I think it should be possible, but the compiler is currently not collaborating.
It is not critical though as we have lots of free RAM at the moment (I can't believe I wrote this on an AVR project :) )
pull/196/head
D.R.racer 2022-08-11 08:45:12 +02:00 committed by DRracer
parent 89fc176955
commit 74160c6c81
1 changed files with 14 additions and 1 deletions

View File

@ -88,7 +88,20 @@ struct RegisterRec {
// compiles to:
// sts <modules::globals::globals+0x4>, r24
// ret
static const RegisterRec registers[] PROGMEM = {
//
// @@TODO at the moment we are having problems compiling this array statically into PROGMEM.
// In this project that's really not an issue since we have half of the RAM empty:
// Data: 1531 bytes (59.8% Full)
// But it would be nice to fix that in the future - might be hard to push the compiler to such a construct
static const RegisterRec registers[] /*PROGMEM*/ = {
// 0x00
// RegisterRec([]()->uint16_t { return PROJECT_VERSION_MAJOR; }, 1),
// // 0x01
// RegisterRec([]()->uint16_t { return PROJECT_VERSION_MINOR; }, 1),
// // 0x02
// RegisterRec([]()->uint16_t { return PROJECT_VERSION_REV; }, 2),
// // 0x03
// RegisterRec([]()->uint16_t { return PROJECT_BUILD_NUMBER; }, 2),
// 0x00
RegisterRec(false, &project_major),
// 0x01