Flash size on eg33 (#3955)

* subaru-eg33: 1M of flash is available for FW and bootloader

* ports: stm32f7: allow board define its flash size, otherwise 512K
This commit is contained in:
Andrey G 2022-02-23 15:36:58 +03:00 committed by GitHub
parent 0130933dd7
commit 788ac5508d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -34,6 +34,9 @@ DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
DDEFS += -DHAL_USE_UART=FALSE
DDEFS += -DUART_USE_WAIT=FALSE
#Linker options, flash size
USE_OPT += -Wl,--defsym=FLASH_SIZE=1m
# Shared variables
ALLINC += $(BOARDINC)

View File

@ -24,11 +24,16 @@
* BSS is placed in DTCM RAM in order to simplify DMA buffers management.
* 'bl' is related to rusefi bootloader
*/
/* TODO: 512k flash limit is a mitigation for https://github.com/rusefi/rusefi/issues/3566 and https://github.com/rusefi/rusefi/issues/3775 */
flash_size = DEFINED(FLASH_SIZE) ? FLASH_SIZE : 512k;
MEMORY
{
bl : org = 0x08000000, len = 16k /* bootloader section */
/* TODO: 512k flash limit is a mitigation for https://github.com/rusefi/rusefi/issues/3566 and https://github.com/rusefi/rusefi/issues/3775 */
flash0 (rx) : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? (512k - 32k) : 512k /* change address & length if bootloader */
/* change address & length if bootloader */
flash0 (rx) : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? (flash_size - 32k) : FLASH_SIZE
/* TODO: should we use same flash_size for flash@ITCM? */
flash1 (rx) : org = DEFINED(BOOTLOADER) ? 0x00208000 : 0x00200000, len = DEFINED(BOOTLOADER) ? (2m - 32k) : 2m /* Flash as ITCM */
flash2 (rx) : org = 0x00000000, len = 0
flash3 (rx) : org = 0x00000000, len = 0