摘要: Keil MDK开发ARM 内核的MCU时,将常量定义到指定的Flash地址中,使用 _attribute_( at(绝对地址) )即可,如: const u32 myConstVariable_1[128] __attribute__((at(0x08001000))) = {0x12345678 阅读全文
posted @ 2022-06-08 14:20 喵喵喵mmm 阅读(333) 评论(0) 推荐(0)
摘要: RISC-V MCU开发过程中,需要指定一些变量在MCU复位时能够保持当前变量的值, 以CH32V307为例,具体方法如下: 不更改ld文件,将变量添加((section(".noinit")))属性描述 __attribute__((section(".noinit"))) uint8_t tes 阅读全文
posted @ 2022-06-08 09:24 喵喵喵mmm 阅读(75) 评论(0) 推荐(0)