components.mk and adding files to make

Jorge.ar
Posts: 5
Joined: Wed Oct 16, 2019 11:31 am

components.mk and adding files to make

Postby Jorge.ar » Thu Oct 24, 2019 12:12 am

Hello! Another newbie question. I'm using app-template and I want to start adding .c and .h files to my project.

I added a src folder inside the main folder, then inside my .c and .h.
In my main program, I added my library this way: include "src/xxxxxh"

Image

When I start building with make flash, the program compiles but fail to link. I don-t see in the build folder my libraries. according to the component.mk file, as long as I use a folder named "src", everything should work. But it doesnt. Am I missing some config file?


Code: Select all

jorge@jorge-Inspiron-7559:~/esp/modem-wifi-sigfox$ make flash
Toolchain path: /home/jorge/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /home/jorge/esp/esp-idf/requirements.txt are satisfied.

App "app-template" version: e66e153-dirty
CC build/main/main.o
AR build/main/libmain.a
Generating libmain.a.sections_info
Generating esp32.project.ld
LD build/app-template.elf
/home/jorge/esp/modem-wifi-sigfox/build/main/libmain.a(main.o):(.literal.app_main+0x14): undefined reference to `jtz_sigfox_init'
/home/jorge/esp/modem-wifi-sigfox/build/main/libmain.a(main.o): In function `app_main':
/home/jorge/esp/modem-wifi-sigfox/main/main.c:80: undefined reference to `jtz_sigfox_init'
collect2: error: ld returned 1 exit status
/home/jorge/esp/esp-idf/make/project.mk:482: recipe for target '/home/jorge/esp/modem-wifi-sigfox/build/app-template.elf' failed
make: *** [/home/jorge/esp/modem-wifi-sigfox/build/app-template.elf] Error 1
jorge@jorge-Inspiron-7559:~/esp/modem-wifi-sigfox$ 
thanks

ESP_Alvin
Posts: 195
Joined: Thu May 17, 2018 2:26 am

Re: components.mk and adding files to make

Postby ESP_Alvin » Thu Oct 24, 2019 1:16 am

Hi Jorge.ar,

Thanks for the post, please help note that the picture in the post is broken, thanks.

Alvin

Jorge.ar
Posts: 5
Joined: Wed Oct 16, 2019 11:31 am

Re: components.mk and adding files to make

Postby Jorge.ar » Thu Oct 24, 2019 11:23 pm

Sorry, this is the capture.
Screenshot from 2019-10-23 21.05.36@2x.png
Screenshot from 2019-10-23 21.05.36@2x.png (171.31 KiB) Viewed 3401 times
thanks !!

Jorge.ar
Posts: 5
Joined: Wed Oct 16, 2019 11:31 am

Re: components.mk and adding files to make

Postby Jorge.ar » Tue Oct 29, 2019 11:55 pm

Please, some help :cry: :cry:

thanksss

Who is online

Users browsing this forum: Hamzah Hajeir and 171 guests