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.
-IMarlin/src/HAL/LINUX/include and the stuff in https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/HAL/LINUX, 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 (https://github.com/MarlinFirmware/Marlin/issues) 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. https://github.com/LiangZhang0924/Userspace-Arduino