cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Compilation issue with gnc gcc

SSing.10
Associate II

Hello All,

I am working on the STM32 project and using the makfile to compile and generate respective hex and bin files.

I have configured all the setups using adding path in windows10 os environment variables for makefile and gnu gcc compiler.

It compiles and gives the error -

arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m3 -mthumb  -DUSE_HAL_DRIVER -DSTM32F103xE -ICore/Inc -IDrivers/STM32F1xx_HAL_Driver/Inc -IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F1xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/startup_stm32f103xe.d" startup_stm32f103xe.s -o build/startup_stm32f103xe.o

arm-none-eabi-gcc build/main.o build/gpio.o build/stm32f1xx_it.o build/stm32f1xx_hal_msp.o build/stm32f1xx_hal_gpio_ex.o build/stm32f1xx_hal_tim.o build/stm32f1xx_hal_tim_ex.o build/stm32f1xx_hal.o build/stm32f1xx_hal_rcc.o build/stm32f1xx_hal_rcc_ex.o build/stm32f1xx_hal_gpio.o build/stm32f1xx_hal_dma.o build/stm32f1xx_hal_cortex.o build/stm32f1xx_hal_pwr.o build/stm32f1xx_hal_flash.o build/stm32f1xx_hal_flash_ex.o build/stm32f1xx_hal_exti.o build/system_stm32f1xx.o build/startup_stm32f103xe.o -mcpu=cortex-m3 -mthumb  -specs=nano.specs -TSTM32F103VCTx_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/gccTemplateProejct.map,--cref -Wl,--gc-sections -o build/gccTemplateProejct.elf

arm-none-eabi-gcc: error: nano.specs: No such file or directory

make: *** [build/gccTemplateProejct.elf] Error 1

I request all to please share the solution for the same.

Thanks & Regards

0693W00000Lx0FmQAJ.png

5 REPLIES 5
Bob S
Principal

The "nano.specs" file usually appears in multiple places under the "arm-none-eabi" directory in your compiler install tree (same as "nosys.specs" and a bunch of other .specs files). How did you install the compiler? Was it installed as part of an IDE or other package? Is it possible your compiler install doesn't have the nano library installed?

SSing.10
Associate II

Hi Bob,

The installed compiler is not part of an IDE or other package.

I have downloaded it from the GNU Arm Embedded Toolchain site in zip format, extracted it & added the bin folder path in windows environment.

Can you please share how to check nano library is installed or not.

Note - I am developing it in the Windows-10 OS environment.

Extract the lib folder too.

It is in ...\tools\arm-none-eabi\lib\thumb\v8-m.main\nano.specs

SSing.10
Associate II

Hi Bob & Pavel,

The issue is fixed now and I have re-setup all the toolchain configurations.

I have checked for the Nano library and is not installed.