Is it possible to pass build symbols to the make file and thus select different scatter file and compiler options ?
As you know debugging with optimization is not really good. I need to debug on a 512KB flash part, and then for release version build for 256KB with optimization.
Debug/Release options
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Debug/Release options
You could make 2 different Makefiles and 2 build configurations in Eclipse, the result is the same.
See the new multi-target demo for an example of how to do that, under /hal/STM32/USB_CDC.
Giovanni
See the new multi-target demo for an example of how to do that, under /hal/STM32/USB_CDC.
Giovanni
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Debug/Release options
You need to checkout the repository trunk, makefiles have been improved.
Giovanni
Giovanni
- FXCoder
- Posts: 384
- Joined: Sun Jun 12, 2016 4:10 am
- Location: Sydney, Australia
- Has thanked: 180 times
- Been thanked: 130 times
Re: Debug/Release options
It's in trunk /testhal/STM32/USB_CDC
If you are using Chibistudio RoccoMarco did a nice article on using Tortoise SVN to keep in sync with trunk.
http://www.playembedded.org/blog/en/201 ... n-chibios/
If you are using Chibistudio RoccoMarco did a nice article on using Tortoise SVN to keep in sync with trunk.
http://www.playembedded.org/blog/en/201 ... n-chibios/
Re: Debug/Release options
Changing to the trunk would be a task at the moment as i've got afew bits in lower level drivers changed.
All i was thinking was maybe :
have too build configs in eclipse, i.e. Debug and Release.
Each one as different # Symbols of which are passed the makefile and then i could
All i was thinking was maybe :
have too build configs in eclipse, i.e. Debug and Release.
Each one as different # Symbols of which are passed the makefile and then i could
Code: Select all
# Compiler options here.
ifeq ($(USE_OPT),)
ifeq ($(RELEASE_BUILD),1)
USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
else
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
endif
endif
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Debug/Release options
Giovanni wrote:Environment variables are passed to make, you may use that.
Giovanni
please forgive my ignorance, but where in eclipse would i add these ?
C/C++ Build->Build Variables ?
C/C++ Build->Environment ?
C/C++ General->Paths and Symbols ?
Not sure you see
Who is online
Users browsing this forum: No registered users and 13 guests