Re: [arm-gnu] Specify memory region for sections.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Specify memory region for sections.



On Wed, Dec 31, 2008 at 12:03:03PM +1100, James wrote:
> However, when I run make, at the linking phase I get;
> arm-none-eabi-gcc -Wl,-T script.ld -Wl,-Map=obj/DMA_AN_Example1.elf.map
> -o obj/DMA_AN_Example1.elf ./obj/stm32f10x_spi.o ./obj/stm32f10x_adc.o 
> ./obj/stm32f10x_dma.o ./obj/stm32f10x_flash.o ./obj/stm32f10x_gpio.o 
> ./obj/stm32f10x_lib.o ./obj/stm32f10x_nvic.o ./obj/stm32f10x_rcc.o 
> ./obj/main.o ./obj/stm32f10x_it.o ./obj/stm32f10x_vector.o ./obj/cortexm3_macro.o 
> /opt/codesourcery/Sourcery_G
> ++_Lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/bin/ld: cannot find -lgcc
> 
> Hmm.  Why can't ld find libgcc?

Sorry, I don't know - but I bet it has to do with one of two things.
One is that you should use -T instead of -Wl,-T.  The other is that
you need to tell the GCC driver what target you're compiling for.
You want to run this on an STM32, so you need -mcpu=cortex-m3
-mthumb.  After that, it should select the correct libgcc.

-- 
Daniel Jacobowitz
CodeSourcery