Topic : stm32l151 float double variables problem

Forum : ARM

Original Post
Post Information Post
June 7, 2015 - 3:22pm
Luis Zattar

Hi. I have a problem when I use float or double variables with Ride7/GCC. My application is for stm32L151 target MCU.

I receive wrong results or loop condition.

Please, how must I configure Compiler an Linker options of GCC to use float and double variables/expressions? Could exist some wrong with arm-none-eabi libraries distribuition in Ride7?

My Ride7 version is: 7.50.14.0185

Thanks in advance.

Luis

Replies
Post Information Post
+1
0
-1
June 8, 2015 - 3:30pm
Etienne Cassin

Dear Luis,

Your Ride7 version is out dated and problably the Rkit-ARM too.

Please, you can update Ride7and Rkit-ARM at version 1.58.15.0093.

In order to use float and/or double variables you just need to select "yes" in LD Linker -> Optimization -> NewLib-nano. be careful, do not  select "Yes,without float printf".

Let us know if it solves your issue.

Best regards,

+1
0
-1
June 9, 2015 - 10:23am
Etienne Cassin

please have also a look of Using FPU on Cortex-M4

Regards,

+1
0
-1
December 1, 2016 - 2:23pm
Marek Frydrysiak

Dear Etienne,

I'd like to ask you a similar question. Currently I work with the STM32F205VET6 MCU, the RKit-ARM for Ride7 (1.64.16.0245) and Ride7 (7.64.16.0244). Even though the GCC compiler optimization level is set to "No optimization" and the LD Linker optimization for Newlib-nano was set to "Yes", I can't debug float/double variables (they're still marked as "Optimized symbols"). 

Moreover, on another PC (with Ride7 7.58.15.0225 and RKit-ARM for Ride7 1.60.15.0183) everythign works just fine (even though the LD Linker optimization is set to "Yes, without float printf"). I've compared the project settings, they are the same (actually it's the same project cloned from the GIT repository).

Best regards,

Marek

+1
0
-1
December 6, 2016 - 11:18am
Etienne Cassin

Hello,

Thank you for your inquiry about our products.

Concerning your issue we will need more information:

Are you using global, local, volatille or static variable? could you provide us a project which will show the issue? you can send it to .

Best regards,