How to verify bootloader is uploaded to correct memory block?

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

I have a bootloader that I want to confirm is uploaded to the correct location in memory. 

 

  • Using Atmel Studio 6
  • I'm using an AT90USB1286 w/ 128k of flash and a 4096W boot size (F000 words start address).
  • I'm setting -section-start=.text=0x1e000 (bytes) in the linker.

 

I think everything is correct but I want to confirm that the bootloader is flashed to the correct memory address. It starts from the beginning of SPM so it should start at the offset 0x1E000. I can read the bootloader .hex after uploading but because it's intel hex format there's about 3 times as many bytes so the HEX reader doesn't give an absolute address for the start of the bootloader code. How can I verify it's at the correct absolute address? 

This topic has a solution.
Last Edited: Tue. Aug 4, 2015 - 05:35 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Read the whole of flash:

avrdude <all-of-your-other-options> -U flash:r:foo.hex:i

 

Then dump

avr-objdump -D -m avr foo.hex > foo.lss

 

Examine foo.lss in your favourite text editor, and look for code starting at the appropriate byte-address.  Everything up to that should be 0xFFFF.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

worked thanks. I didn't feel like trying to figure out intel hex today :)