This commit is contained in:
2026-07-17 11:18:57 +12:00
commit e883feb8d7
54 changed files with 19887 additions and 0 deletions

58
stm32g431cbtx.ld Normal file
View File

@@ -0,0 +1,58 @@
FLASH_SIZE = 0x1b580; /* 112k flash */
SRAM_SIZE = 0x8000; /* 32k sram */
STACK_SIZE = 0x400; /* 1k stack */
ENTRY(resetHandler)
MEMORY
{
sram (rwx) : ORIGIN = 0x20000000, LENGTH = SRAM_SIZE
flash (rx) : ORIGIN = 0x08000000, LENGTH = FLASH_SIZE
}
SECTIONS
{
.text :
{
. = ALIGN(4);
LONG(__initial_stack_pointer)
KEEP(*(.vectors))
*(.text*)
*(.rodata*)
. = ALIGN(4);
} > flash
.stack (NOLOAD) :
{
. = ALIGN(8);
. = . + STACK_SIZE;
. = ALIGN(8);
__initial_stack_pointer = .;
} > sram
.data :
{
_sdata = .;
. = ALIGN(4);
*(.data*)
. = ALIGN(4);
_edata = .;
} > sram AT> flash
_ldata = LOADADDR(.data);
.bss (NOLOAD) :
{
_szero = .;
. = ALIGN(4);
*(.bss*)
. = ALIGN(4);
_ezero = .;
} > sram
}