News for hackers. Stuff that matters.
Re:Running Julia bare-metal on an Arduino by alhirzel on Monday May 23, 2022 @02:00PM (#31482612)
This is very promising for embedded control applications. Bootstrapping this with a simple allocator and even something as basic as FreeRTOS [1] combined with CBinding.jl [2] for portability would be game-changing for many applications, and directly compete with e.g. MathWorks' Arduino Simulink target [3]. ESP8266/32 next, once LLVM support [4] lands?

[1]: https://microcontrollerslab.com/use-freertos-arduino/

[2]: https://github.com/analytech-solutions/CBinding.jl

[3]: https://www.mathworks.com/help/supportpkg/arduino/run-on-tar...

[4]: https://github.com/espressif/llvm-project

Re:Running Julia bare-metal on an Arduino by Sukera on Monday May 23, 2022 @02:09PM (#31482776)
I didn't know about FreeRTOS, interesting!

I don't think CBinding.jl is an option, since the whole point of the arduino is that the julia runtime can't run there (and doesn't fit in the first place - there's not enough RAM and swapping to the SD seems bad). Linking with C created .o files should work though?

I don't own any ESP32, but if that happens, yes I'd very much like to try!

Re:Running Julia bare-metal on an Arduino by alhirzel on Monday May 23, 2022 @03:04PM (#31483555)
Would you accept an ESP32 for your edification? No strings attached. Email me

I think CBinding.jl could be helpful if one wanted to write a target-specific shim library in C and link against it. I would expect that some of the glue is going to be easier to write in C than in Julia, and you can play some tricks with macros to create bare modules [1] within some kind of `@arduino_setup`/`@arduino_loop`-style blocks.

Edit: By the way, those target-specific shims might already exist as part of the Arduino IDE. PlatformIO [2] is also another possible collider of these types of platform-specific glues.

[1]: https://docs.julialang.org/en/v1/manual/modules/#Default-top...

[2]: https://docs.platformio.org/en/latest/boards/index.html

Re:Running Julia bare-metal on an Arduino by Sukera on Monday May 23, 2022 @04:11PM (#31484234)
That'd be awesome, sure! I'll shoot you an email.

PlatformIO is nice, yes - I've already been suggested linking/using that, but I haven't looked into it yet. I also haven't worked with that before, so it'd be completely new territory for me.

Re:Running Julia bare-metal on an Arduino by kurosknight on Monday May 23, 2022 @04:47PM (#31484588)
Hey! Would you be interested in collaborating on this? I have a wide selection of hardware I'd be happy to contribute as well. You can reach me at my username at gmail dot com.
Re:Running Julia bare-metal on an Arduino by Sukera on Monday May 23, 2022 @05:41PM (#31485129)
Took a while, but email is sent - thanks again, and I hope shipping will work itself out!
Re:Running Julia bare-metal on an Arduino by pjmlp on Tuesday May 24, 2022 @01:20AM (#31488279)
ESP32 should be quite capable, it is much better than many MS-DOS PCs.