Added new linker file that's going to be commented throughly.

This commit is contained in:
Jake Goodwin 2026-01-05 20:46:32 -08:00
parent 6be8210eae
commit 87fc051a56

View file

@ -0,0 +1,55 @@
/*
* This linker script is only for the QingKe V2 Microprocessors.
* Specifically this targets the ch32v003 models with
* 1920B of Bootloader flash memory.
*
* Progamming Methods:
*
* Standard programming:
* This is preformed in 2 Bytes of writting and erases of 1K.
*
* Fast programming:
* Preforms 64 Byte Writes and 64 Byte erases aka it works in 1 Page
* apparently 1k write/erase is also applicable.
*/
ENTRY( InterruptVector )
/*
* Memory Layout:
*
* Page sizes: 64Bytes
*
*
* Option Bytes: 0x1FFF F840 - 0x1FFF F800
* Size: 64B
*
* Vendor Bytes: 0x1FFF F800 - 0x1FFF F7C0
* Size: 64B
*
* System Flash(BOOT_1920B): 0x1FFF F780 - 0x1FFF F000
* Size: 1920
* Why does the value seem...different than what's listed in the reference
* mannual's memory image?
*
*/
/* We put the origin at zero, the reset point. */
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 16K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 2K
}
/*
* Standard sections:
* .bss, uninitialized globals and static vars.
* .data, anything that's initialized
* .text, Where the code is.
*/
SECTIONS
{
}