makefile problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User16535
Level 1
Level 1
Hi,
I am using AURIX_TC297_TFT and I am having problems with the building.
After following the AURIXâ„¢ Quick Tool Setup Guide and importing the project BaseFramework_TC29xB, when I try to build I get this errors:

**** Incremental Build of configuration Default for project BaseFramework_TC29xB ****
make all
Now the make files are generated !!!
Makefile:18: recipe for target '1_ToolEnv/0_Build/9_Make/0_Src.mk' failed
process_begin: CreateProcess(NULL, sh.exe -c "/../php/php /../php/Scripts/IfxSwFw_GenMake_CSrc.php PROJ_DIR= C:/AurixWorkspace/BaseFramework_TC29xB; DEFAULT_TARGET_TYPE= Tricore; SECOND_TARGET_TYPE= ; THIRD_TARGET_TYPE= ; SPECIAL_TARGET_TYPE= Mcs; TOOLCHAIN_FOR_DEFAULT_TARGET= Gnuc; TOOLCHAIN_FOR_SECOND_TARGET= Tool2ndCpu; TOOLCHAIN_FOR_THIRD_TARGET= Tool3rdCpu; TOOLCHAIN_FOR_SPECIAL_TARGET= Gnuc; USE_FILE_PATTERN= ; DISCARD_FILE_PATTERN= ; EXTERNAL_SRC_FOLDERS= ", ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [1_ToolEnv/0_Build/9_Make/0_Src.mk] Error 2


Can someone please help me?
Thank you
0 Likes
19 Replies
User13290
Level 5
Level 5
First like received First solution authored
Hi Enricol,

enricol wrote:
Hi,
I am using AURIX_TC297_TFT and I am having problems with the building.
After following the AURIXâ„¢ Quick Tool Setup Guide and importing the project BaseFramework_TC29xB, when I try to build I get this errors:

**** Incremental Build of configuration Default for project BaseFramework_TC29xB ****
make all
Now the make files are generated !!!
Makefile:18: recipe for target '1_ToolEnv/0_Build/9_Make/0_Src.mk' failed
process_begin: CreateProcess(NULL, sh.exe -c "/../php/php /../php/Scripts/IfxSwFw_GenMake_CSrc.php PROJ_DIR= C:/AurixWorkspace/BaseFramework_TC29xB; DEFAULT_TARGET_TYPE= Tricore; SECOND_TARGET_TYPE= ; THIRD_TARGET_TYPE= ; SPECIAL_TARGET_TYPE= Mcs; TOOLCHAIN_FOR_DEFAULT_TARGET= Gnuc; TOOLCHAIN_FOR_SECOND_TARGET= Tool2ndCpu; TOOLCHAIN_FOR_THIRD_TARGET= Tool3rdCpu; TOOLCHAIN_FOR_SPECIAL_TARGET= Gnuc; USE_FILE_PATTERN= ; DISCARD_FILE_PATTERN= ; EXTERNAL_SRC_FOLDERS= ", ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [1_ToolEnv/0_Build/9_Make/0_Src.mk] Error 2


Can someone please help me?
Thank you


I've ran across this a couple of times. I think what it means is that you may be missing some runtime libraries from Microsoft. You'll probably get a more proper error message when you run the php utility from the command line. It will tell you which dll is missing and you can then look up the installer on the microsoft website.

Note it can be a bit of a puzzle, but eventually you'll strike a homerun. I myself have the following runtime libraries installed:

Microsoft Visual C++ 2010 x86 Redistributable
Microsoft Visual C++ 2010 x86 Runtime
Microsoft Visual C++ 2012 Redistributable
Microsoft Visual C++ 2012 x86 Additional Runtime
Microsoft Visual C++ 2012 x86 Minimum Runtime
Microsoft Visual C++ 2015 Redistributable (x86)
Microsoft Visual C++ 2015 x86 Additional Runtime
Microsoft Visual C++ 2015 x86 Minimum Runtime

But I don't recall which one you actually need, if not all.

Best regards,

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Running the PHP script from the terminal doesn't provide further information.
I checked and it seems like I have all the libraries installed, but the problem still remains.
Any other suggestions?
3462.attach3462.attach
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Running the PHP script from the terminal doesn't provide further information.
I checked and it seems like I have all the libraries installed, but the problem still remains.
Any other suggestions?
3462.attach3462.attach


Most redistributable's indeed coincide. What happens when you run, the following from a CMD shell:

php -?

From within the BIFACES framework? Presuming you installed it in the default location, you must first change directory to:

C:\BifacesWin32\Php


If all its prerequisites are in place, then it should list its command line options. If not, then I expect Windows will report a message that it cannot find a certain dll.

If there is nothing amiss with the php utility, then I may have misjudged the error message. You say that you import the project. So that means you're running it from within an Eclipse IDE environment. In that case you must make sure to add the BIFACES bin-utilities to your path environment variable. In the BIFACES root there should be a file called StartBifaces.bat and its contents should be:


@SET BINUTILS_PATH=C:\IFX\BifacesWin32\bin
@SET MAKECMD_WITH_APP=C:\HighTec\ide\eclipse-v1.6.1\eclipse.exe

::-----------------------------------------------------
@SET PATH=%BINUTILS_PATH%;%PATH%
@START %MAKECMD_WITH_APP%
@EXIT


Note that the bin utilities are pre-pended, before the IDE is started. Also note that I replaced the BIFACES IDE with the HighTec IDE, but you needn't necessarily do that.

Best regards,

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Ok, thank you.
Now I am able to build the project, but when I connect the board it is not recognized.
I tried using DAS Device Scanner but no "TriCore-Family" device is found.
I am using a micro usb to usb cable (it was not provided with the board)... is it okay or do I need some specific cable?
How can I fix this problem?
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Ok, thank you.
Now I am able to build the project, but when I connect the board it is not recognized.
I tried using DAS Device Scanner but no "TriCore-Family" device is found.
I am using a micro usb to usb cable (it was not provided with the board)... is it okay or do I need some specific cable?
How can I fix this problem?


Connector wise I think you have the correct cable, however you need to bear in mind that some USB cables don't have the data pins wired so they can only be used as a power cable. One way to check this is to connect your board to the USB cable and check if the Windows devices manager enumerates it. You should see a driver popping up called "Infineon DAS JDS DEBUG" as shown in the attached snapshot. If it's not showing then you probably need to look for another cable. The same thing can occur if the board was accidentally bricked, because then it's power will be shutdown briefly after it is reset/connected. I'm guessing that doesn't apply to your case because it's the first time that you're trying to flash the demo application. So I'm only mentioning it to be complete.

Best regards,

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Thanks, with your help I'm finally able to load code to the board.

My problem now is that I cannot debug correctly. I'm using UDE but I am not able to put breakpoints where I want: only on certain lines (the ones with the small circle on the left) can be associated with breakpoints.
The other lines are also skipped when I execute the step-by-step debug.
Please give me some other useful insights.

3485.attach
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Thanks, with your help I'm finally able to load code to the board.

My problem now is that I cannot debug correctly. I'm using UDE but I am not able to put breakpoints where I want: only on certain lines (the ones with the small circle on the left) can be associated with breakpoints.
The other lines are also skipped when I execute the step-by-step debug.
Please give me some other useful insights.

3485.attach


Good to read that you've got things sorted and that you're well on your way. Debuggers, compiler optimisations and compiler debug information, aren't always the very best of friends. With low grades of optimisation stepping your source code is pretty much as expected. However as soon as you start revving the engine, things become complicated. The compiler may for example find a way of re-arranging assembly or conclude that it may be dropped. It may start jump-tailing calls or inline tiny functions. Sometimes it will reverse inline functions for duplicate patterns of assembly. It will also optimise some of your variables into registers such that they no longer exist in memory or on your stack. As soon as that happens there may no longer be assembly associated to a source level step. This is moment when step-markers start disappearing from your debugger view. Or you can't set watches on some of your variables. Or your stacktrace becomes a little harder to trace. So typically higher grades of optimisation are postponed until the release phase and lower levels of optimisation are used during development cycles.

I see you're making use of iLLD sample projects. Try changing (=lowering) `-02` (Config_Gnuc.mk) to `-01` and try again. If it doesn't give you the desired behaviour, drop it even further to `-00`. If yet again still things look rather odd, try changing the definition of IFX_INLINE (CompilerGnuc.h) to and empty one. That should improve things.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
I tried as you said, but changing the level of optimization results in the following building error:

3488.attach

How can I address this problem?
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
I tried as you said, but changing the level of optimization results in the following building error:

3488.attach

How can I address this problem?


This problably has the same cause as discussed in this posting. Since those are different tools, rather than looking in Lcf_Tasking.lsl you need apply the offered solution to Lcf_Gnuc_Tricore_Tc.lsl instead.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Thanks, this solved the problem!
Now, how can I print in the UDE simulated I/O?
If I put a printf in core0_main, the memtool doesn't complete the loading (image below) and when I start debugging the IDE ask me the location of file "vio_virtio.c" and if I give it, the debugging session get stuck into that function.
I searched in this forum but I didn't find any solution.

3490.attach
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Thanks, this solved the problem!
Now, how can I print in the UDE simulated I/O?
If I put a printf in core0_main, the memtool doesn't complete the loading (image below) and when I start debugging the IDE ask me the location of file "vio_virtio.c" and if I give it, the debugging session get stuck into that function.
I searched in this forum but I didn't find any solution.

3490.attach


Nice one. You'll need to study chapter 5.3 of this application note. Chapter 5.4 subsequently shows how to enable to simulated IO debug window, but I guess you already figured that one out.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Got it!
The other problem related to debugging that I'm experiencing is that sometimes, when I'm debugging, at a certain time the program stops on the instruction reported below (instead of continuing with the execution):

3492.attach

What is causing it?
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Got it!
The other problem related to debugging that I'm experiencing is that sometimes, when I'm debugging, at a certain time the program stops on the instruction reported below (instead of continuing with the execution):

3492.attach

What is causing it?


Looks like you're running into a trap. Traps indicate a hardware violation which, in your case, seem to have a spurious nature.

What you have todo is to find out the trap class. Typically trap handlers halt the target by means of a debug instruction (IfxCpu_Trap.c). When that happens you will be able to read its halted vector address from the disassembly window of your debugger. The trap class is then established using the following formula:

class = (trap address - BTV)/32

Where BTV is the start address of the vector table. The trap class, combined with the trap identification number (called TIN) will provide additional hints of what type of error is triggering it. The TIN typically resides in register D15 when the trap handler is hit. You will have to consult table 6.1 of the Infineon tricore architecture manual (volume 1) to find out which specific trap definition has been triggered.

You will also have to try and find out where the PC is located at the precise moment the trap is being triggered. You can do this by consulting the stacktrace window when the trap has been hit. That will give you the precise instruction that causes the trap and combined with the trap definition it should give you a pretty good feel of what's going wrong, and hence how to solve it.

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
Thanks.
Besides, do you know if it is possible to use the wake button as a general purpose button? How can I override its ISR?
I checked in the documentation but I wasn't able to find what I was searching for.
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
Thanks.
Besides, do you know if it is possible to use the wake button as a general purpose button? How can I override its ISR?
I checked in the documentation but I wasn't able to find what I was searching for.


Judging from the PCB schematics and datasheet this is not possible; switch S102 is dedicated to the TLF35584 voltage regulator.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
User16535
Level 1
Level 1
I thought the same, but I wanted to be sure.

I also wanted to use the iom demo, but it seems like in the folder "iLLD_1_0_1_9_0_TC2xx_Drivers_And_Demos_Release" provided there are some missing files (IfxIom_Iom.h and Iom/Iom/IfxIom_Iom.h).
Do you know where I can find these missing pieces?
0 Likes
User13290
Level 5
Level 5
First like received First solution authored
enricol wrote:
I thought the same, but I wanted to be sure.

I also wanted to use the iom demo, but it seems like in the folder "iLLD_1_0_1_9_0_TC2xx_Drivers_And_Demos_Release" provided there are some missing files (IfxIom_Iom.h and Iom/Iom/IfxIom_Iom.h).
Do you know where I can find these missing pieces?


Sorry, I don't. Maybe someone else knows. Alternatively you can run it by your local Infineon representative. Perhaps they can help.

Best regards,

Henk-Piet Glas

Principal Technical Specialist
Embedded Software
0 Likes
lock attach
Attachments are accessible only for community members.
User16535
Level 1
Level 1
I sent many email but no one is answering... is there any way you can help me?

I found the attached library but it is related to the hightech toolchain, instead I am using the baseframeworks provided by the myicp webpage.
I tried to port that library to my current environment but ,even if it compiles correctly, nothing works at execution time .

Thanks in advance
0 Likes
User19938
Level 1
Level 1
I am encountering same problems, anyone could help me with this?
0 Likes