You are reading a single comment by @fanoush and its replies.
Click here to read the full conversation.
-
So I guess it may be enough to edit the .o files headers so that GCC thinks they are softfp?
I tried the objcopy trick from https://stackoverflow.com/a/51439150 and it links fine. Not sure whether it still works :-)
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: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).
@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.