Hello again,
I am trying to build threadx project on arm ds-5 and there are two supplied projects to be built initially: tx and sample_threadx. (I run it on Ubuntu with aarch64-elf 8.3.0 toolchain)
I was able to build tx successfully which provided me with libtx.a file.
When I am trying to build the sample_threadx project, it gives me the following error.
Invoking: GCC C Linker 8.3.0 [aarch64-elf]aarch64-elf-gcc -T "../sample_threadx.ld" -L"/home/mariag/eclipse-workspace/threadx_projects/tx" --specs=aem-ve.specs -o "sample_threadx.axf" ./GICv3_gicd.o ./GICv3_gicr.o ./MP_Mutexes.o ./sample_threadx.o ./sp804_timer.o ./startup.o ./timer_interrupts.o ./v8_aarch64.o ./v8_utils.o ./vectors.o -ltx /home/mariag/ARMDS_ws/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/../lib/gcc/aarch64-elf/8.3.0/../../../../aarch64-elf/bin/ld: cannot find -ltxcollect2: error: ld returned 1 exit statusmake: *** [makefile:45: sample_threadx.axf] Error 1"make -j20 all" terminated with exit code 2. Build might be incomplete.
Invoking: GCC C Linker 8.3.0 [aarch64-elf]
aarch64-elf-gcc -T "../sample_threadx.ld" -L"/home/mariag/eclipse-workspace/threadx_projects/tx" --specs=aem-ve.specs -o "sample_threadx.axf" ./GICv3_gicd.o ./GICv3_gicr.o ./MP_Mutexes.o ./sample_threadx.o ./sp804_timer.o ./startup.o ./timer_interrupts.o ./v8_aarch64.o ./v8_utils.o ./vectors.o -ltx
/home/mariag/ARMDS_ws/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/../lib/gcc/aarch64-elf/8.3.0/../../../../aarch64-elf/bin/ld: cannot find -ltx
collect2: error: ld returned 1 exit status
make: *** [makefile:45: sample_threadx.axf] Error 1
"make -j20 all" terminated with exit code 2. Build might be incomplete.
I assume that I am supposed to provide the path to the library that was created for the threadx. I go to the properties - C/C++ Build - GCC C Linker - Libraries. I am able to specify the path there, but it does not pick up the libtx.a after when I build the project. It automatically had the "tx" library there, as you can see in the command line below (-ltx option for the linker). Could you let me know what is the correct way to link the library in arm ds, what am i doing wrong?
Hello, have you specified the path to the library, with -L<path> (upper case) or --library-path=<path>?
As an aside, is there a reason why you are using the gcc build? I assume you are using the examples from here, which also provided Arm Compiler for Embedded (ac6) builds, which 'just work' with Arm tools:https://github.com/azure-rtos/threadx/tree/master/ports
Also, you mention you are using DS-5. The latest Arm tools are Arm Development Studio:https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio