writing code that can be run on both esp32 and desktop toolchain
Posted: Tue Nov 05, 2019 10:37 am
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?
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?