From f845b95a162eb7001bfb23ff35ed38607d9f3884 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Fri, 9 Dec 2022 10:20:18 +0100 Subject: bsp/atsam: Allow to use custom SDRAM With the old build system in RTEMS 5 that was possible by just overwriting BOARD_Sdram_Config and setting a custom ATSAM_MEMORY_SDRAM_SIZE during building the BSP. In the new build system that ATSAM_MEMORY_SDRAM_SIZE is set exclusively by the selected SDRAM chip. This patch adds the possibility to specify a "custom-0x100000" or similar as SDRAM type where the number gives the SDRAM size. --- bsps/arm/atsam/start/sdram-config.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bsps') diff --git a/bsps/arm/atsam/start/sdram-config.c b/bsps/arm/atsam/start/sdram-config.c index 87e52ebed0..85b009a9d5 100644 --- a/bsps/arm/atsam/start/sdram-config.c +++ b/bsps/arm/atsam/start/sdram-config.c @@ -148,6 +148,13 @@ const struct BOARD_Sdram_Config BOARD_Sdram_Config = { #error Please check SDRAM settings for this frequency. #endif +#elif defined ATSAM_SDRAM_CUSTOM +/* + * Custom SDRAM defined. Provide only a dummy BOARD_Sdram_Config. This config + * won't work and is only there so that test applications can link. The + * application has to overwrite this BOARD_Sdram_Config! + */ +const struct BOARD_Sdram_Config BOARD_Sdram_Config = {}; #else #error SDRAM not supported. #endif -- cgit v1.2.3