TLDR; Compiles but not executes and seems to brick ESC.
Solved : use gcc7 toolchain "gcc-arm-none-eabi-7-2018-q2-update", later versions generates issues
I’m a software developer and I’m trying to setup my development environment for playing with the vesc.
I cloned and build (fedora, system arm-none-eabi toolchain) the bldc project, but not having an stlink available at the time, tried to flash the resulting .hex through vesc tool and bricked my esc.
Now I am unable to connect back to the board through usb, I have a solid blue led but nothing else. However, I can connect to the board through st-link and I can read the flash
My setup: lab bench psu, 12V, stlink v2, v4 maytech board
I am not an embedded software developper, so I may have easily made a mistake like not putting the good memory address when flashing (could not find info about it, so I left 0x080...0 everytime).
I already tried the following :
- make && make upload "bldc"
- make && make upload "bldc_firmware"
- upload bldc or bldc_firmware through stlink-gui
- upload from vesc_tool res directory
- When trying to flash a .hex through stlink-gui, I get a write error
The current status of my board :
Found 1 stlink programmers
flash: 1048576 (pagesize: 16384)
st-flash --reset write vesc_tool/res/bootloaders/40_o_47_o_48_o_410_o_411_o_412_o_DAS_RS.bin 0x08000000
2020-08-21T16:22:03 INFO common.c: F4xx: 192 KiB SRAM, 1024 KiB flash in at least 16 KiB pages.
file vesc_tool/res/bootloaders/40_o_47_o_48_o_410_o_411_o_412_o_DAS_RS.bin md5 checksum: 88a07e93e464a7ca958de278ae12a3e, stlink checksum: 0x00054fa0
2020-08-21T16:22:03 INFO common.c: Attempting to write 4272 (0x10b0) bytes to stm32 address: 134217728 (0x8000000)
EraseFlash - Sector:0x0 Size:0x4000 2020-08-21T16:22:03 INFO common.c: Flash page at addr: 0x08000000 erased
2020-08-21T16:22:03 INFO common.c: Finished erasing 1 pages of 16384 (0x4000) bytes
2020-08-21T16:22:03 INFO common.c: Starting Flash write for F2/F4/L4
2020-08-21T16:22:03 INFO flash_loader.c: Successfully loaded flash loader in sram
enabling 32-bit flash writesç
2020-08-21T16:22:04 INFO common.c: Starting verification of write complete
2020-08-21T16:22:04 INFO common.c: Flash written and verified! jolly good!
The current content of my flash (stlink-gui, export memory) : https://drive.google.com/file/d/1Jk0OpTB88HLBtvzVJDA6iyZS-x5nkVF3/view?u...
It feel to me I have tried everything I can think of, and I think I have fried something with my bad first flash.
What can I do ? Any idea ? Can someone help me ?
On the side, I was unable to find documentation about the led, can you help me ?