define block _BOOT_ with alignment = 8, size = 0x1000 { };
place at address mem: 0x70000 { readonly section _BOOT_ };
define block _MP_ with alignment = 8, size = 0x60000 { };
place at address mem: 0x01000 { readonly section _MP_ };
place in ROM_region { readonly, block _MP_, block _BOOT_ };
в теле
void Blink(void);
#pragma segment = "_MP_"
int main()
{ IO0DIR=(1<<22);
while(1) Blink();
}
void Blink(void) @ "_BOOT_"
{
if (IO0PIN&(1<<22)) IO0CLR|=(1<<22); else IO0SET|=(1<<22);
}
и таже херня, Blink начинается с 0x70000 , main с 0x7018C