modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
749 stars 133 forks source link

CMSIS DSP error when targeting hosted platforms #1201

Open calebchalmers opened 2 months ago

calebchalmers commented 2 months ago

When building a project with the CMSIS DSP module for a hosted target, I get the following error:

modm/ext/cmsis/dsp/arm_math.h:34:10: fatal error: modm/platform/device.hpp: No such file or directory

This is due to my recent PR about including device.hpp in arm_math.h to provide configuration; however, for hosted platforms it seems like modm doesn't generate a device.hpp file.

salkinium commented 2 months ago

Ah interesting, I never thought about building CMSIS-DSP for hosted but according to the docs that is supported. Probably also a good idea for testing etc.

Hosted does not generate a device.hpp mostly because hosted doesn't have a specific hardware. I would prefer to not include it in the arm_math.h for hosted builds. I hope the CMSIS-DSP has sensible defaults for hosted.