-
Notifications
You must be signed in to change notification settings - Fork 84
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
Can't flash firmware #8
Comments
For sideboard, you don't need to press any button, just make sure the MCU gets power, either via the ST link or mainboard. I prefer to shut down the mainboard and have power only from ST link during programming. Usually locking unlocking the chip twice helps in solving the issue. |
I'm using just sideboard without connection to mainboard and power comes from st-link. |
Looks exactly as my board. Edit: Also in my case I cannot flash via ST Link utility, it gives me an error. I haven't tried yet with Cube MX programmer, maybe that one works. Flashing via Keil or Platformio should work. Most recently I use more Platfomio because is nicer. |
Keil compile works without errors, but flash doesn't. Platformio build works without error, but upload doesn't Processing VARIANT_HOVERBOARD (platform: ststm32; board: gd32f130c6; framework: spl)
hla_swd Also Cube MX fails: |
Wow. Then what is the real size of flash? 8 kB :-o Can it be that the starting address is not the same? That would be strange. |
Is there way to check out real flash size? I changed address to 0x07007000 and now it flash it, but it's a mess (or should it look like this?). I don't need IMU or leds, just those 2 sensors working as buttons, so is it possible to reduce firmware size to make it work with these faulty chips? Chips has some blue marking, maybe factory marks defective chips? Original program is only 1kb With cube programmer i managed to flash it partially: |
If you need only buttons there is an option to use right sensor cable on the mainboard with buttons. Wouldn't it be good enough? https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/2890745fbb5879b52821231b53c217f886344f4b/Inc/config.h#L250 |
Can you update the firmware of your ST Link v2 programmer to the last version? For me it flashes and I remember I did than. I haven't tried before, with the shipped ST link v2 firmware. See here how to do it: |
Yes, that be enought. I just really need to know how to connect buttons. Are they between rx/tx or rx/tx to ground? |
I have latest version V2.J34.S7 |
I think it should be connected to 3.3v. Which variant are you using? Want do you want to do with the buttons? |
so right sideboard tx to 3.3v is button1? and rx to 3.3v is button2? I'm using hovercar variant, so i want use 1 button for phase advance on/off and 2 to change motor driving mode. |
Yes. |
I'm not a programmer, so i don't know where i have to copy those lines? I'm better with hardware. So util.c lines 1184-1242 to main.c between line 203-204 ? If this is too hard, i think is better for me to just compile firmware with different settings until i found best combination. Now i have "stock" variant_hovercar with just calibrated ADC values and battery + field weakening enabled. |
OK forget about it then. |
I guess that firmware size is the problem. If i just comment that line 45 does it reduce file size? |
Yes it should |
Still too large file :( i can flash 2kt to this chip. Now this new file with 6050 disabled is 6kt |
2k seems really low |
Yes i know. Same problem with another sideboard too. Heap size is 0x200 on this. In here is 0x400? https://github.com/EmanuelFeru/hoverboard-sideboard-hack-GD/blob/master/MDK-ARM/startup_gd32f1x0.s |
I now tested those BLDC control types with flashing modified firmware to mainboard and only working type in my use is FOC TORQUE. Also field weakening tested and i don't wanna use it, because my vehicle goes too fast (so it illegal to drive) and use 100% more power just to speed up +33%. So this issue can be closed. |
I've had the same issues with sideboard gd32f130c6t6 chip: st-link utility fails to flash relatively big files. |
@redeemarr you are amazing! That just made it work and finally got to upload all the firmware to the chip. Thank you! I have seen several forums with this exact issue, will try to share your answer! |
I tried with keul uvision5 and st-link software. Keul gives error about missing packet (i installed GD32F130 package). St-link detect chip as some st version and start to flash it, but stops at beginning. I can disable read out protection.
Do i have to install some button to put chip in programmin mode like mainboard (must hold power button while flashing)?
The text was updated successfully, but these errors were encountered: