Page 1 of 1

Flash ChibiOS/RT 3.0 for MCU STM32F103C8 using stm32f051 discovery board

Posted: Tue May 24, 2016 1:55 pm
by uocnguyen
Hi everyone,
I'm building my project on my custom board which use stm32f103c8t6. I tried to flash my project to my mcu by stm32f051 discovery (or stm32f4 discovery, stm32f072 discovery which i also have). But it's not working.
I chose openOCD on ST-Link V2 then i chose olimex_stm32_h103.cfg. Chip is identified with follow logs:

Open On-Chip Debugger 0.10.0-dev-00107-ge4848fe (2015-11-13-11:49)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v21 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.870059
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints


Then, I chose debug (flash and run) from drop down menu. Debug program still work but not correctly. MCU isnt erase and it run old program.
Can you help me?

Re: Flash ChibiOS/RT 3.0 for MCU STM32F103C8 using stm32f051 discovery board

Posted: Tue May 24, 2016 2:00 pm
by RoccoMarco
Moved to the right section,
Ciao
RM

Re: Flash ChibiOS/RT 3.0 for MCU STM32F103C8 using stm32f051 discovery board

Posted: Tue May 24, 2016 3:06 pm
by Giovanni
Probably you are choosing the wrong target .cfg file, try other F1 files and see if one of them works (both under boards/ and under targets/).

Giovanni

Re: Flash ChibiOS/RT 3.0 for MCU STM32F103C8 using stm32f051 discovery board

Posted: Tue May 24, 2016 6:42 pm
by uocnguyen
Thank sir, Giovanni and Rocco Marco.
I flashed my code to mcu stm32f103c8 succesfully by swd interface through stm32f072 discovery.
I used olimex_stm32_h103.cfg with stlink v2 base-on RT-STM32F103RB-NUCLEO (both of them are ported to stm32f103RB but it's ok with stm32f103c8t6).
Special thank to Rocco Marco Guglielmi who has supported me a long time.
Thank Sir, Giovanni who established ChibiOS. You are so great man.
Sorry because i'm so excited and happy. :)