1、定义一个数组比如value[],让数组的首地址指向特定的SRAM地址,比如0x20000100

1)__align(8) uint8_t value[20] __attribute__((at(0x20000100))); MDK中定义

2)int value[] __attribute__((section(".ARM.__at_0x20000100"))) = {0x01, 0x02}; GCC中定义

2、指定函数的存放地址

void func (void) __attribute__((section(".ARM.__at_0x00000200")));

相关文章:

  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-08-20
  • 2021-08-29
  • 2021-09-23
  • 2021-09-03
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2021-07-29
  • 2021-09-03
  • 2021-04-29
  • 2021-10-14
  • 2021-09-22
  • 2022-12-23
相关资源
相似解决方案