keil mdk positioning function to an absolute address

method one:

void fun(void) __attribute((section(".ARM.__at_0x8100000")));

 

Method Two:

#pragma arm section code=".ARM.__at_0x8100000"

void fun(void)

{

}

#pragma arm section

 

Located variables:

int val __attribute__((section(".ARM.__at_0x20000000"))) = 0x00;

Guess you like

Origin www.cnblogs.com/linjh-blogs/p/11984049.html