How to use EEPROM with the AS6 Simulator

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have read issues about loading eeprom files into the simulator.

But, if I am using eeprom r/w commands in my code, should the simulator memory window work? Currently, the eeprom is all 0xff (as it would be on initialisation), but when I try to write to it (using routines pulled directly from AVR1315, the memory window does not update. Am I doing something wrong, or is it just something that cannot be done? I have checked other memory areas (e.g. mapped eeprom area) just in case!

I'm new to using simulators as I usually have hardware but this time I'm updating my atmega code to work with xmega devices and don't have hardware for another month!

device: atxmega256a3u

Thanks
Alex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just tried a few experiments and like you I find that the simulator EEPROM memory display does not appear to update when writes are made to the EEPROM though, rather curiously, the feature to preload .eep data appears to be working for this chip in build 1938. Maybe it's just Asm code where the EE data is not preloaded?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for taking a look at it for me. I am on build 1843, and the eep file is not being loaded in.

It looks as though I need to update my studio so at least I can have some default data in my eeprom to start with. I won't be able to update it, but at least it will get me started.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I won't be able to update it,

Oh you will - in a REAL piece of silicon.

Don't waste too much of your life chasing the bugs and shortcomings of simulators - they are never 100%.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW I just changed the project to mega16 then built/simulated and the EEPROM contents were seen to update in the simulator. So either the AVR-LibC library code for eeprom_update_dword() is wrong for x2563au or the simulation of Xmega EEPROM is wrong.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not overly fussed with the simulator, as I said I've never used it, preferring hardware and a scope! There's a lot of functionality improvements that I need to make though and it would be good to perhaps check some of it works... even if it's just checking that I am configuring IOs correctly.

I managed to update to SP1 very easily which is a miracle where I am. 4.5MB/s download speed and IT remote log in to take over my mouse!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
BTW I just changed the project to mega16 then built/simulated and the EEPROM contents were seen to update in the simulator. So either the AVR-LibC library code for eeprom_update_dword() is wrong for x2563au or the simulation of Xmega EEPROM is wrong.

The problem is with the simulator - writing EEPROM and flash form application does not work in xmega models.

This is actually documented in the simulator help, see AVR Simulator User Guide - Known issues in AVR Simulator - Device/family specific issues - XMEGA devices.

- roland