This may be more a general embedded programming question than specific to the esp32. I am developing a feature for the esp32 which mostly involves parsing cJson, looping over arrays etc. and isn't actually esp32 specific. I wondered if it's possible to have a source file in the project which can be compiled both by the esp32 toolchain but also by a standard desktop toolchain, in my case linux.
It just seems it would be quicker to develop something if I didn't have to constantly flash it every time I changed it, and it would be easier to write tests.
Actually while writing this I've just realised one way to do this would be to write it as an external component and include it - is this the easiest way?
writing code that can be run on both esp32 and desktop toolchain
-
- Posts: 40
- Joined: Mon Mar 18, 2019 12:34 pm
Re: writing code that can be run on both esp32 and desktop toolchain
I had the same idea some years back, it grew into a complete framework that can run on *nix and ESP32. for reference, this I/O card/alarm is built on top of Smooth
Depending on your application size and what else you need, writing parts as an external component/library might be enough for you.
Depending on your application size and what else you need, writing parts as an external component/library might be enough for you.
Who is online
Users browsing this forum: aapee-jcv, Bing [Bot], Google [Bot] and 456 guests