I can. But read below, I think I figured something out.
I think I figured out two things are required here:
- You really do need he Z_DUMMY_TARGET target
- After you create that target, and set it to “Production”, you need to DELETE the PlatformIO debug and upload run/debug configuration, then create a new one. For some reason you seem to have to do that step manually.
For a while I had a target named “Production” but I looked at the CMakeLists.txt that got generated by pio init and it includes this at the end:
add_executable(Z_DUMMY_TARGET ${SRC_LIST})
I had come across that dummy target once before but I didn’t dive into figuring out what it was / why you needed it. When you generate a brand new project with clion file / new project / platformio, it seems to generate Z_DUMMY_TARGET but if you fool around adding/deleting/moving stuff and you lose that target then everything works fine until you try to generate PlatformIO Upload.
I don’t understand PlatformIO enough to know what’s going on here, but since this is the internet let me recklessly speculate: when you add that PlatformIO Upload run configuration, it seems to look for the available targets specifically named Z_DUMMY_TARGET … why I couldn’t tell you.
What I’m trying to figure out is whether this is a platformio problem, a clion problem, or is it neither and it’s just my confusion?