cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DSP?

seba881
Associate
Posted on January 03, 2012 at 17:46

Hello.

I’m beginer in STM. I  know how use adc, timers, interrupts etc..

I use Atollic TrueStudio, and I don’t know how use DSP. I know that i must use CMSIS library, but i don’t know how i must start this in main.c, or how i must add any libraries to project.

Someone can help me?

And i have second ask. In DSP which is in  STM32F407 is something like “pipeliningâ€�?

Sebastian
6 REPLIES 6
davidrojas9
Associate II
Posted on January 11, 2012 at 18:44

I'm in the same situation as you. If you find out something please post it here. I can see the available functions but I don't know what files I need to add to my project.

Posted on January 11, 2012 at 21:34

Doesn't the CMSIS / DSP_Lib come with extensive documentation and examples? There is certainly a huge directory of material in the recent Keil releases.

Presumably you could download it for other tool chains

http://www.onarm.com/cmsis/download/

http://www.onarm.com/

http://www.iqmagazineonline.com/current/pdf/Pg28-29-IQV10N1_IQ-34.pdf

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
davidrojas9
Associate II
Posted on January 12, 2012 at 17:25

Well, I tried to add the .lib needed, but I have the same problem as in this post:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Atollic libraries&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B]Atollic Libraries

Posted on January 12, 2012 at 21:54

Well, I tried to add the .lib needed, but I have the same problem as in this post:

Maybe Atollic has a forum, not seen anyone actively supporting it here. Dropping objects and libraries into a project seems like a fairly basic IDE function, the Lite version crippled projects, perhaps it won't bring in libraries in case they contain printf/scanf? The last time I downloaded the Lite version I spent a lot of time pounding my head against a wall just building the ST demo projects.

I'd strongly recommend trying evals from Keil, IAR and Rowley before committing to Atollic for your development work.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
davidrojas9
Associate II
Posted on January 13, 2012 at 09:50

I got it sort of working. If you add the library path,  change the name of the lib from 

arm_cortexM4lf_math.lib to libarm_cortexM4lf_math.a, and add the library in the project options as arm_cortexM4lf_math, it recognizes it. Now the strange thing is that I get this error:

c:/program files/atollic/truestudio for stmicroelectronics stm32 lite 2.2.0/armtools/bin/../lib/gcc/arm-atollic-eabi/4.5.1/../../../../arm-atollic-eabi/bin/ld.exe: error: ../Libraries/CMSIS/Lib/ARM\libarm_cortexM4lf_math.a(arm_max_q15.o): Conflicting CPU architectures 13/0

But if I execute it anyways, surprisingly it works fine, and do the calculations correctly. Any idea on what's causing this?

(Edit)

I think the problem comes because the library is compiled for ARM instructions, and Atollic compiles for Thumb2. I can see the option in Atollic to select thumb, thumb2 or ''Mix ARM/Thumb'', but it's grayed out, you can't select anything but Thumb2.

Posted on January 13, 2012 at 13:55

Now the strange thing is that I get this error:

 

I see your head banging against one of the walls.

The Cortex-M3/4 won't run ''ARM'' code, so the mixing/interworking would cause a Hard Fault, thus you can't select. ELF object files have some version/tag information, there is probably a mismatch here, rather than 32-bit instructions.

May be a version of Atollic that intrinsically supports the FPU/DSP will have an option to use the instructions like Keil does.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..