Binary blobs in apps-store apps #2918
Replies: 8 comments
-
Posted at 2020-08-07 by @gfwilliams Wow, that's awesome! Personally I'm totally happy with including binary blobs. What some others have done is include What would be great is if you could let me know exactly what was changed in your compiler service so I could add it back into the one everyone has? Then at least it'd be easy for others to try your code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @fanoush Compiler flags are here you can perhaps make it conditional based on board name, those with nrf52832 can have cortex M4/FPU enabled. Also I enabled C preprocessor by removing and with the FPU errata fix you added recently this is even more painless since you don't need to clear that in inline C code now |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @gfwilliams Ok, thanks! Yes, I should be able to just check based on the board name.
Yes, it's because I don't want anyone doing |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @fanoush Well in that case lines with #include could be stripped from source as macros and defines/ifdefs are otherwise quite handy, but it is extra work of course. Also it could run in chroot or docker, again extra work. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-07 by @gfwilliams Ok, it's now live! So you should be able to compile for Bangle.js with floating point support using the normal compiler service. Yes, there are ways around pretokenisation (I bet IMO the best would be to just emscripten compile ARM GCC and run it in the browser if needed. I'd love to get as little as possible dependent on the server |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-14 by user113695 Thanks for adding the compiler flags, it works beautifully. I put in a pull request for the app to be added to the app loader. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-17 by @gfwilliams Thanks - just merged! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-10-07 by @allObjects @user113695, absolutely cool... Questions:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-06 by user113695
Hi,
This is a bit of an app-store policy question:
I wrote an STL viewer app (STL is a relatively simple file format for representing 3d models and is often used in the hobbyist 3d printing realm). The app can read ASCII formatted STL files and displays a shaded 3d view of its contents that can be rotated around on the watch screen (see attached image).
I concede this is probably not the most useful app for a smartwatch, but perhaps it is still worth adding to the app store.
However, to get even marginally useful framerates for all but the very simplest models, I ended up doing a lot of the linear algebra and data manipulations in inline C using 32 bit floats and the processor's FPU (thanks to @fanoush for figuring out how to do that). For the FPU code to compile I had to host my own local Espruino compiler.
Therefore, in order for others to install the app on their watch the app store version would have to contain a binary blob of the compiled routines (encapsulated in a base64 string). Obviously I would provide the C code as well, but it would be much harder for the casual user to play around with the code than with a strictly JS-only app.
Any thoughts on this?
Thanks,
Marko
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions