• 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...

    Yes, in that case it won't be an issue. I think it's when trying to call a function like void foo(float) - but Espruino doesn't support automatically converting floats anyway, so I think you'd have to do:

    foo((new Uint32Array((new Float32Array([1234])).buffer)[0])
    

    So it's a bit contrived.

    However @fanoush you're totally right - we don't pass any floats into the library, so I guess as long as it's not using anything external it doesn't really matter. It's just a matter of convincing the Linker it's ok, as that was what was throwing the error before.

    So I guess it may be enough to edit the .o files headers so that GCC thinks they are softfp?

    As you say, since Espruino uses doubles for most stuff the hardfp doesn't feel like it'd be needed. And in fact double passing may in fact be an issue (or maybe it's just for floats?). In the current build Espruino assumes the doubles are passed in registers/stack just like ints - so switching to hardfp may actually break stuff (although in initial tests it doesn't seem to have).

    Does the proprietary firmware also provide a SpO2 value?

    @user140377 The one included at the moment doesn't. There are separate binaries for SpO2 sensing that could be included, but you have to put the sensor into a special mode first where it samples a lot faster and also samples the Infrared at the same rate.

    It's definitely possible and I can provide the binaries to anyone who is interested in looking into it, but it's quite a lot of work.

About

Avatar for fanoush @fanoush started