Indeed loadlabel only works when the label is known. The reason for this is that when you use loadlabel(), the compiler first checks if the label is in the eeprom data area. If not, it assumes that it is inside the code area.
But when the label is not used yet, the label can not be found and the value will point to some data in code.
The solution is simple :
Put the eeprom data before the loadlabel. Since data in area does not hurt you code in any way, it does not matter either that you place it at the begin of your code.
you could also include it using $include.
↧