esp8266: Rename ROMFS partition config variables to include "part0".
For consistency with the stm32 port. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -17,8 +17,8 @@ MEMORY
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* define ROMFS extents */
|
/* define ROMFS extents */
|
||||||
_micropy_hw_romfs_start = ORIGIN(FLASH_ROMFS);
|
_micropy_hw_romfs_part0_start = ORIGIN(FLASH_ROMFS);
|
||||||
_micropy_hw_romfs_size = LENGTH(FLASH_ROMFS);
|
_micropy_hw_romfs_part0_size = LENGTH(FLASH_ROMFS);
|
||||||
|
|
||||||
/* define common sections and symbols */
|
/* define common sections and symbols */
|
||||||
INCLUDE boards/esp8266_common.ld
|
INCLUDE boards/esp8266_common.ld
|
||||||
|
|||||||
@@ -165,13 +165,13 @@ static MP_DEFINE_CONST_FUN_OBJ_0(esp_flash_size_obj, esp_flash_size);
|
|||||||
|
|
||||||
extern byte _firmware_size[];
|
extern byte _firmware_size[];
|
||||||
#if MICROPY_VFS_ROM_IOCTL
|
#if MICROPY_VFS_ROM_IOCTL
|
||||||
extern uint8_t _micropy_hw_romfs_size;
|
extern uint8_t _micropy_hw_romfs_part0_size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static mp_obj_t esp_flash_user_start(void) {
|
static mp_obj_t esp_flash_user_start(void) {
|
||||||
uint32_t flash_user_start = (uint32_t)_firmware_size;
|
uint32_t flash_user_start = (uint32_t)_firmware_size;
|
||||||
#if MICROPY_VFS_ROM_IOCTL
|
#if MICROPY_VFS_ROM_IOCTL
|
||||||
flash_user_start += (uint32_t)&_micropy_hw_romfs_size;
|
flash_user_start += (uint32_t)&_micropy_hw_romfs_part0_size;
|
||||||
#endif
|
#endif
|
||||||
return MP_OBJ_NEW_SMALL_INT(flash_user_start);
|
return MP_OBJ_NEW_SMALL_INT(flash_user_start);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,13 +35,13 @@
|
|||||||
#define FLASH_MEM_BASE (0x40200000)
|
#define FLASH_MEM_BASE (0x40200000)
|
||||||
#define FLASH_PAGE_SIZE (4096)
|
#define FLASH_PAGE_SIZE (4096)
|
||||||
|
|
||||||
#define MICROPY_HW_ROMFS_BASE (uintptr_t)(&_micropy_hw_romfs_start)
|
#define MICROPY_HW_ROMFS_BASE (uintptr_t)(&_micropy_hw_romfs_part0_start)
|
||||||
#define MICROPY_HW_ROMFS_BYTES (uintptr_t)(&_micropy_hw_romfs_size)
|
#define MICROPY_HW_ROMFS_BYTES (uintptr_t)(&_micropy_hw_romfs_part0_size)
|
||||||
|
|
||||||
#define ROMFS_SPI_FLASH_OFFSET (MICROPY_HW_ROMFS_BASE - FLASH_MEM_BASE)
|
#define ROMFS_SPI_FLASH_OFFSET (MICROPY_HW_ROMFS_BASE - FLASH_MEM_BASE)
|
||||||
|
|
||||||
extern uint8_t _micropy_hw_romfs_start;
|
extern uint8_t _micropy_hw_romfs_part0_start;
|
||||||
extern uint8_t _micropy_hw_romfs_size;
|
extern uint8_t _micropy_hw_romfs_part0_size;
|
||||||
|
|
||||||
static const MP_DEFINE_MEMORYVIEW_OBJ(romfs_obj, 'B', 0, MICROPY_HW_ROMFS_BYTES, (void *)MICROPY_HW_ROMFS_BASE);
|
static const MP_DEFINE_MEMORYVIEW_OBJ(romfs_obj, 'B', 0, MICROPY_HW_ROMFS_BYTES, (void *)MICROPY_HW_ROMFS_BASE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user