|
Post by GeorgeK on Jul 2, 2019 20:07:17 GMT
Hello,
unfortunately I have not been able to integrate a static library into the project.
No matter how I do it, I always get this error:
error: cannot find ...
The file name and path are correct, however.
As I said, the frustration factor increases.
Does anybody know what I'm doing wrong?
Best regards George
I Use:
HighTec Development Platform Version: 1.6.2.20180424-5144a35
It always comes the error:
"C:\HighTec\toolchains\tricore\v4.9.1.0-infineon-2.0/bin/tricore-gcc" -o "myTest.elf" -T"..\ld\iRAM.ld" @iram.objectlist -Wl,--gc-sections -mcpu=tc27xx -Wl,--mem-holes -Wl,--no-warn-flags -l"C:\Projects\workspace\workspace_myTest\myTest\lib\libmyLib.a" -Wl,-Map="myTest.map" -Wl,--cref -fshort-double -Wl,-n -Wl,--extmap="a" c:/hightec/toolchains/tricore/v4.9.1.0-infineon-2.0/bin/../lib/gcc/tricore/4.9.4/../../../../tricore/bin/ld.exe: error: cannot find -lC:\Projects\workspace\workspace_myTest\myTest\lib\libmyLib.a collect2.exe: error: ld returned 1 exit status make: *** [myTest.elf] Error 1 makefile:33: recipe for target 'myTest.elf' failed
|
|
|
Post by Admin on Jul 3, 2019 9:51:27 GMT
You need to change the library include control in the Project Settings for the linker libraries dialog to "${workspace_loc:/myTest/lib/myLib}"
|
|
|
Post by GeorgeK on Jul 3, 2019 12:53:15 GMT
It does not work, even as a reference it does not work. I do not know what else I can do there.
|
|
|
Post by GeorgeK on Jul 3, 2019 12:55:12 GMT
Maybe they can test the worspace in their environment.
|
|
|
Post by Admin on Jul 3, 2019 13:53:17 GMT
|
|
|
Post by GeorgeK on Jul 3, 2019 16:21:53 GMT
Thank you for the fast answer. Unfortunately, the lib is not included in your workspace. On the one hand, this can be done by calling the tricore-gcc see "C:\HighTec\toolchains\tricore\v4.9.1.0-infineon-2.0/bin/tricore-gcc" -o "myTest.elf" -T"..\ld\iRAM.ld" "src\hello.o" -Wl,--gc-sections -mcpu=tc27xx -Wl,--mem-holes -Wl,--no-warn-flags -Wl,-Map="myTest.map" -Wl,--cref -fshort-double -Wl,-n -Wl,--extmap="a" src and it lacks the -l parameter (-l "C: \ Projects \ workspace \ workspace_myTest \ myTest \ lib \ libmyLib.a" Best regards George If you want to use the lib function sum, there is the following error: C:\Projects\workspace\VonAdmin\workspace_myTest\myTest\iRAM/../src/hello.c:13: error: undefined reference to `sum' I almost believe tricore-gcc has an error, because correct data is passed to the -l parameter Please refer workspace_myTest (2).zip
|
|
|
Post by Admin on Jul 3, 2019 17:42:38 GMT
|
|
|
Post by GeorgeK on Jul 4, 2019 9:33:59 GMT
Hallo Ok, the example works.
I've added a further custom lib by copying it to the lib directory and renaming it (customers.a -> libcustomers.a). Then I entered iRam/customers in "paths and symbols/libraries" and it works. I have two more questions. 1. Give a documentation on how to add libs as described above? 2. I get the following error when I call methods of the customers.lib: taskfkt.obj uses an incompatible TriCore core architecture TC_V1.6.2 (should be TC_V1.6.1).Is there any way I can use this LIB in the Shieldbuddy environment?
I would like to thank you in advance for the good support
George
|
|