How can I determine where data is located in EEPROM
Bean
Posts: 8,129
I have a program that has a large data section.
How can I determine where that data section is located on the boot EEPROM ?
In other words, I want to modify this data at runtime and store it back onto the EEPROM so that when the propeller boots next time, the new data is loaded.
I tried just using the HUB address of the table as the EEPROM location, but that doesn't seem to be quite right. It looks like there is some kind of offset from the HUB memory address.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
How can I determine where that data section is located on the boot EEPROM ?
In other words, I want to modify this data at runtime and store it back onto the EEPROM so that when the propeller boots next time, the new data is loaded.
I tried just using the HUB address of the table as the EEPROM location, but that doesn't seem to be quite right. It looks like there is some kind of offset from the HUB memory address.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
Comments
DAT
Reserved_9_Bytes Byte "RESERVED9"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
·
PRI StringAddress(Efficient, StringNum)
·
· if Efficient
····return @@strings[noparse][[/noparse]StringNum]··· 'Get the absolute address of string1, string2, or string3
· else
····return lookupz(StringNum : @string1, @string2, @string3)··· 'Do the same thing less efficiently
·
·
DAT
·
strings·· word·· @string1, @string2, @string3
·
string1·· byte·· "Ay",0
string2·· byte·· "Bee",0
string3·· byte·· "Sea",0
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Now I'm confused. Does this mean the "strings" line above stores three offsets relative to the current object's base address? How can I then store three absolute addresses? With @@string1?
-- Remy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Is that why data addressed by RDLONG/WRLONG and friends is always defined in the VAR section, even if it is only used by assembly code? Because in that case, the @ operator returns an absolute address? But that would mean that the address of VAR sections is known at compile-time?
Anyway, the current implementation in my assembler is buggy
-- Remy