Framework-arduino-gd32v platform.txt settings


I forked an Arduino framework: GitHub - cryptable/framework-arduino-gd32v: a platform io framework for gd32v103 .

I see in the platform.txt a lot of compiler settings, which seems not to be used when I run ‘pio run --verbose’.

  • Is this normal?
  • Do I have to copy them into my platformio.ini? (Which is a pity)


Yes, the platform.txt is not used. PlatformIO implements its own builder code in Python using SCons that mimicks the Arduino IDE buildsystem, but is much more controllable. See platform-gd32v/builder/frameworks/ at master · sipeed/platform-gd32v · GitHub which also inherits from platform-gd32v/builder/frameworks/ at master · sipeed/platform-gd32v · GitHub.

If there are missing compiler options which make something work or not work, file a bug in the repository above.

Compiler settings for the framework are added in the python script linked above.

Thanks, I’ll ask them to include my pull request.
Before they accept my pull request, do I have to overwrite it with mine implementation?
(I’m a newbie)


Well first you should really check whether adding them via build_flags in the platformio.ini is also applied when compiling the arduino core. Actually I think it should be.

After that, you still have the option to use Advanced Scripting to append to the CCFLAGS, CPPDEFINES, LINKFLAGS variables or whatever you need (see scripts linked above).

Only as a final resort you’d have to use a forked version of GitHub - sipeed/platform-gd32v: GD32V: development platform for PlatformIO where you correct the builder scripts and refer to it using platform = <git fork link here> in the platformio.ini.

Thanks! I do it with the build parameters in the platform.ini. Now I know it works, I’m going to see if Sipeed can update their library. It is not for my code, but to build the HT11 library dependency from Adafruit. I have to do the same for Maixduino framework (framework-arduino-gd32v, because I had to patch it also. I need to clean it first.

Thanks for the support and ideas!