eeprom memory map?
Domanik
Posts: 233
Is there a memory map of the upper half of the ActivityBot eeprom memory. I understand there's free space beginning at 32768 up to perhaps 63398. Currently two cal routines store data in 63400 upwards and there may be others I don't know about. I'd like to avoid overwriting cal data and find a safe place in the upper end to put my cal data.
Thanks,
Dom..
Thanks,
Dom..
Comments
Dom..
http://obex.parallax.com/object/221
#define
_ActivityBot_EE_Start_ 63418
ActivityBot EEPROM calibration data start address.
#define
_ActivityBot_EE_Pins_ 12
#define
_ActivityBot_EE_Trims_ 28
#define
_ActivityBot_EE_Left_ 52
#define
_ActivityBot_EE_Right_ 1052
#define
_ActivityBot_EE_End_ 63418 + 2052
ActivityBot EEPROM calibration data end address.
AND in abvolts.c
#define
_abvolts_EE_start_ 63400
abvolts EEPROM calibration data start address.
#define
_abvolts_EE_end_ 63400 + 16
abvolts EEPROM calibration data end address.
After these routines run what happens to the cal data? Does it move to the lower half of the eeprom or stay in high memory? What's to prevent a future SW driver from overwriting another routine's info?
Dom..
Generally EEPROM data is saved from the highest memory address downward but you might want to start at 32K (32768 or $8000) and move upward since you noticed EEPROM values are stored near the top. As Jon mentioned only the lower 32KB are affected by programming the Propeller chip so anything in the upper 32KB is safe unless a program writes over it.
I agree, this would be a good document to have.
I personally use sections of the upper EEPORM for my own purposes. One thing I usually add to the upper EEPROM is an ID # for the particular Propeller board. This way I can use the same program on multiple Props which behave a bit different depending on their assigned ID. This is useful in Prop to Prop communication projects.
I keep a header file were these locations are assigned. It would be nice if these locations were easily identifiable with the ActivityBot code examples.
You can find these location by digging through the source code (as it looks like you've already done) but I agree, it would be nice if this information were easier to find.
Having fixed locations specified for "all users" is impractical as applications vary so much, as do users and uses. I have a unit that records log files in on section of EEPROM, holds a access ID database in another etc. For my networking systems I use the very top of 64K for holding IP config data etc including a soft MAC address, I even use the upper 32K for print strings that would otherwise consume valuable RAM. So for networking systems I could say "use these addresses and we will all be happy" but even then I doubt that this would be the case.
Your concern about a future SW driver overwriting is perhaps unwarranted though as you are the programmer, you should know what you are doing and where everything goes. If you say "use this address" then it is just going to do that.
I think Domanik is hoping for the locations used by the ActivityBot tutorials.
I haven't spent a lot of time with the AB tutorials but I also wondered where the calibration data was being stored. IIRC, these locations weren't easy to find. I agree it would be nice to have a way to easily find which locations are being used.
While I agree having fixed locations for "all users" isn't practical, I don't think it's unreasonable to hope one AB tutorial wont overwrite calibration data saved in from an earlier tutorial.
Duane: I like your approach and your idea about a unique identifier for each robot. Also I'd like to thank you for ALL the posts you've done over the years on this forum. I've learned a lot from your posts and it's greatly appreciated.
Thanks to you too Jack-- you have a wealth of knowledge and a no nonsense approach to things, I read your posts carefully looking for nuggets in each (found several).
Dom..
Up to now, avoiding overwriting library calibration data has been a matter of checking the Macros section in the documentation pages of each library the application uses. Reason being, if it uses EEPROM, it'll have #defines there. Moving forward, it seems like it would be better to have a single page that inventories all libraries with EEPROM calibration data. How's this look?
https://propsideworkspace.googlecode.com/hg/Learn/Library%20Cog%20and%20EEPROM%20Usage.html
I think that looks great!
I think I'll find this information very helpful in my C projects.
Thank you!