Can't see EEPROM string in simulator

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

I have defined a string in the ESEG:
...

.eseg
message: .db "what is the method?",13,10

...
I cannot see this string in the eeprom EEPROM memory section while debugging with the simulator.

I checked the map, lss files and they look normal.

I just write the program and build with no errors.

I am not seeing any eep files.

Attachment(s): 

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

Anything in .eseg leads to a separate .eep (Intel Hex) file being generated. You may need to load this separately into simulated memory.

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

as I said:

Quote:
I am not seeing any eep files.


I looked in the project directory and didn't find any .eep file. I zipped up the project directory and attached it.

Attachment(s): 

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

Found the option to generate the .eep file.

In AS6, project -> toolchain -> AVR assembler -> general
has a check box for .eep ( & others)

Now need to find out how to load it into the simulator

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

In the older AS4 you have "download memories" from the debug menu, may be the same with AS6.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Not on the debug menu of AS6.1 SP2 (build 6.1.2730)
nor AS6.1 SP1 (build 6.1.2674)

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

I'm in the middle of TRYING to upgrade AS6.1 to SP2 but the Atmel site is not co-operating! :evil:

2nd go at trying to donwload SP2, I'll have a look once and IF AS6 all works again, usually things are likely to break with updates.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Sorry my friend but I can't help you. :(

After wasting more than 1 hour upgrading and messing around the first thing that happened after I built your code and tried to look into the Memory view > EEPPROM is that Studio CRASHED and restarted by itself.

The Memory view is still a mess, trying to change the view from one type of memory to another results in a new screen being opened in the middle of the screen and the one you clicked to become blank.

No idea on how to actually download and view the EEPROM contents into the memory view, I thought it happened automatically with AS6.

If you want my opinion simply unistall AS6 and go back to AS4.18 to keep your sanity, I swear I will go back to using PICS if I'm forced to use this crappy IDE in the future. :evil:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I have been having lots of problems trying to use AS6.1.
One issue I had was cleaning out the registry on my windows xp machines.

After, removing all the atmel and avr entries, my install of AS6.1 SP2 went a little better.

I still have to run a downgraded JTAGICE3 (fw version 2.15) The 3.8 version doesn't work well.

Since I get little help from the Atmel folks, I am thinking of downgrading to 4.19 myself.

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

Unfortunately you will not be able to use JTAGICE3 with AS4.xx, but if you have another debugger like a JTAGICE2 or Dragon then you will be ok.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Yes, But I am running two machines, one now with AS4 and the other with AS6.1 SP2. Running the JTAGICE3 with fw version 2.15, I can debug M328P with DebugWIRE. I haven't tried JTAG recently.

Right now, it is the loading of the EEPROM in the simulator with the .eep file, that is my current annoyance.

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

With a C program, I would just call eeprom_write_block() at runtime.

OTOH, if you are seriously using Atmel Assembler, just use AS4.19

David.

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

I just ran a quick test - for C the simulator automatically loads the EEPROM contents. I'm guessing it didn't read the .eep file but, because it is using .elf as the file to debug if it finds a .eeprom section in the data it loads that.

Building an Asm project, as reported here, it does not appear to load EEPROM contents. I guess that's because it is not using ELF. A rather curious implication of all this would be that if the assembler used were avr-as rather than the Atmel assembler it presumably would work (though you'd be using .section ".eeprom" and not .eseg).

I had a hope that if AS6 simulator has lost AS4's up/down-load memory command that the newly added "stimuli" feature might have some kind of "$load_eeprom" command. But sadly that does not seem to be the case.

So, short of hand editing hex bytes into a "Memory" window pointed at EEPROM I cannot see how you can pre-load that memory section for an Atmel Asm project.

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

Thanks for your efforts in exploring this.

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

I guess you could contact support just to annoy them. :wink:
The assembler is almost without any priority it seems so don't hold your breath.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I can't see any advantage of using AS6.1 for Atmel Assembler. AS4.19 works well enough.

After all, ASM does not have any types or structure.

A serious alternative is to use GCC-AS. It is not hard to port to the GCC dialect. You should then debug an ELF file in the regular way.

David.

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

Quote:

I can't see any advantage of using AS6.1 for Atmel Assembler. AS4.19 works well enough.

Only once there are new AVRs launched that weren't supported in 4.19, then you'd be stuck. But it does seem, for Asm at least, that 4 may be better than 6.

It is a little curious that Atmel chose to go backwards while moving forwards though!

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

Grabbing the new .inc files from AS6 and putting them into AS4.xx allows AS4 to assemble code for the new chips.
I have used AS4.18 with the Xmega32E5 chips for assembling.

Unfortunately I haven't worked out how to fool the debugger to work with the new chips otherwise my life would be just a little happier and my blood pressure would not skyrocket by using AS6. :-)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

As far as I can see, it is only EEPROM in the Simulator that is a problem.
I presume that you can just use "Preserve EEPROM contents" with a hardware debug session. i.e. you manually program .EEP before you start debugging.

I just tried jstampfl's program in the Simulator.
It is not difficult to type "what is the method?" into the ascii field. Then type "0d 0a" into the hex field.

Obviously more complex EEPROM contents would be harder to type.

David.