8 years, 4 months ago.

Where is assert.h?

Compiling for shield X_NUCLEO_IKS01A1 on Nucleo F091RC.

Where is the assert.h file that is included (#include) in main.cpp of the project Sensors_Reader for NUCLEO F091RC?

When I try to compile this project, it gets error: "Error: Undefined symbol aeabi_assert (referred from main.NUCLEO_F091RC.o) "

So, I want to have a look at assert.h

Just update the mbed library and it should compile.

posted by Daniel Kuzmanoski 03 Sep 2016

2 Answers

8 years, 4 months ago.

Hello Doug,

"assert.h" is an header from the c standard library, it is not accessible. It seams that internally assert call aeabi_assert and that this symbol is not define. This is a bug from the online IDE.

As a workaround, you can define "NDEBUG" before the inclusion of assert.h.

#define NDEBUG

/*** Includes ----------------------------------------------------------------- ***/
#include "mbed.h"
#include "assert.h"
#include "x_nucleo_iks01a1.h"

another option is to use "mbed_assert" instead of "assert".

8 years, 3 months ago.

Just update the mbed library and it should compile.

Hi Daniel,

I came here because I am having the same error (undefined symbol aeabi_assert).

Update the mbed library doesn't help me, the error persists.

Kind regards, Christopher

posted by Christopher Peirs 12 Sep 2016