From a099a128b8430791f42d2406617bc68a24970f4e Mon Sep 17 00:00:00 2001 From: Leonardo Cavagnis Date: Tue, 31 Mar 2026 18:22:20 +0200 Subject: [PATCH] giga r1: fix memory map for lvgl --- platform.txt | 4 ++-- .../arduino_giga_r1_stm32h747xx_m7.conf | 4 ++-- .../arduino_giga_r1_stm32h747xx_m7.overlay | 13 ++++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/platform.txt b/platform.txt index ee295bd0a..c0550a965 100644 --- a/platform.txt +++ b/platform.txt @@ -80,10 +80,10 @@ build.zsk_args.startup-mode-wait= build.zsk_args.startup-mode-immediate=-immediate # These can be overridden in platform.local.txt -compiler.c.extra_flags= +compiler.c.extra_flags="-DARDUINO_LV_CONF_PATH={build.source.path}/lv_conf_user.h" compiler.c.elf.extra_flags= compiler.S.extra_flags= -compiler.cpp.extra_flags= +compiler.cpp.extra_flags="-DARDUINO_LV_CONF_PATH={build.source.path}/lv_conf_user.h" compiler.ar.extra_flags= compiler.objcopy.eep.extra_flags= compiler.elf2hex.extra_flags= diff --git a/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf b/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf index 5c6dacd08..0a6cccebe 100644 --- a/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf +++ b/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf @@ -17,11 +17,11 @@ CONFIG_LLEXT_STORAGE_WRITABLE=n CONFIG_SHARED_MULTI_HEAP=y CONFIG_HEAP_MEM_POOL_SIZE=32768 CONFIG_MAIN_STACK_SIZE=32768 -CONFIG_LLEXT_HEAP_SIZE=128 +CONFIG_LLEXT_HEAP_SIZE=256 CONFIG_CODE_DATA_RELOCATION=y CONFIG_MAIN_STACK_REGION="DTCM" -CONFIG_LLEXT_HEAP_REGION="SRAM2" +CONFIG_LLEXT_HEAP_REGION="SRAM1" CONFIG_LOG_BACKEND_UART=y CONFIG_LOG_BACKEND_UART_AUTOSTART=n diff --git a/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.overlay b/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.overlay index bd0b8bb91..864b8fadf 100644 --- a/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.overlay +++ b/variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.overlay @@ -356,7 +356,7 @@ }; user_sketch: partition@e0000 { - reg = <0x0E0000 0x20000>; + reg = <0x000E0000 0x00040000>; }; }; }; @@ -550,6 +550,17 @@ }; }; +&sram1 { + reg = <0x30000000 DT_SIZE_K(256)>; +}; + +/delete-node/ &sram2; + +&sdram1 { + /* Frame buffer memory cache will cause screen flickering. */ + zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>; +}; + /* Include common flash filesystem configuration */ qspi_flash: &n25q128a1 {}; #include "../common/arduino_flash_fs.dtsi"