Object files location
Moderators: RoccoMarco, lbednarz, tfAteba
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm
Re: Object files location
That side effect can be considered positve tho, having files with same names in the same project is disturbing 
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm
Re: Object files location
Giovanni,
Again, stupid and very low level request, for when you are totally bored, in the default makefiles, $(CHIBIOS)/ext/stm32lib should be added to INCDIR in case default library (USE_FWLIB = yes) is used, or it errors out, and if you disable events, some errors spit around evtimer.h/c, because if undefined EventSource and chEvtBroadcastI, I have put these in #if CH_USE_EVENTS || defined(__DOXYGEN__) blocks here and works, but to make a note.
Do you know that with Chibi I can make smaller result binary than using ST projects cleaned to the basic main(). STs idea for 13k bootloader aint great.
Again, stupid and very low level request, for when you are totally bored, in the default makefiles, $(CHIBIOS)/ext/stm32lib should be added to INCDIR in case default library (USE_FWLIB = yes) is used, or it errors out, and if you disable events, some errors spit around evtimer.h/c, because if undefined EventSource and chEvtBroadcastI, I have put these in #if CH_USE_EVENTS || defined(__DOXYGEN__) blocks here and works, but to make a note.
Do you know that with Chibi I can make smaller result binary than using ST projects cleaned to the basic main(). STs idea for 13k bootloader aint great.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Object files location
Hi,
That directory should not be included IMHO, stm32f10x_conf.h is a per-project configuration file, you should copy it in your application and configure it specifically for your application.
About size, good to know
anyway, I find that library mostly pointless.
Giovanni
That directory should not be included IMHO, stm32f10x_conf.h is a per-project configuration file, you should copy it in your application and configure it specifically for your application.
About size, good to know
Giovanni
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm
Re: Object files location
Ah okay, my bad, will copy it over. I use the lib for flash functions only, not that I can't copy the file and use locally, but I'm on the "don't touch externals unless you plan on comitting the changes back" principle (I will have that principle tested soon, as I'll need to modify the linker script to change startup address and make myself some problems). Not that I ever wrote firmware... I see that in general firmware guys stick to whatever they find working, while I always jump around trying to catch anything new/different 
As for the size... wrote same bootloader with chibi and std, O2 optimizations, chibi was 2.7k, std went to 9.5 and I found nothing more I can strip from the makefile. Size matters
As for the size... wrote same bootloader with chibi and std, O2 optimizations, chibi was 2.7k, std went to 9.5 and I found nothing more I can strip from the makefile. Size matters
Re: Object files location
barthess wrote:It works. One side effect -- if you have files in your project called like ChibiOS files e.g. adc.c or i2c.c than you must rename they to something like my_adc.c to avoid collisions.
This is where I'm stuck at the moment.
Currently on the ChibiOS 2.3.4 trunk. We are using a (read only) library with a log.c file. This is conflicting with the log.c file in ChibiOS, so our compilation can't complete.
The compilation fails with the following error
Code: Select all
target `build/obj/log.o' given more than once in the same rule.
How can this be resolved? There is no possibility for me to change the name of the log.c library.
We checked the $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk and tried to change location where objects are stored, but that didn't work and we don't feel like it to change that every new revision of ChibiOS.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Object files location
Hi,
There is not a log.c file in ChibiOS/RT. Check you makefile for multiple file definitions.
Giovanni
There is not a log.c file in ChibiOS/RT. Check you makefile for multiple file definitions.
Giovanni
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm