ubuntu 16.04 x64 - WICED SDK 3.7.0.3 math_newlib.c error workaround

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
crhoc_2121991
Level 2
Level 2
First like received Welcome!

I found mentions of this problems with previous SDKs. Here's the workaround to get 3.7.0.3 running.

Here's the error with ubuntu 16.04 x64 - WICED SDK 3.7.0.3

holla@hendrix[511]: cd WICED-SDK-3.7.0-3/

holla@hendrix[512]: ./make snip.https_client-BCM943341WCD1

Host is Linux64

MAKEFILE MAKECMDGOALS=snip.https_client-BCM943341WCD1 OTA2_SUPPORT is disabled

Building Bootloader

WICED/platform/GCC/math_newlib.c: In function 'sin':

WICED/platform/GCC/math_newlib.c:30:5: internal compiler error: Illegal instruction

     x -= ( (int) ( x / ( 2 * PI ) ) ) * 2 * PI;

     ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

make[3]: *** [build/waf.bootloader-NoOS-BCM943341WCD1/Modules/WICED/platform/GCC/math_newlib.o] Error 1

make[3]: *** Waiting for unfinished jobs....

make[2]: *** [main_app] Error 2

make[1]: *** [bootloader] Error 2

make: *** [main_app] Error 2

Here's my workaround

apt install gcc-arm-none-eabi

now compile with

./make snip.https_client-BCM943341WCD1 TOOLCHAIN_PATH=/usr/bin/

holla@hendrix[526]: ./make snip.https_client-BCM943341WCD1 TOOLCHAIN_PATH=/usr/bin/

MAKEFILE MAKECMDGOALS=snip.https_client-BCM943341WCD1 OTA2_SUPPORT is disabled

Building Bootloader

Finished Building Bootloader

Processing resources

Creating security credentials

Making DCT image

Compiling App_HTTPS_Client

Compiling Platform_BCM943341WCD1

Compiling WICED

Compiling Lib_HTTP_client

Compiling Lib_SPI_Flash_Library_BCM943341WCD1

Compiling Lib_GPIO_button

Compiling WWD_ThreadX_Interface

Compiling WICED_ThreadX_Interface

Compiling WWD_for_SDIO_ThreadX

Compiling Supplicant_BESL

Compiling Lib_DNS

Compiling NetX_Duo

Compiling Lib_Wiced_RO_FS

Compiling STM32F4xx

Compiling Lib_base64

Compiling Lib_TLV

Compiling Lib_Linked_List

Compiling Lib_crypto_open

Compiling Lib_micro_ecc

Compiling WWD_NetX_Duo_Interface

Compiling WICED_NetX_Duo_Interface

Compiling common_GCC

Compiling STM32F4xx_Peripheral_Drivers

Compiling Lib_Ring_Buffer

Compiling Lib_crc

Compiling Lib_DHCP_Server

Compiling STM32F4xx_Peripheral_Libraries

Making build/snip.https_client-BCM943341WCD1/libraries/App_HTTPS_Client.a

Making build/snip.https_client-BCM943341WCD1/libraries/Platform_BCM943341WCD1.a

Making build/snip.https_client-BCM943341WCD1/libraries/WICED.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_HTTP_client.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_SPI_Flash_Library_BCM943341WCD1.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_GPIO_button.a

Making build/snip.https_client-BCM943341WCD1/libraries/WWD_ThreadX_Interface.a

Making build/snip.https_client-BCM943341WCD1/libraries/WICED_ThreadX_Interface.a

Making build/snip.https_client-BCM943341WCD1/libraries/WWD_for_SDIO_ThreadX.a

Making build/snip.https_client-BCM943341WCD1/libraries/Supplicant_BESL.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_DNS.a

Making build/snip.https_client-BCM943341WCD1/libraries/NetX_Duo.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_Wiced_RO_FS.a

Making build/snip.https_client-BCM943341WCD1/libraries/STM32F4xx.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_base64.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_TLV.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_Linked_List.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_crypto_open.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_micro_ecc.a

Making build/snip.https_client-BCM943341WCD1/libraries/WWD_NetX_Duo_Interface.a

Making build/snip.https_client-BCM943341WCD1/libraries/WICED_NetX_Duo_Interface.a

Making build/snip.https_client-BCM943341WCD1/libraries/common_GCC.a

Making build/snip.https_client-BCM943341WCD1/libraries/STM32F4xx_Peripheral_Drivers.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_Ring_Buffer.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_crc.a

Making build/snip.https_client-BCM943341WCD1/libraries/Lib_DHCP_Server.a

Making build/snip.https_client-BCM943341WCD1/libraries/STM32F4xx_Peripheral_Libraries.a

Making snip.https_client-BCM943341WCD1.elf

snip.https_client-BCM943341WCD1

----------------------------------|---------|---------|

                                  |         |  Static |

              Module              |  Flash  |   RAM   |

----------------------------------+---------+---------|

App                               |    2566 |    2048 |

base64                            |     503 |       0 |

crc                               |    1060 |       0 |

crypto_open                       |   46938 |       4 |

DHCP_Server                       |    1550 |     132 |

DNS                               |    1644 |      44 |

Host MCU-family library           |   14057 |    2480 |

HTTP_client                       |     631 |       0 |

Interrupt Vectors                 |     388 |       0 |

libc                              |   34423 |    3188 |

Linked_List                       |     312 |       0 |

micro_ecc                         |    6188 |       0 |

Networking                        |    5118 |   13276 |

NetX-Duo - Interfaces & Stacks    |       0 |      16 |

Other                             |   45306 |     535 |

Packet Buffers                    |       0 |   23086 |

platform                          |    1036 |     172 |

RAM Initialisation                |    2500 |       0 |

resources                         |      16 |       0 |

Ring_Buffer                       |     112 |       0 |

Startup Stack & Link Script fill  |      46 |       7 |

Supplicant - BESL                 |   24620 |     616 |

ThreadX                           |    8590 |     396 |

Wi-Fi Firmware                    |  374643 |       0 |

WICED                             |    3753 |     948 |

WWD                               |   14765 |    3040 |

----------------------------------+---------+---------|

TOTAL (bytes)                     |  588265 |   49988 |

----------------------------------|---------|---------|

Making snip.https_client-BCM943341WCD1.bin

Build complete

Making .gdbinit

8 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Thanks for the work around holla2040

0 Likes
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

holla2040 wrote:

I found mentions of this problems with previous SDKs. Here's the workaround to get 3.7.0.3 running.

Here's the error with ubuntu 16.04 x64 - WICED SDK 3.7.0.3

holla@hendrix[511]: cd WICED-SDK-3.7.0-3/

holla@hendrix[512]: ./make snip.https_client-BCM943341WCD1

Host is Linux64

MAKEFILE MAKECMDGOALS=snip.https_client-BCM943341WCD1 OTA2_SUPPORT is disabled

Building Bootloader

WICED/platform/GCC/math_newlib.c: In function 'sin':

WICED/platform/GCC/math_newlib.c:30:5: internal compiler error: Illegal instruction

     x -= ( (int) ( x / ( 2 * PI ) ) ) * 2 * PI;

     ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

make[3]: *** [build/waf.bootloader-NoOS-BCM943341WCD1/Modules/WICED/platform/GCC/math_newlib.o] Error 1

make[3]: *** Waiting for unfinished jobs....

make[2]: *** [main_app] Error 2

make[1]: *** [bootloader] Error 2

make: *** [main_app] Error 2

Here's my workaround

apt install gcc-arm-none-eabi

now compile with

./make snip.https_client-BCM943341WCD1 TOOLCHAIN_PATH=/usr/bin/

You are telling people the  gcc included in SDK has problem to build the source code.

mwf_mmfae​ Can I expect your next release will fix it?

0 Likes

Yes, I'm telling the WICED community that the included tools won't build the SDK source code using ubuntu 16.04 x64. This is true for several previous versions of the SDK also.

0 Likes

Any chance you know a workaround for Mac ?

Regards

René Josefsen

0 Likes

Have you tried installing a different version of the toolchain and use it instead?

0 Likes

I assume I need to configure this some where in WICED if I want to use a different tool chain ?

I have downloaded the gcc-arm-none-eabi-5_4-2016q3 but I have yet to find the setting in WICED.

Regards

René Josefsen

0 Likes

See TOOLCHAIN make command line arg in my original post.

0 Likes

Managed to get it working, I had to get the 4.9 version, since 5.4 did not work.

Thanks a lot.

Regards

0 Likes