I see. Yes you’re on the right track there with that [env:linux_native]
environment and using platform = native
. You may want to compile the simple example program as listed in the documentation first to sanity-check whether compiling works okay in general.
Judging by -IMarlin/src/HAL/LINUX/include
and the stuff in Marlin/Marlin/src/HAL/LINUX at 2.0.x · MarlinFirmware/Marlin · GitHub, Marlin seems to have… some… support for Linux. But if I read the main()
function, compiling natively on Linux is just being used for simulating or debugging some functions, not actually fully running Marlin.
I e.g. don’t see any code for calling into the SPI oder I2C APIs of the Linux kernel. The GPIO code is also just internally simulated and doesn’t actually write to hardware GPIOs.
Seems like noone has run the full Marlin software on an embedded Linux board yet? Then even more exciting, you can be the first one to achieve this is you want to port it :).
The people at Marlin (Issues · MarlinFirmware/Marlin · GitHub) or a related forum might be good resources for you.
Edit: I’ve also found the start of an implementation of the Arduino core for beagle bone black, that implements some functionality. GitHub - LiangZhang0924/Userspace-Arduino: Provide a Linux Userspace environment for compiling Arduino style wiring/process sketches to run under Linux