[PATCH] Basic lwIP for STM32H7 BSP

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Mar 26 14:24:27 UTC 2021


On 26/03/2021 11:34, Robin Müller wrote:
> How would you define a generic linker section? I tried to put the 
> following section into the
> linkcmdsmemory file like you suggested (at 
> spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml):
>
>   SECTIONS {
>     .stm32h7_sram_3 (NOLOAD) : ALIGN_WITH_INPUT {
>       bsp_stm32h7_sram_3_start = stm32h7_memory_sram_3_begin;
>       bsp_stm32h7_sram_3_end = stm32h7_memory_sram_3_end;
>     } > SRAM_3 AT > FLASH
>   }

This should work. You need also input sections for this output section. 
I still don't know why you can't use the already existing:

     .nocache : ALIGN_WITH_INPUT {
         bsp_section_nocache_begin = .;
         *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_nocache*)))
         bsp_section_nocache_end = .;
     } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD
     bsp_section_nocache_size = bsp_section_nocache_end - 
bsp_section_nocache_begin;
     bsp_section_nocache_load_begin = LOADADDR (.nocache);
     bsp_section_nocache_load_end = bsp_section_nocache_load_begin + 
bsp_section_nocache_size;

     .nocachenoload (NOLOAD) : ALIGN_WITH_INPUT {
         bsp_section_nocachenoload_begin = .;
         *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_noload_nocache*)))
         bsp_section_nocacheheap_begin = .;
         . += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - 
ABSOLUTE (.);
         bsp_section_nocacheheap_end = .;
         bsp_section_nocachenoload_end = .;
     } > REGION_NOCACHE AT > REGION_NOCACHE
     bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - 
bsp_section_nocacheheap_begin;
     bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - 
bsp_section_nocachenoload_begin;

For the stm32h7 these regions are used:

   REGION_ALIAS ("REGION_NOCACHE", SRAM_1);
   REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM_1);

>
> But the waf build fails with  a syntax error:
>
> [1610/1611] Linking build/arm/stm32h7/testsuites/samples/ticker.exe
> [1611/1611] Linking build/arm/stm32h7/testsuites/samples/unlimited.exe
> c:/users/robin/rtems/rtems-tools/rtems/6/bin/../lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld.exe:linkcmds.memory:84: 
> syntax error
> collect2.exe: error: ld returned 1 exit status
>
> c:/users/robin/rtems/rtems-tools/rtems/6/bin/../lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld.exe:linkcmds.memory:84: 
> syntax error
> collect2.exe: error: ld returned 1 exit status
What is around line 84?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/



More information about the devel mailing list