-
-
- Posts: 8
- Joined: 2025-01-01 0:08
I am working on a neural network in C++ on the Pico Mini B.
I'd like to accelerate it by calling the dotproduct functions of the CMSIS DSP library.
But the
line calls a compilation error:
./dnn/include/kernels/macs.hpp:4:10: fatal error: arm_math.h: No such file or directory
4 | #include "arm_math.h"
| ^~~~~~~~~~~~
compilation terminated.
Is this library installed in the kernel or do I need to install it by myself?
In the first case, where is it located?
Otherwise, how to install it?
Thanks for your help.
-
- Posts: 1290
- Joined: 2024-01-23 7:21
Hello, the CMSIS DSP library needs to get the source code from the github repository for compilation and porting, you can query the blog or information on the CMSIS DSP ported to the cortex-A CPU, github repository
https://github.com/ARM-software/CMSIS-DSP also have a detailed introduction.
we have not measured and can not provide relevant suggestions
-
- Posts: 8
- Joined: 2025-01-01 0:08
Thanks for your answer.
Digging into the folders, I found the CMSIS DSP library here:
Code: Select all
sysdrv/source/mcu/rt-thread/components/CMSIS/Include
But in the
file (also here
https://github.com/LuckfoxTECH/luckfox- ... ath.h#L280), there is a parameter to define, and I don't know which one to choose for the Pico Mini B:
Code: Select all
#if defined (ARM_MATH_CM4)
#include "core_cm4.h"
#elif defined (ARM_MATH_CM3)
#include "core_cm3.h"
#elif defined (ARM_MATH_CM0)
#include "core_cm0.h"
#define ARM_MATH_CM0_FAMILY
#elif defined (ARM_MATH_CM0PLUS)
#include "core_cm0plus.h"
#define ARM_MATH_CM0_FAMILY
#else
#include "ARMCM4.h"
#warning "Define either ARM_MATH_CM4 OR ARM_MATH_CM3...By Default building on ARM_MATH_CM4....."
#endif
If I don't define anything, I end up with
which leads to an error, since this file doesn't exist. Can you help?
-
- Posts: 1290
- Joined: 2024-01-23 7:21
The contents in the folder sysdrv/source/mcu/rt-thread/components/CMSIS/Include are part of the RTThread source code for the RV1103/RV1106, which use RISC-V MCU. These files cannot be directly used on RV1103/RV1106, as the MCU is based on RISC-V architecture and the CPU is ARM Cortex-A7. Specifically, files like "ARMCM4.h" cannot be used on this platform.
Since the RV1103/RV1106 has limited documentation and is based on the RISC-V architecture, using CMSIS (which is designed specifically for ARM architecture) is not feasible. What you need to do is port the CMSIS library to the Cortex-A7 platform. This task requires a certain level of understanding of compilation principles, and it is outside the scope of technical support. Please consider this as an opportunity to learn and solve the problem on your own. I believe this will be an important step in your embedded systems learning journey.