Skip to main content
AVajd
Associate II
April 5, 2019
Question

Makefile path

  • April 5, 2019
  • 14 replies
  • 3868 views

Hello!

I have created a new folder. It's called sensor. In this folder I put a .c and .h file.

I also modified the Makefile this way:

components := TouchGFX/gui target TouchGFX/generated/gui_generated sensor

But I get the following error:

Compiling Core/Src/main.cpp

Core/Src/main.cpp:63:27: fatal error: sensor/bmp180.h: No such file or directory

 #include "sensor/bmp180.h"

              ^

compilation terminated.

gcc/Makefile:360: recipe for target 'TouchGFX/build/ST/STM32F769I-DISCO/Core/Src/main.o' failed

make[2]: *** [TouchGFX/build/ST/STM32F769I-DISCO/Core/Src/main.o] Error 1

gcc/Makefile:327: recipe for target 'generate_assets' failed

make[1]: *** [generate_assets] Error 2

../gcc/Makefile:45: recipe for target 'all' failed

make: *** [all] Error 2

Can you tell me how to make it work?

Thank you very much!

This topic has been closed for replies.

14 replies

Martin KJELDSEN
Principal III
April 8, 2019

The "components" expect a certain structure that we define - But can be used to quickly add header and source files. Sometimes you're using a third party lib that does not follow this structure.

You can then just modify the include paths and source paths to include the "sensor" folder.

RHug.1
Associate II
February 28, 2020

What is the expected Strucutre? I am also planning to add a 3rd party lib

PDeck.2281
Associate
February 26, 2020

Touchgfx 4.13.0

@Martin KJELDSEN​ 

I'm trying to add an include path to the simulator makefile in "generated\simulator\gcc\Makefile" Whenever I add or make changes to the makefile, it is regenerated and my changes are gone. In reality, this include path should be for all targets. There are three Makefiles in the directory structure: 1. "generated\simulator\gcc\makefile", 2. "simulator\gcc\Makefile" and 3. "target\gcc\Makefile"

Where and how to add additional include and source directories for all builds, both simulator and target?

PDeck.2281
Associate
February 27, 2020

@Martin KJELDSEN​ I finally figured this out, it appears I can make the path changes to the app.mk file and include the app.mk file which is included in the simulator makefile. I can then add include app.mk to the target makefile. after that, any path changes I can add to app.mk and both simulator and target will be updated.