[Solved] Flash STM32F103C8

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

[Solved] Flash STM32F103C8

Post by Pararera » Sun Nov 25, 2018 3:24 am

Hi there guys,
I found this video on Youtube. Also I found this on GitHub. Which file should I modify? Can I upload new flash with USB2Serial method? How to upload it? Like normal sketch? Thanks for help :)


Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: Flash STM32F103C8

Post by Pararera » Sun Nov 25, 2018 12:25 pm

So that bootloader unlocks hidden 64kB of memory?

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Flash STM32F103C8

Post by mrburnette » Sun Nov 25, 2018 2:38 pm

Pararera wrote:
Sun Nov 25, 2018 12:25 pm
So that bootloader unlocks hidden 64kB of memory?
ANY program loader could upload to the "extra" flash as the parameters are passed in the environment by scripts selected when you select the board type in the Arduino IDE. The upload method only needs the starting address and the maximum data size which are defined in boards.txt

Please remember, using 128K when the STM32F103 uC is marked 64K generally seems to work but there is always a chance that issues could results in the "extended" flash usage - no guarantees.

Ray

Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: Flash STM32F103C8

Post by Pararera » Sun Nov 25, 2018 3:21 pm

I found this in boards.txt file

Code: Select all

genericSTM32F103C.name=Generic STM32F103C series
genericSTM32F103C.vid.0=0x1EAF
genericSTM32F103C.pid.0=0x0004
genericSTM32F103C.build.variant=generic_stm32f103c
genericSTM32F103C.build.vect=VECT_TAB_ADDR=0x8000000
genericSTM32F103C.build.core=maple
genericSTM32F103C.build.board=GENERIC_STM32F103C
genericSTM32F103C.build.error_led_port=GPIOC
genericSTM32F103C.build.error_led_pin=13
genericSTM32F103C.upload.use_1200bps_touch=false
genericSTM32F103C.upload.file_type=bin
genericSTM32F103C.upload.auto_reset=true
genericSTM32F103C.upload.tool=maple_upload
genericSTM32F103C.upload.protocol=maple_dfu
## STM32F103C8 -------------------------
genericSTM32F103C.menu.device_variant.STM32F103C8=STM32F103C8 (20k RAM. 64k Flash)
genericSTM32F103C.menu.device_variant.STM32F103C8.build.cpu_flags=-DMCU_STM32F103C8
genericSTM32F103C.menu.device_variant.STM32F103C8.build.ldscript=ld/jtag_c8.ld
genericSTM32F103C.menu.device_variant.STM32F103C8.upload.maximum_size=65536
genericSTM32F103C.menu.device_variant.STM32F103C8.upload.maximum_data_size=20480
## STM32F103CB -------------------------
genericSTM32F103C.menu.device_variant.STM32F103CB=STM32F103CB (20k RAM. 128k Flash)
genericSTM32F103C.menu.device_variant.STM32F103CB.build.cpu_flags=-DMCU_STM32F103CB
genericSTM32F103C.menu.device_variant.STM32F103CB.build.ldscript=ld/jtag.ld
genericSTM32F103C.menu.device_variant.STM32F103CB.upload.maximum_size=131072
genericSTM32F103C.menu.device_variant.STM32F103CB.upload.maximum_data_size=20480
I'm not sure which line I have to modify to enable hidden 64kB.
cpu_flags maybe?
genericSTM32F103C.build.vect=VECT_TAB_ADDR=0x8000000 change to 0x20000 and STM32F103C8.upload.maximum_size set to 131072
?

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Flash STM32F103C8

Post by mrburnette » Sun Nov 25, 2018 7:16 pm

genericSTM32F103C.menu.device_variant.STM32F103C8.upload.maximum_size=65536
Vs
genericSTM32F103C.menu.device_variant.STM32F103CB.upload.maximum_size=131072

Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: Flash STM32F103C8

Post by Pararera » Sun Nov 25, 2018 7:22 pm

Just found topic on this forum. I just have to change to CB in bord menu and it will work as C8 board(in most cases).

Post Reply