Hiya guys, need a bit of help here I have put this code in ----------------------------------------- void noreturn (void) interrupt 1 { send_serial("Timer0 Overflow"); } ------------------------------------------ but the target is not created when this code is in. what could it be??
I'm just about positive that you can't use absolute code addresses in C. You would have to write an assembly file and add it to your project so that it is linked with your C code. In the assembly file, you'd have: .org 0x0000 LJMP 0x1000 .org 0x0003 LJMP 0x1003 etc. But, then you are still stuck adding this file to your project when compiling for the simulator and taking it out when compiling for use in HW. If you really want something "clean" how about this?: #define USING_SIMULATOR x // x=1 if "using simulator" // x=0 if using hardware #if (USING_SIMULATOR) #pragma iv (0x0000) #else #pragma iv (0xBF00) #endif You just change "x" depending on how you want it. I often write code that must be compiled differently for different situations and this is the best way to compile two different versions from the same source code.
I have never heard of a '51 derivative with vectors based anywhere but from 0. What chip are you using? Erik
well the development board was develop by a lectuer at uni. The process is: On on board Rom, which has the Download software on, and then the code and data goes onto the onboard ram. But the vectors for the RAM are offset in the rom.