Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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
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".
Just update the mbed library and it should compile.
posted by Daniel Kuzmanoski 03 Sep 2016