我使用 OpenOCD + GDB 来调试固件。当我键入load
时,它会将代码加载到闪存中:
Loading section ExtFlashSection, size 0x3fe000 lma 0x90000000
Loading section .isr_vector, size 0x1f8 lma 0x8000000
Loading section .text, size 0x19978 lma 0x8000200
Loading section .rodata, size 0x52d0 lma 0x8019b78
Loading section .ARM, size 0x8 lma 0x801ee48
Loading section .init_array, size 0x10 lma 0x801ee50
Loading section .fini_array, size 0x4 lma 0x801ee60
Loading section TextFlashSection, size 0x8 lma 0x801ee64
Loading section FontFlashSection, size 0x30b1c lma 0x801ee6c
Loading section .data, size 0x9c lma 0x804f988
Start address 0x80005f0, load size 4512284
Transfer rate: 89 KB/sec, 2926 bytes/write.
但是,我希望ExtFlashSection
不加载它,因为我通过外部工具手动加载它(它从 ELF 中提取内容并闪烁)。我尝试NOLOAD
向该部分添加属性,但最终 ELF 文件中不存在该属性(因此我无法提取它)。
如何告诉GDB
或OpenOCD
丢弃的内容ExtFlashSection
?