diff --git a/LD/gd32e23x_flash.ld b/LD/gd32e23x_flash.ld index e122724..7237ca3 100644 --- a/LD/gd32e23x_flash.ld +++ b/LD/gd32e23x_flash.ld @@ -10,9 +10,11 @@ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Memories definition */ +/* FW_B 保底槽布局:0x0800B000~0x0800FC00 共 19K,末 8B(0x0800FBF8 起)为 B 记录 + * {magic16,pages16,crc16,2B 保留},由打包工具写入,链接区上限 = 槽 - 8B = 0x4BF8 */ MEMORY { - FLASH (rx) : ORIGIN = 0x08002000, LENGTH = 54K + FLASH (rx) : ORIGIN = 0x0800B000, LENGTH = 0x4BF8 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K } diff --git a/Src/system_gd32e23x.c b/Src/system_gd32e23x.c index 2cf55f1..69736ff 100644 --- a/Src/system_gd32e23x.c +++ b/Src/system_gd32e23x.c @@ -41,7 +41,7 @@ #define __HXTAL (HXTAL_VALUE) /* high speed crystal oscillator frequency */ #define __SYS_OSC_CLK (__IRC8M) /* main oscillator frequency */ -#define VECT_TAB_OFFSET (uint32_t)0x2000 /* vector table base offset */ +#define VECT_TAB_OFFSET (uint32_t)0xB000 /* vector table base offset, FW_B slot 0x0800B000 */ /* select a system clock by uncommenting the following line */ //#define __SYSTEM_CLOCK_8M_HXTAL (__HXTAL)