Can't compile for STM32F476 Discovery

757 views
asked Feb 25, 2018 in Getting started by krunal2411

I get this error while trying to compile Hello World for STM32F476 Discovery.

Please suggest.

 

These are paths in file devenv.cmd :

set Toolchain_Path=C:\STM32\gcc-arm-none-eabi
set STM32Cube_Path=C:\STM32\STM32Cube_FW_F7
set ST-LINK_Utility_Path=C:\STM32\STLink\ST-LINK Utility
set STLINK_EXT_FLASH_LOADER=%ST-LINK_Utility_Path%/ExternalLoader/N25Q128A_STM32F746G-DISCO.stldr

 

This is my installation:

 

 

Compiling ../../Source/main.c
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -O2 -Wall -mcpu=cortex-m7 -mlittle-endian -mthumb -mthumb-interwork -mfpu=fpv5-sp-d16 -mfloat-abi=hard -DSTM32F746xx -DUSE_STM32746G_DISCO -DEW_MAX_SURFACE_CACHE_SIZE=0x200000 -DEW_MAX_GLYPH_SURFACE_WIDTH=256 -DEW_MAX_GLYPH_SURFACE_HEIGHT=256 -DEW_FRAME_BUFFER_COLOR_FORMAT=EW_FRAME_BUFFER_COLOR_FORMAT_RGB565 -DEW_USE_DOUBLE_BUFFER=1 -DEW_SURFACE_ROTATION=0 -DEW_CPU_LOAD_MEASURING=1 -DEW_USE_FREE_RTOS=0 -DEW_USE_QSPI_FLASH=1 -I../../Source -I../../../Misc -I../../../TargetSpecific -I../../GeneratedCode -I../../../PlatformPackage/RTE -I../../../PlatformPackage/RGB565 -IC:\STM32\STM32Cube_FW_F7/Drivers/CMSIS/Device/ST/STM32F7xx/Include -IC:\STM32\STM32Cube_FW_F7/Drivers/CMSIS/Include -IC:\STM32\STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Inc -IC:\STM32\STM32Cube_FW_F7/Drivers/BSP/STM32746G-Discovery -IC:\STM32\STM32Cube_FW_F7/Drivers/BSP/Components/Common -IC:\STM32\STM32Cube_FW_F7/Drivers/BSP/Components/ft5336 -o Obj/main.o ../../Source/main.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Obj/main.o] Error 2

1 Answer

0 votes
answered Feb 25, 2018 by Manfred Schweyer

Hi,

Can you please check the following:

Open the console window (StartBuildEnvironment.bat) and insert the following:

arm-none-eabi-gcc --version

What is the output?

Best regards,

Manfred.

commented Feb 25, 2018 by krunal2411

Hi,

Thanks for the fast reply.

I got this:

 

commented Feb 25, 2018 by krunal2411

But when I checked with GCC command prompt, I got this:

commented Feb 25, 2018 by Manfred Schweyer
Ok, please let me know the content of your directory C:\STM32\gcc-arm-none-eabi
commented Feb 25, 2018 by krunal2411

I have one folder inside C:\STM32\gcc-arm-none-eabi

named, "7 2017-q4-major"

This is my path:

commented Feb 25, 2018 by Manfred Schweyer

Now it's clear. The path within your devenv.cmd file does not match to the installation.

Move the content of \7 2017-q4-major directly into \gcc-arm-none-eabi and everything should be fine...

Does it work?

commented Feb 25, 2018 by krunal2411
Yes, That worked like a charm.

Thanks a lot for your fast help.

Now, I try to open the project with keil uvision4, but I get this:

"The project file has a newer major version number which is not compatible with this programm version.

Reading project file aborted."

 

Could you please suggest what can be the problem.
commented Feb 25, 2018 by Manfred Schweyer
I assume that your uvision is not compatible / too old version.

We verified it with MDK-ARM 5.24, ARM Compiler 5.06 update 5 (build 528)
commented Feb 25, 2018 by krunal2411
Oh, Ok.

I will try it with GCC then.

Thanks for the help.

Have a good day!

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...