[En-Nut-Discussion] Problems using global variables and/or floating point numbers on Nut/Os (using ethernut 5)

Vegard Aaker vegardaa at stud.ntnu.no
Tue May 22 09:09:39 CEST 2012


Hi,

I have done some more debugging, and still have similar issues. Using the
example code uart.c works fine, but if I change the floating point value to
become a global variable instead of a local value I get errors. The
floating point value will remain 0.0 even if I change it.

I do not have much knowledge of the linker list, so I have attached it.
Hopefully someone can have a look to see if all of the function calls seems
correct. I have also added the uart.c source code, where the only
difference from the example code is the float dval that is move so that it
becomes global.

On Mon, May 21, 2012 at 8:45 AM, Vegard Aaker <vegardaa at stud.ntnu.no> wrote:

> I am writing a model predictive control, an advanced control system which
> use an library-free solver. The calculation is a optimization problem, and
> floating point operations are a natural part of the solving.To do the
> calculations I have estimated that I need 10 MFLOPS, but this was a coarse
> estimate and it might be less.
>
> The optimization needs to be made within 0.1 seconds. This goal is easily
> reached on a Intel E7500 @ 2.93GHz, which has a worst case time usage of
> 0.007sec doing the calculation.
>
> The algorithms used should be quite robust, so they should give accurate
> answers even it the floating point operations have some round of error. Do
> you have any thoughts about the preformance of the ARM926 processor (which
> is included in SAM9XE) compared with the preformance of the same processor
> with the FPU?
>
> I also see I have made a mistake with the floating point support according
> to the link I was sent, and so I will try to fix that today.
>
> On Sun, May 20, 2012 at 10:24 PM, Ole Reinhardt <
> ole.reinhardt at embedded-it.de> wrote:
>
>> Hi!
>>
>> > It would have been really great if you could try the code and see if you
>> > figure out what causes the error.
>> >
>> > I had misunderstood some of the information about the processor (ARM926)
>> > used in SAM9XE. I thought I knew that the processor had FPU, but I see
>> now
>> > that it is optional :( I am not sure if my plan for using the Ethernut
>> > board will work without the FPU, but I will give it a try anyway.
>>
>> Could you line out a little what do you want to use the board for?
>> Perhaps I could give you an estimation if this will work with software
>> emulation or not.
>>
>> Best regards,
>>
>> Ole
>>
>> --
>>
>> Thermotemp GmbH, Embedded-IT
>>
>> Embedded Hard-/ Software and Open Source Development,
>> Integration and Consulting
>>
>> http://www.embedded-it.de
>>
>> Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen -
>> tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97
>>
>> Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
>> Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
>> Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
>> Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280
>>
>> _______________________________________________
>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>>
>
>
>
> --
>
> - Vegard
>



-- 

- Vegard



More information about the En-Nut-Discussion mailing list