use of string.h functions results in a HardFault

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

cross mob
Anonymous
Not applicable

Hello,

I want to use a memcpy in the platform librairy "platform_spi_slave", the code compile but I get a hardfault on memcpy when running, the following note appears:

Can't find a source file at "c:\\pf8_3\\Wiced-Tool-Source\\ARM_GNU\\newlib-build\\arm-none-eabi\\thumb\\v7m\\newlib\\libc\\machine\\arm/../../../../../../../../newlib-2.0.0/newlib/libc/machine/arm/../../string/memcpy.c"

Locate the file or edit the source lookup path to include its location.

"platform_uart.c" which is in the same forlder (WICED-SDK\WICED\platform\MCU\STM32F2xx\peripherals) contains a memcpy, so why can't I use a memcpy in "platform_spi_slave"?

I use an ISM43362_M3G_L44 from Inventek and the last SDK 3.1.2.

Best regards,

Martin

0 Likes
1 Reply
Anonymous
Not applicable

My mistake: my ring buffer wasn't well initialized, causing a hardfault when passing it in memcpy.

0 Likes