mbed/TARGET_NUCLEO_L152RE/TOOLCHAIN_ARM_MICRO/stm32l152re.sct(34): error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.
So how about telling me which sections they are?!
I have exported an mbed project from the online compiler, and simply opened it in uVision-4 and tried to build it. I have made no changes at all.
:-(
This is the stm32l152re.sct file - error line highlighted:
; STM32L152RE: 512KB FLASH + 80KB SRAM LR_IROM1 0x08000000 0x80000 { ; load region size_region ER_IROM1 0x08000000 0x80000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } ; 73 vectors = 292 bytes (0x124) to be reserved in RAM RW_IRAM1 (0x20000000+0x124) (0x14000-0x124) { ; RW data .ANY (+RW +ZI) } }
Any hints on how to find the offending Sections?
Not sure exactly how best to search.
But it complains that more than one source file contains "AREA RESET".
For example a *.s file with a line:
AREA RESET, DATA, READONLY
What *.o files will match if you do grep for RESET?
Well, just deleting the Scatter file gives me a load of "Multiple Definition" errors:
.\build\Nucleo_printf.axf: Error: L6200E: Symbol __Vectors_Size multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). : : .\build\Nucleo_printf.axf: Error: L6200E: Symbol HardFault_Handler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). : : .\build\Nucleo_printf.axf: Error: L6200E: Symbol ADC1_IRQHandler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). .\build\Nucleo_printf.axf: Error: L6200E: Symbol COMP_ACQ_IRQHandler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). .\build\Nucleo_printf.axf: Error: L6200E: Symbol COMP_IRQHandler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). .\build\Nucleo_printf.axf: Error: L6200E: Symbol DAC_IRQHandler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). .\build\Nucleo_printf.axf: Error: L6200E: Symbol DMA1_Channel1_IRQHandler multiply defined (by startup_stm32l152xe.o and startup_stm32l1xx_hd.o). : :
So there we have it: startup_stm32l152xe.o and startup_stm32l1xx_hd.o are, presumably, the ones causing the duplicates.
So why couldn't the L6235E message have told me this??
Grrrr
Thanks - you must have posted that while I was typing my reply!
Unfortunately the current version of UVision tells me that the scatter file is missing or empty (I tried both).