collab/whiteboard

git clone https://git.julia.blue/collab/whiteboard

Jana Dönszelmann39c111a

main
2.1 KiB77 linesraw
1
2MEMORY {
3    /*
4     * The RP2350 has either external or internal flash.
5     *
6     * 2 MiB is a safe default here, although a Pico 2 has 4 MiB.
7     */
8    FLASH : ORIGIN = 0x10000000, LENGTH = 2048K
9    /*
10     * RAM consists of 8 banks, SRAM0-SRAM7, with a striped mapping.
11     * This is usually good for performance, as it distributes load on
12     * those banks evenly.
13     */
14    RAM : ORIGIN = 0x20000000, LENGTH = 512K
15    /*
16     * RAM banks 8 and 9 use a direct mapping. They can be used to have
17     * memory areas dedicated for some specific job, improving predictability
18     * of access times.
19     * Example: Separate stacks for core0 and core1.
20     */
21    SRAM4 : ORIGIN = 0x20080000, LENGTH = 4K
22    SRAM5 : ORIGIN = 0x20081000, LENGTH = 4K
23}
24
25SECTIONS {
26    /* ### Boot ROM info
27     *
28     * Goes after .vector_table, to keep it in the first 4K of flash
29     * where the Boot ROM (and picotool) can find it
30     */
31    .start_block : ALIGN(4)
32    {
33        __start_block_addr = .;
34        KEEP(*(.start_block));
35        KEEP(*(.boot_info));
36    } > FLASH
37
38} INSERT AFTER .vector_table;
39
40/* move .text to start /after/ the boot info */
41_stext = ADDR(.start_block) + SIZEOF(.start_block);
42
43SECTIONS {
44    /* ### Picotool 'Binary Info' Entries
45     *
46     * Picotool looks through this block (as we have pointers to it in our
47     * header) to find interesting information.
48     */
49    .bi_entries : ALIGN(4)
50    {
51        /* We put this in the header */
52        __bi_entries_start = .;
53        /* Here are the entries */
54        KEEP(*(.bi_entries));
55        /* Keep this block a nice round size */
56        . = ALIGN(4);
57        /* We put this in the header */
58        __bi_entries_end = .;
59    } > FLASH
60} INSERT AFTER .text;
61
62SECTIONS {
63    /* ### Boot ROM extra info
64     *
65     * Goes after everything in our program, so it can contain a signature.
66     */
67    .end_block : ALIGN(4)
68    {
69        __end_block_addr = .;
70        KEEP(*(.end_block));
71    } > FLASH
72
73} INSERT AFTER .uninit;
74
75PROVIDE(start_to_end = __end_block_addr - __start_block_addr);
76PROVIDE(end_to_start = __start_block_addr - __end_block_addr);
77