Best setup to develop signal processing algorithm for Cortex M4F microcontroler

Hello everyone,

I’ve been looking for the best way to develop and test (with automation/scripting if possible) signal processing algorithms.
By that I mean, one or several flows of data to be processed using CMSIS-DSP running on Cortex M4 with the results that can be printed on the console for example. The processing modules would be compiled as a library to be used on the production firmware.

How would you manage to get into speed for that kind of development?

So far, I have been using GNU MCU Eclipse QEMU which is a fork of Qemu for Cortex M4 (STM32 MCU). Data is read using semihosting and results are printed while processing.
I read a bit about Jumper simulating the nRF52 (the MCU I use too) but stumbled upon Fast Models from ARM, which would be the perfect solution looking at the features available (** “Python based scripting for runtime control, checking and reporting” **).

If anyone has experience that could be shared, I would be very grateful.

Best,
Cyril

1 Like

Thanks for posting your question here!

One question for you: are you interesting in testing whether your algorithm is correct, or whether it is fast?

The former is reasonably easy to do, the latter is not.

For correctness, I think QEMU is your best bet. Any cortex-M model will work in that case (doesn’t have to be an nRF52). You could also check out Renode (https://github.com/renode/renode) which is a simulator with cortex-m support.

I don’t have experience with ARM fast models, but based on the documentation it does not seem geared towards these use cases.

If you’re trying to evaluate performance, your best bet is to get an instruction trace of your algorithm executing (I think QEMU should be able to provide that) and count the number of instructions from beginning to end. It’s not perfect, but it’s a good start.