Repository navigation
GD32: fix build with current SimpleFOC (all platforms), restore StepDirListener interrupt - #17
Merged
Merged
Conversation
…nce 2.3.4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GD32 Arduino core now accepts it (polarity is a PinStatus since SimpleFOC 2.3.x). The workaround disabled step/dir on every board. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was above the _GD32_DEF_ guard, so every other platform failed with 'gd32/PinNames.h: No such file or directory' (all CI workflows). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After syncing
dev-gd32withsimplefoc/master, the GD32 driver no longer builds, and the CI fails on every platform. Three small fixes:gd32/PinNames.hincluded only on GD32: it was above the_GD32_DEF_guard ingd32_mcu.cpp, so every other platform failed withgd32/PinNames.h: No such file or directory(cause of the AVR, ESP32, SAMD, RP2040, MDED, SILABS, STM32 workflow failures)._driverSyncLowSide()returnsvoid*(current sense API since 2.3.4): it now returns the current sense params,LowsideCurrentSense::init()checks it againstSIMPLEFOC_CURRENT_SENSE_INIT_FAILED. This was already broken before the sync (ambiguating new declarationerror).StepDirListener:attachInterruptrestored. The workaround commented it out for every board; the current GD32 Arduino core accepts the call (polarityis aPinStatus). The file is now identical tosimplefoc/master.Nothing else changes: the fixed dead time (
DEAD_TIME 60) and the hard-coded TIMER0 channels stay as they are.The STM32 workflow is expected to keep failing: it also fails on
simplefoc/master(stm32_mcu.cpp:126: cannot convert 'TIM_HandleTypeDef*' to 'TIM_TypeDef*'with the STM32 Arduino core 3.0), unrelated to this branch.Tested locally (build only, no hardware run yet):
genericGD32F130C8, currentplatform-gd32/ ArduinoCore-GD32: minimal sketch (6PWM driver + 2-phase low side current sense +foc_current), andCandas1/Split_Hoverboard_SimpleFOC(dev) with hall sensors and with-D SENSORLESSafter renamingFluxObserverSensortoMXLEMMINGObserverSensor🤖 Generated with Claude Code