I am wanted to write a bootloader. If an application is already programmed, it transfers control to the bootloader with an interrupt call (_trap_0x7F). The bootloader needs several informations form the application (ECU-adress,...). This informations are hold in a struct, which is located at the same adress in the application and the bootloader.
#include <Schnittstelle.H> #pragma NOINIT struct SchnittstellenDefinition volatile far Schnittstelle; #pragma INIT
Did you declare the shared struct as near, which is the default memory type in small memory model? In that case the actual memory location where the struct is stored would depend on DPPs. I suggest declaring the struct as huge, in which case the compiler would not rely on DPPs when accessing the struct. - mike