- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ported code from my MT 1.1 into an empty project. It compiled fine on MT 1.1. I am getting errors that look like it can't find routines in the floating point libs when it links. I have included math.h
#include "CN0397.h"
#include "SPI_Comm.h"
#include "AD7798.h"
#include <math.h>
#include "sparcommon.h"
#include "wiced_bt_dev.h"
#include "wiced_bt_trace.h"
#include "wiced_hal_gpio.h"
#include "wiced_rtos.h"
#include "wiced_platform.h"
These are the errors that I am seeing
Linking output file EmptyWicedBluetooth.elf
C:/Users/mike/mtw2_0/CN0397/template/empty_wiced_bt/build/CYW920819EVB-02/Debug/cn0397.o: In function `CN0397_DisplayData':
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:111: undefined reference to `__aeabi_f2uiz'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:111: undefined reference to `__aeabi_fmul'
C:/Users/mike/mtw2_0/CN0397/template/empty_wiced_bt/build/CYW920819EVB-02/Debug/cn0397.o: In function `CN0397_ConvertToVoltage':
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:146: undefined reference to `__aeabi_i2d'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:146: undefined reference to `__aeabi_dmul'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:146: undefined reference to `__aeabi_d2f'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:146: undefined reference to `__aeabi_fdiv'
C:/Users/mike/mtw2_0/CN0397/template/empty_wiced_bt/build/CYW920819EVB-02/Debug/cn0397.o: In function `CN0397_SetBar':
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:268: undefined reference to `__aeabi_fcmpgt'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:268: undefined reference to `__aeabi_fadd'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:268: undefined reference to `__aeabi_fcmpge'
C:/Users/mike/mtw2_0/CN0397/template/empty_wiced_bt/build/CYW920819EVB-02/Debug/cn0397.o: In function `CN0397_SetAppData':
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:227: undefined reference to `__aeabi_i2f'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:227: undefined reference to `__aeabi_fmul'
C:\Users\mike\mtw2_0\CN0397\template\empty_wiced_bt/cn0397.c:227: undefined reference to `__aeabi_fdiv'
Is there something that I need to add to the linker config?
Thanks,
Mike Roberts
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
Can you please add CY_RECIPE_EXTRA_LIBS+=-lgcc in make file and try rebuild.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MiRo_263836,
Can you please share your project or at least a minimal version of it so that I can debug the issue?
I tried including math.h in MTB 2.0 and using some of the functions defined in math.h and I was able to build the project directly without any errors.
Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any progress on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
Can you please add CY_RECIPE_EXTRA_LIBS+=-lgcc in make file and try rebuild.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With that line in the makefile, it compiles without errors. I removed that line and how it compiles without errors. I have another couple of projects that I need to import that use floating point libs as well. I will try those and see how if they compile without errors.
Thank you. I would never have been able to figure that out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
I have requested our software team to fix this issue.
Sorry for the inconvenience caused for you.
Regards,
Anjana