From 390e2a84be9778ca020187cd786db1dae926d95c Mon Sep 17 00:00:00 2001 From: cpq Date: Sat, 28 Mar 2026 22:23:09 +0000 Subject: [PATCH] Add MG_ETH_RAM to MG_ARCH_CUBE --- mongoose.h | 7 +++++++ src/arch_cube.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/mongoose.h b/mongoose.h index ecadb01e..0d984e20 100644 --- a/mongoose.h +++ b/mongoose.h @@ -184,8 +184,15 @@ extern "C" { #elif !defined(MG_OTA) && defined(STM32H7) #define MG_OTA MG_OTA_STM32H7 #endif + // use HAL-defined execute-in-ram section +#ifndef MG_IRAM #define MG_IRAM __attribute__((section(".RamFunc"))) +#endif + +#ifndef MG_ETH_RAM +#define MG_ETH_RAM __attribute__((section(".eth_ram"))) +#endif #ifndef HAL_ICACHE_MODULE_ENABLED #define HAL_ICACHE_IsEnabled() 0 diff --git a/src/arch_cube.h b/src/arch_cube.h index fe12b246..d59ad7ac 100644 --- a/src/arch_cube.h +++ b/src/arch_cube.h @@ -60,8 +60,15 @@ #elif !defined(MG_OTA) && defined(STM32H7) #define MG_OTA MG_OTA_STM32H7 #endif + // use HAL-defined execute-in-ram section +#ifndef MG_IRAM #define MG_IRAM __attribute__((section(".RamFunc"))) +#endif + +#ifndef MG_ETH_RAM +#define MG_ETH_RAM __attribute__((section(".eth_ram"))) +#endif #ifndef HAL_ICACHE_MODULE_ENABLED #define HAL_ICACHE_IsEnabled() 0