Wipy no float and math!

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
jgmdavies
Posts: 57
Joined: Tue Aug 09, 2016 2:39 pm

Re: Wipy no float and math!

Post by jgmdavies » Mon Aug 29, 2016 12:02 pm

Re. the Pycom site, it's lurking at: https://www.pycom.io/solutions/py-boards/wipy/

Is there any prospect of a 'WiPy Plus', with significantly more available memory? If not, I think many folk would like some sort of float support for the current WiPy. I've posted my first attempt at a float package, in the form of one .py file, but it's incomplete and also of course doesn't help the compiler handle float constants for inputting expressions 'naturally'.

An optional MicroPython/WiPy build with float support would be nice, but given that some people would also want some 'math', and the lingering memory issue, there's a danger of a maintenance and test overhead in supporting multiple alternative builds.

Jim

User avatar
Roberthh
Posts: 1886
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wipy no float and math!

Post by Roberthh » Mon Aug 29, 2016 7:00 pm

There just was another thread on this topic: http://forum.micropython.org/viewtopic.php?f=11&t=1014
In that thread, Danicampora definitely said, that there will be no built-in float support on WipY.
Interestingly, @jgmdavies provided a python module for performing basic float operations. Maybe that's sufficient for your needs.

zencuke
Posts: 1
Joined: Fri Sep 02, 2016 5:46 pm

Re: Wipy no float and math!

Post by zencuke » Fri Sep 02, 2016 8:50 pm

I am currently using various ESP6288 boards so my feelings about Wipi is probably not relevant. However I've done a lot of DSP type real time embedded work (I mean many many years of it) and wanted to add one point. Fixed point math works but floating point is at least an order of magnitude easier to implement and debug if the application has any mathematical complexity at all. Sure you don't 'need' it but you don't need a high level language either. Writing in assembler allows you to create much tighter and faster code. I did a lot of that, got pretty good at it and am glad I don't have to any more. Same with fixed point arithmetic.

I agree that you should avoid floating point where you can but fixed point can be expensive to develop. As for the concept that real apps don't need floating point...

Later!

sekil
Posts: 2
Joined: Wed Mar 25, 2020 12:04 pm

Re: Wipy no float and math!

Post by sekil » Wed Mar 25, 2020 12:13 pm

Hi all.

I'm compile mycropython for cc3200 and floating support + math.

Binary size = 194888
Ram free after loading fw -

Code: Select all

MicroPython v1.12 on 2020-03-25; LaunchPad with CC3200
Login as: micro
Password:
Login succeeded!
Type "help()" for more information.

>>> r = 234/1223
>>> print (r)
0.1913328
>>> import gc
>>> gc.mem_free()
42592
>>>
I'm cant see any problem to compile mycropython with float/math support and why floating/math supporting disabled??? - Give user change float or no..

Link for mk files to build with floating support -
https://drive.google.com/file/d/1r2jbjc ... sp=sharing

User avatar
dhylands
Posts: 3295
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Wipy no float and math!

Post by dhylands » Wed Mar 25, 2020 4:57 pm

I think that issue with the CC3200 is that it doesn't have your typical RAM/FLASH layout and all of the firmware gets loaded into RAM to be run.

So when you increase the size of the firmware by adding floating point support then you decrease the size of the heap by same amount as the firmware increased. If you really need floating point support and can live with the reduced heap, then that might be a favorable tradeoff, but it isn't necessarily favorable for everyone.

sekil
Posts: 2
Joined: Wed Mar 25, 2020 12:04 pm

Re: Wipy no float and math!

Post by sekil » Thu Mar 26, 2020 6:19 am

i'm only say that is possible to make fw with working floating and math.. And no need reinvent crutches for floating values.. And no official info about how compile floating support on this board - only "due to ram limitation... bla bla" - but this working and with 45kb ram - and we need change cflags, ldflags and python configs..

Post Reply