Update NVM_BYTEARRAY_BUFFER_LEN
This commit is contained in:
parent
5f7e51756f
commit
68195a8dfe
@ -26,11 +26,18 @@
|
||||
#define MICROPY_HW_BOARD_NAME "THUNDERPACK"
|
||||
#define MICROPY_HW_MCU_NAME "STM32F411CE"
|
||||
|
||||
#define FLASH_SIZE (0x80000)
|
||||
#define FLASH_PAGE_SIZE (0x4000)
|
||||
// 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
|
||||
|
||||
// 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_LEN 512
|
||||
|
||||
// Flash config
|
||||
#define FLASH_SIZE (0x80000)
|
||||
#define FLASH_PAGE_SIZE (0x4000)
|
||||
#define BOARD_FLASH_SIZE (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE- 0x2000 - 0xC000)
|
||||
|
||||
#define BOARD_OSC_DIV (24)
|
||||
|
@ -116,7 +116,7 @@ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
|
||||
.base = {
|
||||
.type = &nvm_bytearray_type,
|
||||
},
|
||||
.len = NVM_BYTEARRAY_BUFFER,
|
||||
.len = NVM_BYTEARRAY_BUFFER_LEN,
|
||||
.start_address = (uint8_t*) (CIRCUITPY_INTERNAL_NVM_START_ADDR)
|
||||
};
|
||||
#endif
|
||||
|
@ -32,7 +32,9 @@
|
||||
// STM flash is saved in sectors (not pages), at a minimum size of 16k.
|
||||
// To limit the RAM usage during writing, we want to set a smaller
|
||||
// maximum value.
|
||||
#define NVM_BYTEARRAY_BUFFER 512
|
||||
#ifndef NVM_BYTEARRAY_BUFFER_LEN
|
||||
#define NVM_BYTEARRAY_BUFFER_LEN 512
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
|
Loading…
x
Reference in New Issue
Block a user