Page 1 of 1
adding own c files [SOLVED]
Posted: Fri Oct 02, 2015 4:03 pm
by Che.
hi,
i want to add my own c files to the project.
after coding the function in a new c file in drivers>src i added a .h file.
when running "make CLOAD" i get the error "undefined reference to `myFunction'.
what am i doing wrong?
thanks for all answers.
Greets, Che.
Re: adding own c files
Posted: Mon Oct 05, 2015 12:12 pm
by vivekrk44
In the folders there is the MakeFile which needs to be updated. If you tell me your file names ill show you what to update and where
Re: adding own c files
Posted: Thu Oct 08, 2015 5:01 pm
by Che.
vivekrk44 wrote:In the folders there is the MakeFile which needs to be updated. If you tell me your file names ill show you what to update and where
hi vivekrk44,
lets name the file "example.c" with an "example.h".
the code in the makefile looks very confusing to me, tutorials i found on google seem very extensive.
i would be happy if you had a short "steps to do"-instruction. i know i am asking for a big favor, thank you in advance!
Re: adding own c files
Posted: Mon Oct 12, 2015 3:36 pm
by Che.
i worked it out already.
1.) simply go to the "makefile" in the project explorer in eclipse in crazyflie-firmware folder (double click)
2.) browse to #########Source files configuration############
3.) just add your modulename in the appropriate line in the same pattern as the other modules are implemented.
for example:
... example.o
hope that helps anyone.
greets,
Che