|
@@ -22,15 +22,27 @@
|
22
|
22
|
*/
|
23
|
23
|
|
24
|
24
|
/*
|
|
25
|
+ * TODO hard-coded.
|
|
26
|
+ * Should take into account PICO_FLASH_BANK_STORAGE_OFFSET
|
|
27
|
+ * and DISK_BLOCK_SIZE and DISK_BLOCK_COUNT from config.h
|
|
28
|
+ */
|
|
29
|
+__PERSISTENT_STORAGE_LEN = (3 * 4k);
|
|
30
|
+__FLASH_CACHE_LEN = (48 * 4k);
|
|
31
|
+__ADDITIONAL_LEN = (__PERSISTENT_STORAGE_LEN + __FLASH_CACHE_LEN);
|
|
32
|
+
|
|
33
|
+/*
|
25
|
34
|
* TODO: Hard-code 360k, which is the max size I see on my machine with
|
26
|
35
|
* 'sta' mode and debug printf.
|
27
|
36
|
* There must be a better way to determine the size dynamically somehow.
|
28
|
37
|
*/
|
|
38
|
+__BOOTLOADER_LEN = 360k;
|
|
39
|
+__IMG_HDR_LEN = 4k;
|
|
40
|
+__BOOTLOADER_IMG_LEN = (__BOOTLOADER_LEN + __IMG_HDR_LEN);
|
29
|
41
|
MEMORY
|
30
|
42
|
{
|
31
|
|
- FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 360k
|
32
|
|
- FLASH_IMGHDR(rx) : ORIGIN = 0x10000000 + 360k, LENGTH = 4k
|
33
|
|
- FLASH_APP(rx) : ORIGIN = 0x10000000 + 364k, LENGTH = 2048k - 364k
|
|
43
|
+ FLASH(rx) : ORIGIN = 0x10000000, LENGTH = __BOOTLOADER_LEN
|
|
44
|
+ FLASH_IMGHDR(rx) : ORIGIN = 0x10000000 + __BOOTLOADER_LEN, LENGTH = __IMG_HDR_LEN
|
|
45
|
+ FLASH_APP(rx) : ORIGIN = 0x10000000 + __BOOTLOADER_IMG_LEN, LENGTH = 2048k - __ADDITIONAL_LEN - __BOOTLOADER_IMG_LEN
|
34
|
46
|
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k
|
35
|
47
|
SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k
|
36
|
48
|
SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k
|