Sharing variable (struct) in Bootloader with Application

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

I declared #pragma NOINIT for disable initialization or clearing the struct. But if i read out the content of the struct in the bootloader, the values are not correct. What could cause this error?

Parents Reply Children
No data
More questions in this forum