Hilscher Gesellschaft fuer Systemautomation mbH
Q: The example fails to link using the Hitop debugger. The Build-Log shows this errormessage:
arm-hitex-elf-ld.exe -T.\netX.ld -static -lc -lm -lgcc -map=output/example.map -o .\output\profibus-slave.elf
arm-hitex-elf-ld: cannot find -lgcc
A: This is a known problem of the Hitex Tools. The solution is described in the QG_ARM-Starterkit-Hilscher-netX-CD_E.pdf, page 17. This file is installed with the Hitop suite and resides in the following subdirectory of your hitop installation: 'TantinoARM7-9\Help\Quickstart_starterkits\pdf\'.
Here's a summary: The Hitop installation of the Gnu Compiler scatters the libraries over several directories. The file 'netx.lnk' contains several entries to search these locations.
Please open the example's 'netx.lnk' file with your favourite editor. Here is the relevant part of the file:
SEARCH_DIR("C:\My tools\arm-hitex-elf\lib\interwork")
SEARCH_DIR("C:\My tools\lib\gcc\arm-hitex-elf\4.0.0\interwork")SEARCH_DIR("C:\Program Files\Hitex\GnuToolPackageArm\arm-hitex-elf\lib\interwork")
SEARCH_DIR("C:\Program Files\Hitex\GnuToolPackageArm\lib\gcc\arm-hitex-elf\4.0.0\interwork")SEARCH_DIR("E:\Programme\Hitex\GnuToolPackageArm\arm-hitex-elf\lib\interwork")
SEARCH_DIR("E:\Programme\Hitex\GnuToolPackageArm\lib\gcc\arm-hitex-elf\4.0.0\interwork")
It provides 3 different locations for the libraries, which are all checked by the linker. Let's assume you installed the Gnu Compiler to 'D:\Programme\Hitex\'. A directory 'GnuToolPackageArm' was created there. This location is not listed in the 'netx.lnk' file.
Now that you know where your libraries are, there is no need to search 3 different locations. Replace all of the above listed lines with these entries:
SEARCH_DIR("D:\Programme\Hitex\GnuToolPackageArm\arm-hitex-elf\lib\interwork")
SEARCH_DIR("D:\Programme\Hitex\GnuToolPackageArm\lib\gcc\arm-hitex-elf\4.0.0\interwork")
So the general procedure is:
SEARCH_DIR("Gnu_Compiler_Install_Dir\GnuToolPackageArm\arm-hitex-elf\lib\interwork")
SEARCH_DIR("Gnu_Compiler_Install_Dir\GnuToolPackageArm\lib\gcc\arm-hitex-elf\4.0.0\interwork")
Info: This is a known problem of the Hitex suite. We are working with Hitex on a solution which will 'work out of the box'.