Maximilian Gerhardt
Maximilian Gerhardt
New boards should be added by 1. Adapting the [misc/scripts/gen_boarddefs.py](https://github.com/Community-PIO-CH32V/platform-ch32v/blob/develop/misc/scripts/gen_boarddefs.py) script 2. Updating the framework packages for all frameworks that you want the new boards to support (e.g., [framework-wch-noneos-sdk](https://github.com/Community-PIO-CH32V/framework-wch-noneos-sdk) etc.,...
Not really understanding the thing about `digitalWrite(PC_3);`. The variant header is exposing the macros for the pin numbers correctly as e.g. `PA1`, `PC3`, `PD4`, etc. https://github.com/openwch/arduino_core_ch32/blob/273620c809ba4cc3c6928543c6929634de8e50ba/variants/CH32V00x/CH32V003F4/variant_CH32V003F4.h#L22-L40 So example code, that...
The platform already automatically selects them, so we shouldn't double select them I think. The user shouldn't have to manually set that up. https://github.com/platformio/platform-atmelmegaavr/blob/5002fb543af167687d15016c476ba410093865be/platform.py#L38-L41 https://github.com/platformio/platform-atmelmegaavr/blob/5002fb543af167687d15016c476ba410093865be/platform.json#L65-L70 https://github.com/platformio/platform-atmelavr/blob/26b79f8b52c0a046e79586b839fbe20547484561/platform.json#L118-L124
Oh it runs without `-C `? In that case the Atmel AVR docs have been wrong for a very long time.
That would mean that the platform interferes even if the user sets `upload_protocol = custom`, the platform still appends some `-C ` arguments -- very tricky, especially when the user...
>Not tricky, check for settings done and if none use default. That technically breaks `upload_protocol = custom` use cases where the target upload program is not avrdude; It would be...
But `custom` is exactly the case where we need the path interpolation. ```ini [env:program_via_AVRISP] platform = atmelavr framework = arduino upload_protocol = custom upload_port = SERIAL_PORT_HERE upload_speed = 19200 upload_flags...
Yes, it would be nice if `upload_protocol = stk500v1` just worked, but avrdude has a enourmous list of possible upload protocols that would all need to be mapped into platform-atmelavr...
> static library needs to be wrapped in -Wl,--whole-archive. Sounds like what is already done in existing builder scripts for e.g. ArduinoCore-mbed https://github.com/platformio/builder-framework-arduino-core-mbed/blob/029e576c57331f1baa41802b7684710a587f3ef8/arduino-core-mbed.py#L209-L211 Not sure if this really really needs...
For Tweak 2: Did you try setting up only a dependency of the final ELF to the include file? Like ```py env.Depends(target_elf, "path/to/global_include.h") ``` in the `main.py` of the platform.