Merge pull request #3071 from jgillick/jeremy/stm-nvm-flash
STM32 (ThunderPack) - Move NVM sector to increase program size.
This commit is contained in:
commit
9ec9644928
|
@ -6,10 +6,10 @@
|
|||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
|
||||
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
|
||||
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 32K /* sectors 1,2 are 16K */
|
||||
FLASH_NVM (rwx) : ORIGIN = 0x0800C000, LENGTH = 16K /* sector 3 is 16K */
|
||||
FLASH_FIRMWARE (rx) : ORIGIN = 0x08010000, LENGTH = 448K /* sector 4 is 64K, sectors 5,6,7 are 128K */
|
||||
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
|
||||
FLASH_FS (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* sectors 1,2,3 are 16K */
|
||||
FLASH_NVM (rwx) : ORIGIN = 0x08010000, LENGTH = 64K /* sector 4 is 64K */
|
||||
FLASH_FIRMWARE (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* sectors 5,6,7 are 128K */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
}
|
||||
|
||||
|
|
|
@ -28,16 +28,16 @@
|
|||
|
||||
// Non-volatile memory config
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE (0x4000)
|
||||
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (0x0800C000)
|
||||
#define CIRCUITPY_INTERNAL_NVM_SECTOR FLASH_SECTOR_3
|
||||
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (0x08010000)
|
||||
#define CIRCUITPY_INTERNAL_NVM_SECTOR FLASH_SECTOR_4
|
||||
|
||||
// Putting the entire flash sector in the NVM byte array buffer
|
||||
// would take up too much RAM. This limits how much of the sector we use.
|
||||
#define NVM_BYTEARRAY_BUFFER_SIZE 512
|
||||
#define NVM_BYTEARRAY_BUFFER_SIZE 512
|
||||
|
||||
// Flash config
|
||||
#define FLASH_SIZE (0x80000)
|
||||
#define FLASH_PAGE_SIZE (0x4000)
|
||||
#define FLASH_SIZE (0x80000)
|
||||
#define FLASH_PAGE_SIZE (0x4000)
|
||||
#define BOARD_FLASH_SIZE (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE- 0x2000 - 0xC000)
|
||||
|
||||
#define HSE_VALUE ((uint32_t)24000000U)
|
||||
|
@ -47,7 +47,7 @@
|
|||
#define BOARD_HAS_LOW_SPEED_CRYSTAL (0)
|
||||
|
||||
// Status LEDs
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA02)
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA02)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB07)
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB07)
|
||||
|
|
|
@ -41,14 +41,9 @@
|
|||
|
||||
#ifdef STM32F411xE
|
||||
#define STM32_FLASH_SIZE 0x80000 //512KiB
|
||||
#if CIRCUITPY_NVM
|
||||
#define INTERNAL_FLASH_FILESYSTEM_SIZE 0x8000 //32KiB
|
||||
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
|
||||
#else
|
||||
#define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 //48KiB
|
||||
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef STM32F412Zx
|
||||
#define STM32_FLASH_SIZE 0x100000 //1MB
|
||||
|
|
Loading…
Reference in New Issue