/*
 * 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
{

}


