I used the following code to specify
the address of variable bar at 0x4000 and
the address of function fun at 0x8002000.
int bar __attribute__((section(".ARM.__at_0x4000")));
void fun(void) __attribute__((section(".ARM.__at_0x8002000")));
void fun(void)
{
// some code here
}
However, if I print out the address of the above two:
printf("0x%08X 0x%08X\r\n", (uint32_t)&bar, (uint32_t)&a
↧