Jump to content

Launch STM32F746G-Discovery Template (BareMetal Makefile) in Eclipse CDT.


Victor

Recommended Posts

Hello.

I work in Eclipse CDT. I tried to use "STM32F746G-Discovery Template BareMetal Makefile" but couldn't build it.

I created new eclipse project, based on makefile, came with this template, I changed corresponding settings in makefile. Changed makefile is here....

 

# Possible Targets:	all clean Debug cleanDebug Release cleanRelease

##############################################################################################
# Settings
#

# General settings
	# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
	OPT_OS					= raw32
	OPT_THUMB				= yes
	OPT_LINK_OPTIMIZE		= no
	OPT_CPU					= stm32m7

# uGFX settings
	# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
#	GFXLIB					= ../ugfx
	GFXLIB					= C:\Users\TSV\Desktop\NeonWS\new\ugfx
	GFXBOARD				= STM32F746-Discovery
	GFXDEMO					=
	GFXDRIVERS				=
	GFXSINGLEMAKE			= no

# Special - Required for the drivers for this discovery board.
#STMHAL						= ../STM32F7xx_HAL_Driver
STMHAL						= C:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver

# Special - Required for Raw32
#CMSIS						= ../CMSIS
CMSIS						= C:\Users\TSV\Desktop\NeonWS\new/CMSIS

##############################################################################################
# Set these for your project
#

ARCH     = arm-none-eabi-
SRCFLAGS = -ggdb -O1
CFLAGS   =
CXXFLAGS = -fno-rtti
ASFLAGS  =
LDFLAGS  =

SRC      = main.c

OBJS     = 
DEFS     =
DEFS     = 
LIBS     =
INCPATH  = 

LIBPATH  =
LDSCRIPT = 

##############################################################################################
# These should be at the end
#

include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk
include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk
include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk
# *** EOF ***

Build was finished with errors. Object files aren't created in their directory. The build directory specified as .build in project properties.
Console output is near.

13:19:50 **** Incremental Build of configuration Build (GNU) for project new ****
make all 
.
C Compiler Options....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -IC:UsersTSVDesktopNeonWSnewugfx -IC:UsersTSVDesktopNeonWSnewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWSnew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWSnew/CMSIS/Include -IC:UsersTSVDesktopNeonWSnewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWSnewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o
.
Assembler Options.....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -IC:UsersTSVDesktopNeonWSnewugfx -IC:UsersTSVDesktopNeonWSnewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWSnew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWSnew/CMSIS/Include -IC:UsersTSVDesktopNeonWSnewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWSnewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.s -o .build/obj/fakethumbfile.o
.
Linker Options........
arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -TC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fakethumbfile.o -o .build/new.elf
.
Compiling main.c
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/main.o.d -I. -IC:\Users\TSV\Desktop\NeonWS\new\ugfx -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/3rdparty/tinygl-0.4-ugfx/include -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/boards/base/STM32F746-Discovery -IC:\Users\TSV\Desktop\NeonWS\new/CMSIS/Device/ST/STM32F7xx/Include -IC:\Users\TSV\Desktop\NeonWS\new/CMSIS/Include -IC:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver/Inc -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB main.c -o .build/obj/main.o, ...) failed.
make (e=2): Can not find specified file.

make: *** [.build/obj/main.o] Error 2

13:19:50 Build Finished (took 314ms)

What, I have to change in my project or makefile to build and launch this template in eclipse CDT?

Link to comment
Share on other sites

Hello Victor and welcome too the community!

First of all, can you please make sure that the project compiles fine if you just execute 'make' manually in the project directory using a terminal? This way we can be sure that your project (the paths etc.) are setup correctly and that the problem solely lies in the Eclipse configuration.
We are not providing official support for Eclipse. However, as Eclipse is able to cope with external makefiles this shouldn't be a problem. I have never used Eclipse myself so I won't be of a big help if the project compiles by manually executing 'make' in a terminal. Hopefully somebody else in this community is able to help you.
As far as I remember @inmarket used Eclipse once to build the demos to verify that everything is still working. Maybe he will be able to help.

Other than that I can just guess that it's a path issue. Is it possible that Eclipse uses the root of the directory that you downloaded as a path instead of the project directory where the actual Makefile is located in?

Link to comment
Share on other sites

Eclipse use PATHes specified in Preferences.

Global tool path.jpg

I execute 'make' manually using terminal. It gave the same as eclipse console. See near..

 

C:\Users\TSV\Desktop\NeonWS\new> "C:\Program Files\GNU ARM Eclipse\Build Tools\2
.6-201507152002\bin\make" all
.
C Compiler Options....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=
hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W
extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.
d -I. -IC:UsersTSVDesktopNeonWS
ewugfx -IC:UsersTSVDesktopNeonWS
ewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWS
ewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWS
ew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWS
ew/CMSIS/Include -IC:UsersTSVDesktopNeonWS
ewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWS
ewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSI
nit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE
-DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumb
file.c -o .build/obj/fakethumbfile.o
.
Assembler Options.....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=
hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W
extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.
d -I. -IC:UsersTSVDesktopNeonWS
ewugfx -IC:UsersTSVDesktopNeonWS
ewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWS
ewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWS
ew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWS
ew/CMSIS/Include -IC:UsersTSVDesktopNeonWS
ewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWS
ewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSI
nit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE
-DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumb
file.s -o .build/obj/fakethumbfile.o
.
Linker Options........
arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fp
v4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -TC:UsersTSVDesktopN
eonWS
ewugfx/boards/base/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fak
ethumbfile.o -o .build/new.elf
.
Compiling main.c
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m
7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-con
stant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD
-MP -MF .build/dep/main.o.d -I. -IC:\Users\TSV\Desktop\NeonWS\new\ugfx -IC:\User
s\TSV\Desktop\NeonWS\new\ugfx/3rdparty/tinygl-0.4-ugfx/include -IC:\Users\TSV\De
sktop\NeonWS\new\ugfx/boards/base/STM32F746-Discovery -IC:\Users\TSV\Desktop\Neo
nWS\new/CMSIS/Device/ST/STM32F7xx/Include -IC:\Users\TSV\Desktop\NeonWS\new/CMSI
S/Include -IC:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver/Inc -IC:\Users\
TSV\Desktop\NeonWS\new\ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_I
NIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -
DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mth
umb -DTHUMB main.c -o .build/obj/main.o, ...) failed.
make (e=2): Can not find specified file.
C:\Users\TSV\Desktop\NeonWS\new\ugfx/tools/gmake_scripts/compiler_gcc.mk:242: re
cipe for target '.build/obj/main.o' failed
make: *** [.build/obj/main.o] Error 2

C:\Users\TSV\Desktop\NeonWS\new>

 

Link to comment
Share on other sites

As long as it doesn't compile when executing make in the terminal there's no reason to play around in Eclipse.

Can you please show us the file tree of the path C:\Users\TSV\Desktop\NeonWS\new ?
Also, I assume that you tried make clean just to be sure?

Can you please try to execute make all in the /project directory of the example that you downloaded and unzipped without modifying it at all?

Link to comment
Share on other sites

There is file tree...

FileTree.jpg

I unzipped it to the folder template in my workspace without any changes and execute 'make all'. It seems, the same problem. See terminal out near..

C:\Users\TSV\Desktop\NeonWS\template\project>"C:\Program Files\GNU ARM Eclipse\B
uild Tools\2.6-201507152002\bin\make" all
.
C Compiler Options....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=
hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W
extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.
d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base
/STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/Include -I../CMSIS/Include -
I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DG
FX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_R
AW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERW
ORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o
.
Assembler Options.....
arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=
hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W
extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.
d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base
/STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/Include -I../CMSIS/Include -
I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DG
FX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_R
AW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERW
ORKING -mthumb -DTHUMB fakethumbfile.s -o .build/obj/fakethumbfile.o
.
Linker Options........
arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fp
v4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -T../ugfx/boards/bas
e/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fakethumbfile.o -o .
build/project.elf
.
Compiling main.c
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m
7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-con
stant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD
-MP -MF .build/dep/main.o.d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/inc
lude -I../ugfx/boards/base/STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/In
clude -I../CMSIS/Include -I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/S
TM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_W
ARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB
_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB main.c -o .build/obj/main.o, ..
.) failed.
make (e=2): Can not find specified file.
../ugfx/tools/gmake_scripts/compiler_gcc.mk:242: recipe for target '.build/obj/m
ain.o' failed
make: *** [.build/obj/main.o] Error 2

C:\Users\TSV\Desktop\NeonWS\template\project>

 

Link to comment
Share on other sites

The windows CreateProcess is failing when it tries to start the compiler.

The most obvious reason for that would be that arm-none-eabi-gcc.exe is not on your path. Make sure the directory that contains that compiler is set as part of the eclipse project file environment settings.

Another reason might be that your compiler is failing to run because a dependant dll is missing.

Either way it is your eclipse and toolchain setup that is causing the problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...