Browse Source

HAL_ChibiOS: support 512k F7 parts for flash

zr-v5.1
Andrew Tridgell 4 years ago
parent
commit
22f7218acf
  1. 6
      libraries/AP_HAL_ChibiOS/hwdef/common/flash.c

6
libraries/AP_HAL_ChibiOS/hwdef/common/flash.c

@ -103,7 +103,11 @@ static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(16), KB(16), KB(16
#endif #endif
#elif defined(STM32F7) #elif defined(STM32F7)
#if BOARD_FLASH_SIZE == 1024 #if BOARD_FLASH_SIZE == 512
#define STM32_FLASH_NPAGES 8
static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(16), KB(16), KB(16), KB(16), KB(64), KB(128), KB(128), KB(128) };
#elif BOARD_FLASH_SIZE == 1024
#define STM32_FLASH_NPAGES 8 #define STM32_FLASH_NPAGES 8
static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(32), KB(32), KB(32), KB(32), KB(128), KB(256), KB(256), KB(256) }; static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(32), KB(32), KB(32), KB(32), KB(128), KB(256), KB(256), KB(256) };

Loading…
Cancel
Save