we have an existing C-Multi-Project. One project for board specific implementation, one project for "kernel" implemenation and one for the application. The board and kernel project are compiled to a library and included in the application project which generates the hex-file when compiling.
Till now we used the Compiler Version 5.06. Now i wanted to update to Compiler Version 6.12. I got some Warnings and Errors and corrected them. Now there's one last error and i couldn't find a solution for it...
The error message is:
.\Objects\application_bang2.axf: Error: L6218E: Undefined symbol __libc_fini_array (referred from rtx_conf_cm.o)..\Objects\application_bang2.axf: Error: L6218E: Undefined symbol __libc_init_array (referred from rtx_conf_cm.o).Not enough information to list image symbols.Not enough information to list load addresses in the image map.
The Target is STM32L4A6RGTx, uVision V5.28, we DON'T use the microlib, language C is C99, language C++ is c++11 (but we use no C++ in our project), the Keil RTX is also included as library (RTX_CM4.lib).
I already did a lot of internet research, but didn't find a solution or the root cause of the problem. Often i read that libc_init_array initializes C++ objects at startup, but we don't use any C++ in our project...
Has anyone an idea in which direction i should search or had similiar problems?
Thanks for your help in advance!
I think you are using the old CMSIS RTOS1 (RTX4) which is not being maintained anymore.
Please update to the latest CMSIS RTOS2 (RTX5) to see if this is resolved.
FYI, below link should be helpful (check section Level 3):www.keil.com/.../os2MigrationGuide.html
thanks for your input! Yes, that's true. We're using CMSIS V1 with RTX 4.80.
I will try to upgrade to RTX5 with CMSIS V1 according the migration guide.
A switch to CMSIS V2 isn't possible at the moment, because older C-multi-projects (with RTX4.80) are also using the "kernel" project and are already tested and in use...
So i will try to do the upgrade and report result here!
Hi Patrick, yes, you need the RTX 4.81, as only there the provisions for Arm Compiler 6 were added. See the Revision History here:
The actual issue for this __libc_init_array link problem is just the RTX_CM_lib.h header file, that were not prepared for the ARM compiler 6. As the ARM Compiler 6 does set the __GNUC__ macro, some GCC assembly code got pulled in, that calls __libc_init_array, which is not part of the ARM runtime library. You should see this when checking your version of the RTX_CM_lib.h
Thanks for your input!
You're right. I tried it with RTX 4.82 and the compiling and linking worked.
Meanwhile i also did the migration to RTX5 (Level 2 Migration) that i can use RTX4 for the old projects and RTX5 for the new projects and it also works.
Thank you all for your help!
Hi PatrickI would like to correct my previous response.The CMSIS RTOS-1 (starting from v4.81) and CMSIS RTOS-2 APIs are compiler independant and thus should be supported with both AC5 and AC6
View all questions in Keil forum