I am working on developing some unit tests for someone else’s firmware developed using RTEMS 5.3 which is built with arm-rtems-gcc version 7.5.0 and Newlib 7947581 for a Xilinx Zynq device.
The unit test framework tries to create it’s own .elf file out of the test harness code and the firmware function being tested without the remaining firmware code, RTEMS kernel, etc. In essence, it is trying to compile a small bare metal example using the RTEMS gcc compiler.
When it gets to the linking section, I am getting a lot of errors.
One group of errors are undefined references for functions such as __getreent, _Mutex_recursive_Acquire, _Mutex_recursive_Release plus others all of which are referenced to calls from source code in gcc-7.5.0/newlib/stdio. That suggests that the linker is missing a reference to a library but I can’t tell which one.
The other errors relate to the source files in the unit test which report:
error: build/src/main.o uses VFP register arguments, build/test_harness.elf does not
failed to merge target specific data of file build/src/main.o
The compiler and linker are passed -mcpu=cortex-a9 -mfpu-vfpv3 -mfloat-abi=hard
Any ideas on what needs fixing?
-Andy.