-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformIO support :-) #93
Comments
Concerning clock speed, this might help:
|
Getting Error: This board doesn't support spl framework!, someone can help? |
My platformio.ini file: [env] [env:genericSTM32F103C8] |
well i guess that if you change the platform to stm32, you should also overwrite the platform_packages ? Maybe try this blink first to reslove the STL error: https://github.com/platformio/platform-ststm32/tree/master/examples/spl-blink |
Yes and you have it already selected in your [env] section. |
Did you test my links for the original platfromio.ini , that works for me: platformio/platformio-home#42 |
I'm trying to |
"Please specify platform for 'genericGD32F130C8' environment" |
If you are running Windows, check your platformIO folders. Mine are found in C:\Users\PAN CF-LX6.platformio\packages |
Installed package but i still don't know how do i 'specify platform'? |
can you send me the gd32 file inside platform folder and the framework one? |
https://robosoft.de/forums/hover/ but these files should be auto downloaded when you compile the project. |
will we get online editor for gen2 anytime soon |
Can't even clean because of this "Please specify platform". Sorry if I'm not understanding something |
I have to go. If you find a solution... |
I am not at all experienced with PlatformIO. I also only used it for one project two years ago. |
ok |
and google your errors. |
alredy tried that |
@Electron-py actually i do not understand why you want to compile for a [env:genericSTM32F103C8] . You have a Gen2.1.1 which is GD32F130 When i add for the Gen2.2.t boards
i get the that might help: platformio/platform-ststm32#13 (comment) my But i failed at step 2. the startup file needs to be changed in target.h line 48
But that is not working
And as a Keil/PIO beginner i do not really know how |
I made it work. Now i have an error when compiling about RemoteCallback being defined more times. |
What did you make work ? RemoteCallback is declerated in remote.h once. |
I found a pakcage for gd32 and now i don't have enviroment errors anymore |
this is not very instructive :-( |
I tried this
and this:
but the beeper tones are still lower than they should be |
you need to use proper stm32f103 core if you want to set system clock |
based on
in And if the motor is still running nicely, we might live with the wrong cpu clock and scale the beeper tone .. |
This platformio.ini did make the GD32F130 run with correct clock. Serial communcation was working. |
it is very clear, you are using gd32f103 core, its normal that clock cannot be configured, its same for mm32f103, the clock will be lefty as default |
I installed this: https://github.com/CommunityGD32Cores/platform-gd32 in PlatformIO for GD32 support and this is my platformio.ini file: [env] [env:genericGD32F130C8] Now the enviroment works. The error that I have is that the RemoteUpdate function is defined multiple times: One in remoteUartBus.c and one in remoteUart.c . When Platform IO tries to link those files gives errors because when it links them there are two RemoteUpdate functions. It needs to be defined only once or, if they are two separate functions, to rename it in one file. |
But the beeping is wrong. |
VID20240907092807.mp4 |
I added some logic to turn on the led for 50ms every 5 seconds: https://github.com/hoverboardhavoc/Hoverboard-Firmware-Hack-Gen2.x-GD32/tree/hoverboardhavoc/debug_clock In the videos below which show hoverboardhavoc/debug_clock running, you can see the LED flashing every five seconds but the behavior of the motor and buzzer is different. The tones are different pitch and the motor makes a kind of metallic sound on the Platform IO build Keil: 1.mp4Platform IO: 2.mp4 |
@hoverboardhavoc i can confirm. Don't know why it makes that metallic sound. |
Maybe it's a different implmentation for PWM. idk |
As I said, you must only uncomment ONE RemoteXy in config.h Is uart working with 19200 baud ? Bldc is running from a 16 kHz interrupt that is triggered when ADC dma has finished, if I remember correctly. Add a counter and blink led every 160000 counts to that function in bldc.c to verify that it is indeed 16 kHz... This firmware has the very simple block communication only. I think that the buzzer tone is also generated in that calculateBldc function ! |
Right, sorry. Now it compiles with the original void names. |
What am I doing wrong? Using REMOTE_DUMMY VID20240907100410.mp4 |
Looks like not all three hall sensors working . Are the three led blinking with always two overlapping ? But it might be the wrong 16 kHz timing of calculateBldc that needs your push with a hand at low speed to make the motor start spinning |
But even when it starts spinning it doesn't want to. It seems like there are only two fases. And my hoverboard has only red and green light, not orange. |
With a Gen2.1.1 you should have a two color led module and a three color led module. |
I'll try with uart |
nope. still wrong |
i can not really help you. With all your short one liners i never really know what you are doing :-( |
I tested with Uart with esp32 and its the same of the video i sent. |
By the way, there is a great visualization tool that also supports GD32F130: https://www.st.com/en/development-tools/stm-studio-stm32.html |
Is there a way to make the motors spin faster? |
1.use higher voltage |
Thanks @hoverboardhavoc for his pull request RoboDurden/Hoverboard-Firmware-Hack-Gen2.x-GD32#3
Maybe adding stm32F103 support now has become closer.
adding this to platformio.ini might somehow do the trick:
taken from https://github.com/RoboDurden/Split_Hoverboard_SimpleFOC/blob/main/platformio.ini
The text was updated successfully, but these errors were encountered: