Posted: Wed Apr 15, 2015 8:40 pm Post subject: Relocating program start position
Is it somehow possible to relocate the program start? My debugging program works from 0x000000 to 0x007FFF and I'd like to have users upload programs from 0x008000 which means that their whole programs must start from there. This is my school and contest project as an alternative to the expensive JTAG that other students cannot afford. My debugging program should solve this problem.
About the interrupt vectors, I can handle that. All I have to do is put a JMP instruction after every vector to jump to +0x8000 of its address or I can use an interrupt trapper for debugging purposes. The user's vectors must be at 0x008000.
AVR-GCC can do that, but I'm not sure BASCOM AVR can. BASCOM had that function for 8051 and they disabled it. Is it possible to go around this limitation to somehow compile at 0x008000? Like tweaking the INC/REG files of the microcontroller.
Yes B8051 supports this because the 8051 has a different architecture.
For AVR I could not find a reason to let code start from an address other than 0 or the boot address. You can only run code from flash, not from RAM, and since AVR had no boot vector selection either.....
you could do this :
$bootvector ' put int table into bootloader section so we can use interrupts
Config Intvectorselection = Enabled ' enabled means that the vector table points to the boot section
$loader=&H8000
I did not test it. As i understand it, you need the $romstart directive right? _________________ Mark
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum