CrossWorks ARM, Manually adding a runtime library to a project.
We have our own RTOS and standard I/O library.
When I go to create a new project intended to link with our RTOS, then I un-check Library_Options->Include_Standard_Libraries so I don't get a lot of redefined symbols like memcpy, malloc and such. However, then I get errors like "undefined reference to __eabi_uidiv" and such.
So what I found is that I have to manually add the missing runtime lib using Linker_Options->Additional_Input_File, something like "/usr/share/crossworks_for_arm_2.3/lib/libc_v4t_a_le_eabi_small.a" and then everything is good.
So my question is; What is the macro, if any, that defines the "/usr/share/crossworks_for_arm_2.3/lib" part such that the project file can work on either windows or linux?
Or perhaps my question should be, is there a way to do this that makes more sense?
Thanks!
--Mike
-
I don't have the IDE open in front of me at the moment, but missing __eabi_uidiv and others are from libgcc. There is an option to not include standard libraries, but there should also be another option to include gcc libraries. Alternatively, if you can add options to the linker command line, adding -lgcc should get you going.
-
So my question is; What is the macro, if any, that defines the "/usr/share/crossworks_for_arm_2.3/lib" part such that the project file can work on either windows or linux?
Use Project > Macros and you'll see the list of system macros. You should then be able to work out that the prefix can be $(StudioDir)/lib.
Please sign in to leave a comment.
Comments
3 comments