Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which #include <arm_math.h> for nano33BleSense CMSIS example #4

Open
hpssjellis opened this issue Sep 2, 2021 · 3 comments
Open

Which #include <arm_math.h> for nano33BleSense CMSIS example #4

hpssjellis opened this issue Sep 2, 2021 · 3 comments

Comments

@hpssjellis
Copy link

On both the Portenta or the Nano33BleSense my Arduino IDE 1.18.15 compiler dies on the line

#include <arm_math.h>

When I try to install it I only get the option to install the

"Arduino_CMSIS-DSP" which does not work

if I google arm_math I get several libraries such as:

https://github.com/ARM-software/CMSIS/blob/master/CMSIS/Include/arm_math.h

https://github.com/PaulStoffregen/arm_math

etc, etc. Any suggestions?

@PierreGembaczka
Copy link
Contributor

PierreGembaczka commented Sep 6, 2021

Hi Jeremy,

for the CMSIS example you definitely need the "Arduino_CMSIS-DSP" library.

I just tested this successfully on the Portenta with the following setup:

  • Arduino IDE version 1.8.13
  • Board software: Arduino Mbed Portenta Boards (Version 2.4.1)
  • Arduino_CMSIS-DSP (Version 5.7.0)
  • AIfES with the change in aifes.h as described in the manual.

Do you maybe still have the old Mbed core installed which is deprecated? You will only get the sketch compiled if the "Arduino_CMSIS-DSP" library is installed. This is still quite new and works only with the new Mbed cores. Seems to be a bug in the Arduino IDE. Maybe a reinstallation of the IDE will help.

Many greetings
Pierre

@hpssjellis
Copy link
Author

@AIfES-Pierre You are correct, this time installing the "Arduino_CMSIS-DSP" library and uncommenting #define AIFES_WITH_CMSIS from the AifES.h library source does seem to solve the issue I was having. Thank you.

Surprised just adding the define into the sketch didn't solve the issue. I don't really want my students editing the library.

The following did not work, although I am not really sure why.

#define AIFES_WITH_CMSIS
#include <aifes.h>    

@PierreGembaczka
Copy link
Contributor

Hi @hpssjellis,

unfortunately this does not work. In the Arduino IDE the library is compiled first and then the sketch. So the define in the sketch has no effect at all. In addition, compiler/linker flags are not so easy to set in the Arduino IDE:
https://forum.arduino.cc/t/how-to-add-compile-options-to-arduino-ide-1-8-13/692640

That's why we solved it in such a complicated way. But we are working on a more elegant solution for the next update.

Many greetings
Pierre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants