cancel
Showing results for 
Search instead for 
Did you mean: 

Sourcery CodeBench Lite for STM32F4xx

npham
Associate II
Posted on March 09, 2012 at 20:17

Hi,

Is there anyones out there using Sourcery CodeBench Lite for STM32F4xx? We've been using this one for STM32F10x series for a while. There is no problems for us untill we start using floating point instructions on the STM32F4xx series. It does not seem to recognize assembly floating point instruction at all. When I generate an assembly file from a C file with some floating point additions, it shown ''fadds'' for floating point add instruction instead of ''vadd.f32'' as Cortex-M4 specified. Anyone out there can help, I really appriciate it. thanks

Nhan Pham

#stm32f4xx
3 REPLIES 3
Posted on March 11, 2012 at 13:20

The FADDS is the classic Floating point notation, VADD.F32 is more of the vector processing notation, both assemble to the same opcodes, and the former is used by the objdump disassembler, and perhaps debuggers. I wouldn't be too concerned. The M4 only supports a subset of the floating point units on other ARM implementations.

Also if the processor crashes, make sure the startup code is enabling FPU operation.

172 00000000 ;FPU settings
173 00000000 480E LDR R0, =0xE000ED88
; Enable CP10,CP11
174 00000002 6801 LDR R1,[R0]
175 00000004 F441 0170 ORR R1,R1,#(0xF << 20)
176 00000008 6001 STR R1,[R0]
177 0000000A
178 0000000A EE33 8AAC fadds s16,s7,s25
179 0000000E EE33 8AAC vadd.f32 s16,s7,s25

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

Clive,

I have a RTOS is running on STM32F4xx without floating point. Now I try to use floating point hardware, so I need to store and load floating point registers for tasks switching. What I have in assembly language are  ''VSTMDB   R0!,   {S16-S31}'', and ''VLDMIA   R0!,   {S16-S31}'' but the compiler does not recognize those 2 instructions. I did try to find the eqivalent instructions for the classic floating point notation but no luck. Could you tell me where can I find those. Thanks

Posted on March 12, 2012 at 15:28

I'm not sure what Sourcery will take, my reference platform is Keil (ARM), I use the GNU disassembler to experiment with alternate opcodes and representations.

204 0000003C ED20 8A10 VSTMDB R0!, {S16-S31}
205 00000040 ED20 8A10 FSTMDBS R0!, {S16-S31}
206 00000044
207 00000044 ECB0 8A10 VLDMIA R0!, {S16-S31}
208 00000048 ECB0 8A10 FLDMIAS R0!, {S16-S31}

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..