change reset vector, program code in interrupt table

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

Hi!

I made a bootloader and for testing purposes I want code with an unusual jump in the reset vector.

Usually at address 0 there would be a jump to right after the vector table such as 'jmp 0x68'. I need a jump to somewhere else, e.g. 'jmp 0x80'.

This must get into a .hex file which I can feed to my loader software. I use avr-gcc on Linux. C or asm code is fine.

After frustrating fiddling with sections, which I have only little experience with, I thought maybe it's easier to just manually modify a .hex file, or solve the problem differently.

But if anyone knows how to do it this way, that'd be interesting. The avr uC datasheets say, if you don't use interrupts you can put regular code in the interrupt table. How would you do that?

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

Just use -nostartfiles then provide your own equivalent of gcrt1.S and make sure it's the first file linked.

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

Wonderful. So simple. Thanks!