• Well, the STL Viewer and Mandel apps also use floats, although I haven't officially ported either to Bangle 2 (just running hacked versions privately). Don't have the watch near me at the moment, I will see how things break - I usually pass floats in flat arrays in and out of compiled C via pointers in my code, so I am not sure where the passing in registers comes in here...
    I also freely concede that a more reliable HR monitor is much higher on most people's priority list than a 3D viewer on a watch... ;-)

  • I also freely concede that a more reliable HR monitor is much higher on most people's priority list than a 3D viewer on a watch... ;-)

    It is hopefully not 'either or' situation. You can link code using both calling conventions, we did it before - old arduino for nrf52 is using softfp callling convention and we linked such hardfp vendor HR library before and it worked, need to check. may take few days.

    And btw one can set attributes on each method so both calling conventions can be used even in same source code, was testing this few years ago https://gist.github.com/fanoush/85ebe50c5c4a54ca15bf2867e27f7cd3
    but from the source Gordon committed I see that there are no float arguments passed in the methods of the HR library(?) anyway so it may be only about giving it few hardfp based math library methods it needs for linking.

    OTOH if whole espruino linked as hardfp is faster and/or smaller I hope we'll somehow figure out inline C code passing hard floats too.

    Well, maybe it is not an issue and will even work 'as is' if the inline C compiler keeps soft float conventions as it is now despite espruino fw using hard floats internally. When thinking about it, it may not break as they are separate and the float arguments are passed as integers.

About

Avatar for user113695 @user113695 started