2021-05-07 13:21:09 +00:00
|
|
|
/* Memory configuration */
|
2021-08-20 19:41:58 +00:00
|
|
|
#if MICROPY_HW_FLASH_RESERVED
|
|
|
|
reserved_size = MICROPY_HW_FLASH_RESERVED;
|
2021-08-20 19:41:58 +00:00
|
|
|
#endif
|
|
|
|
|
2021-08-20 19:41:58 +00:00
|
|
|
#if MICROPY_HW_FLASH_TYPE==qspi_nor
|
2021-08-20 19:41:58 +00:00
|
|
|
flash_start = 0x60000000;
|
2021-08-20 19:41:58 +00:00
|
|
|
#elif MICROPY_HW_FLASH_TYPE==hyperflash
|
2021-05-07 13:21:09 +00:00
|
|
|
flash_start = 0x60000000;
|
2021-08-20 19:41:58 +00:00
|
|
|
#else
|
2021-08-20 19:41:58 +00:00
|
|
|
#error Unknown MICROPY_HW_FLASH_TYPE
|
2021-08-20 19:41:58 +00:00
|
|
|
#endif
|
2021-08-20 19:41:58 +00:00
|
|
|
flash_size = MICROPY_HW_FLASH_SIZE;
|
2021-05-07 13:21:09 +00:00
|
|
|
flash_end = DEFINED(reserved_size) ? ((flash_start) + (flash_size - reserved_size)) : ((flash_start) + (flash_size));
|
|
|
|
flash_config_start = flash_start;
|
|
|
|
flash_config_size = 0x00001000;
|
2021-08-20 19:41:58 +00:00
|
|
|
ivt_start = flash_start + 0x00001000;
|
2021-05-07 13:21:09 +00:00
|
|
|
ivt_size = 0x00001000;
|
2021-08-20 19:41:58 +00:00
|
|
|
interrupts_start = flash_start + 0x00002000;
|
2021-05-07 13:21:09 +00:00
|
|
|
interrupts_size = 0x00000400;
|
2021-08-20 19:41:58 +00:00
|
|
|
text_start = flash_start + 0x00002400;
|
|
|
|
vfs_start = flash_start + 0x00100000;
|
2021-06-08 11:34:53 +00:00
|
|
|
text_size = ((vfs_start) - (text_start));
|
2021-05-07 13:21:09 +00:00
|
|
|
vfs_size = ((flash_end) - (vfs_start));
|
|
|
|
itcm_start = 0x00000000;
|
|
|
|
itcm_size = 0x00020000;
|
|
|
|
dtcm_start = 0x20000000;
|
|
|
|
dtcm_size = 0x00020000;
|
|
|
|
ocrm_start = 0x20200000;
|
|
|
|
ocrm_size = 0x000C0000;
|
|
|
|
|
2021-08-20 19:41:58 +00:00
|
|
|
#ifdef MICROPY_HW_SDRAM_AVAIL
|
|
|
|
sdram_start = 0x80000000;
|
|
|
|
sdram_size = MICROPY_HW_SDRAM_SIZE;
|
|
|
|
#endif
|
|
|
|
|
2020-01-20 11:25:51 +00:00
|
|
|
/* 32kiB stack. */
|
|
|
|
__stack_size__ = 0x8000;
|
|
|
|
_estack = __StackTop;
|
|
|
|
_sstack = __StackLimit;
|
|
|
|
|
2021-08-20 19:41:58 +00:00
|
|
|
#ifdef MICROPY_HW_SDRAM_AVAIL
|
|
|
|
_gc_heap_start = ORIGIN(m_sdram);
|
|
|
|
_gc_heap_end = ORIGIN(m_sdram) + LENGTH(m_sdram);
|
|
|
|
#else
|
2020-01-20 11:25:51 +00:00
|
|
|
/* Use second OCRAM bank for GC heap. */
|
2021-05-07 13:21:09 +00:00
|
|
|
_gc_heap_start = ORIGIN(m_ocrm);
|
|
|
|
_gc_heap_end = ORIGIN(m_ocrm) + LENGTH(m_ocrm);
|
2021-08-20 19:41:58 +00:00
|
|
|
#endif
|