21ic问答首页 - GD32 Eclipse提示错误 undefined symbol `__Vectors_End'
GD32 Eclipse提示错误 undefined symbol `__Vectors_End'
Chekey2024-06-25
按照官方文档步骤,设置后编译提示undefined symbol `__Vectors_End' referenced in expression错误,感觉ld文件,但找不到文件的问题。/* memory map */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
}
ENTRY(Reset_Handler)
SECTIONS
{
__stack_size = DEFINED(__stack_size) ? __stack_size : 20K;
/* ISR vectors */
.vectors :
{
. = ALIGN(4);
KEEP(*(.vectors))
. = ALIGN(4);
//__Vectors_End = .;
//__Vectors_Size = __Vectors_End - __Vectors;
} >FLASH
.text :
{
. = ALIGN(4);
*(.text)
*(.text*)
*(.glue_7)
*(.glue_7t)
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
/* the symbol ‘_etext’ will be defined at the end of code section */
_etext = .;
} >FLASH
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
}
ENTRY(Reset_Handler)
SECTIONS
{
__stack_size = DEFINED(__stack_size) ? __stack_size : 20K;
/* ISR vectors */
.vectors :
{
. = ALIGN(4);
KEEP(*(.vectors))
. = ALIGN(4);
//__Vectors_End = .;
//__Vectors_Size = __Vectors_End - __Vectors;
} >FLASH
.text :
{
. = ALIGN(4);
*(.text)
*(.text*)
*(.glue_7)
*(.glue_7t)
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
/* the symbol ‘_etext’ will be defined at the end of code section */
_etext = .;
} >FLASH
赞0
评论
2024-06-30
赞0
.vectors :
{
. = ALIGN(4);
KEEP(*(.vectors))
. = ALIGN(4);
__Vectors_End = .; /* 设置向量表结束位置 */
} >FLASH
评论
2024-06-30
赞0
评论
2024-06-30
赞0
评论
2024-06-30
赞0
评论
2024-06-30
赞0
评论
2024-06-30
赞0
.vectors :
{
. = ALIGN(4);
KEEP(*(.vectors))
. = ALIGN(4);
__Vectors_End = .;
__Vectors_Size = __Vectors_End - .;
} >FLASH
评论
2024-06-30
赞0
定义 __Vectors_End 和 __Vectors_Size:这两个符号通常用来标识中断向量表的结束和大小。确保在 .vectors 段中正确定义和使用这些符号。
评论
2024-06-30
您需要登录后才可以回复 登录 | 注册