Infineon / XMC-for-Arduino

Integration of Infineon's XMC microcontrollers into the Arduino IDE.
Other
106 stars 67 forks source link

Fix for .miso_config / update of package.json #282

Closed RudolphRiedel closed 2 months ago

RudolphRiedel commented 3 months ago

By creating this pull request you agree to the terms in CONTRIBUTING.md. https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md --- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description A couple of variants/.../config/.../pins_arduino.h was using this for .miso_config: .miso_config = { .mode = XMC_GPIO_MODE_INPUT_TRISTATE, .input_hysteresis = XMC_GPIO_INPUT_HYSTERESIS_STANDARD },

And since that skipped .output_level of the struct XMC_GPIO_CONFIG, building for XMC1100_XMC2GO failed with: "sorry, unimplemented: non-trivial designated initializers not supported."

As the same project built just fine for the XMC4700_Relax_Kit, I compared the files and found this difference. Adding .output_level for an input pin seems to be wrong and XMC_GPIO_INPUT_HYSTERESIS_STANDARD seems to be the default anyways, so I tried removing that line and it built again.

I also updated package.json from "version": "2.1.0" to "version": "3.1.0" while also adding a couple more lines that are found in the package.json that is installed by PlatformIO. Ok, 3.1.0 is not really correct, this should be changed to whatever the next release is supposed to be so that it is correct in the release package - but I can not know if the next release will be 3.1.1, 3.2.0 or 4.x or something else entirely.

While this works to use the latest version in PlatformIO: platform_packages = framework-arduinoxmc @ https://github.com/Infineon/XMC-for-Arduino.git When listing the dependancies it is listed as framework-arduinoxmc @ 2.1 - but it uses the latest files, so 3.1.0+ actually.

Related Issue

Context I am using PlatformIO to build my project and it is using arm-none-eabi-g++. I had to manually convince PlatformIO to use the latest version of XMC-for-Arduino, the platform "Infineon XMC" is still using "framework-arduinoxmc" in version 1.4.0 and this one uses a different pins_arduino.h which does not even have the SPI config.