I am new to PlatformIO and started to port an Arduino project to PlatformIO. For my Arduino project I make use of a statemachine defined in a .sm file. This file is processed by a java tool to generate a.h and a .cpp file (http://smc.sourceforge.net/). With the Arduino IDE I had to do this manually (and some tweaking) and I hope that in PlatformIO I can do this generation when my .sm file changes.
I have been searching the web and the community already but am unable to find some pointers. Can someone please point me to a place where it is explained how to add a target to a/the makefile?
Looking forward to your response!
Thanks for the response; will do that.
Any options while the feature request is processed? Is there a (C)Make file I can add this type of functionality to?
Yes, with advanced scripting you can execute arbitrary code and inject new targets / files in
src/ in the build system (which is the Python-based SCons system). An example of that can be found for ESP32 ULP (ultra-low-power processor) assembly files: platform-espressif32/ulp.py at develop · platformio/platform-espressif32 · GitHub, or Problem when compiling ESP32 ULP sources (framework Arduino) · Issue #315 · platformio/platform-espressif32 · GitHub.
A good understanding of PlatformIO + SCons is however required for this. You may find some initial guidance here.