cancel
Showing results for 
Search instead for 
Did you mean: 

Makefile path

AVajd
Associate II

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!

14 REPLIES 14

@Martin KJELDSEN​ Any more info on this? I've reproduced it following the same steps, create a blank STM32L4R9I project and attempt to modify the simulator makefile results in TouchGFX designer overwriting the makefile every time. I'm fairly stuck at this point. -- thanks, Paul

Can you show me some code or send me the project or something? Doesn't happen for me.

What you could do is copy the makefile -> PaulsMakefile and modify the post generate command in your .touchgfx file. Modify PaulsMakefile as you wish.

    "GenerateAssetsCommand": "make -f simulator/gcc/PaulsMakefile assets -j8",
    "CompileSimulatorCommand": "make -f simulator/gcc/PaulsMakefile -j8",

@Martin KJELDSEN​ I wanted to try a fresh project template, I get the same results.

Are you suggesting editing the .touchgfx project OR go to "config" and set the build settings to a different makefile? I suspect it is the same other than one creates an "override" entry in the .touchgfx project file.

Either way, if you change the makefile to anything else, the project will not generate code.

Steps to reproduce.

  • copy makefile -> newmakefile (no modifications)
  • in "config" change the two settings to use the newmakefile
  • click "generate code"

Project fails to build.

edit the .touchgfx file to alter these commands - What does "fails to build" mean?

@Martin KJELDSEN​ Thanks for all of the help on this, i do appreciate it.

I think I understand the issue.

There is a makefile for the simulator in the generated folder which gets regenerated and thus cannot be edited without loosing the edits.

There is also a makefile in touchGFX/simulaotr/gcc folder which can be edited to add additional source files and header file paths.

I have further work to do on this, but I believe the place for the edits is in the above file.

Paul