__aeabi_d2iz

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

__aeabi_d2iz

Jump to solution
6,104 Views
johnstrohm
Contributor III

We are using Code Warrior 10.6 for a Kinetis K51DN512.  Our project is in C++.

 

I can compile all of our code.  When it attempts to link, the linker errors out, with:

 

C:/Freescale/CW MCU v10.6/MCU/ARM_GCC_Support/ewl/lib/armv7e-m\libm.a(ansi_fp.o): In function `__num2dec':

ARM_GCC_Support/ewl/EWL_C/src/math/ansi_fp.c:1254: undefined reference to `__aeabi_d2iz'

 

Obviously, I am missing a library somewhere, but which library, and where?

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
4,684 Views
johnstrohm
Contributor III

One of our other guys found something.

__aeabi_d2iz lives in libgcc.a.

libgcc.a must be linked *AFTER* libm.a.

Adding "gcc" to the Linker | Libraries | Libraries pane after "m" fixed the problem.

We had a -lgcc in the Miscellaneous Linker Flags pane, which apparently caused libgcc.a to be linked BEFORE libm.a.

View solution in original post

0 Kudos
Reply
7 Replies
4,684 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi John,

In menu Project > Properties > C/C++ Build > Settings > ARM Ltd Windows GCC C++ Compiler > Directories add "${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include" and put the below paths at the end of the Compiler Directories list.

o "${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include"

o "${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C/include"

Then in menu Project > Properties > C/C++ Build > Librarian check "Enable automatic library configurations" and choose "Model" = ewl_c++ / int / int.

Best regards,

Carlos

0 Kudos
Reply
4,684 Views
johnstrohm
Contributor III

NO JOY.

Here are my current compiler include paths:

"C:\PVCS\Code\Throw Away Code\dradonly 5494711 Interface Adapter Operational SW\project\include"

"c:\Users\john_strohm\Desktop\freescale_50_usb_files\usb_core\"

"${ProjDirPath}/Project_Headers"

"${ProjDirPath}/Project_Settings/Startup_Code"

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/EWL_C++/include"

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/EWL_C/include"

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/EWL_Runtime/include"

"${ProjDirPath}/Generated_Code"

"${ProjDirPath}/Sources"

"${ProcessorExpertPath}/lib/Kinetis/iofiles"

"${ProcessorExpertPath}/lib/Kinetis/pdd/inc"

"${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include"

"${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C/include"

Librarian settings are as specified.

I still get:

DescriptionResourcePathLocationType
mingw32-make: *** [dradonly.elf] Error 1dradonlyC/C++ Problem
ARM_GCC_Support/ewl/EWL_C/src/math/ansi_fp.c undefined reference to `__aeabi_d2iz'dradonlyline 1254C/C++ Problem
0 Kudos
Reply
4,684 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi John,

We'd need to reproduce this issue. Would you be so kind to submit a Service request at www.freescale.com/support and let us have a project (as simple as possible) where we can reproduce this behavior?

Best regards,

Carlos

Technical Support Engineer

0 Kudos
Reply
4,685 Views
johnstrohm
Contributor III

One of our other guys found something.

__aeabi_d2iz lives in libgcc.a.

libgcc.a must be linked *AFTER* libm.a.

Adding "gcc" to the Linker | Libraries | Libraries pane after "m" fixed the problem.

We had a -lgcc in the Miscellaneous Linker Flags pane, which apparently caused libgcc.a to be linked BEFORE libm.a.

0 Kudos
Reply
4,684 Views
Carlos_Musich
NXP Employee
NXP Employee

Thank you for sharing the answer John.

May I ask you to share a picture of your linker settings? This way other members may find this thread very useful.

Best regards,

Carlos

0 Kudos
Reply
4,684 Views
johnstrohm
Contributor III

linker1.bmp

linker2.bmp

linker3.bmp

linker4.bmp

4,684 Views
Carlos_Musich
NXP Employee
NXP Employee

Thank you!

0 Kudos
Reply