Sie sind auf Seite 1von 12

21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

danman's blog

PROJECTS

BLINKING LED ON STM32F103 WITH ONLY


LINUX TOOLS
15. NOVEMBER 2015 | DANMAN | LEAVE A COMMENT

I decided to do some experiments with STM32.

So I bought cheapest

STM32F103C8T6 board for about $5 (ebay). The chip has some nice features, e.g. dozens of GPIOs,
AD converter, timers, USB full-speed interface etc., full specs here.

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 1/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

The board has JTAG programming/debug interface header so I also needed some JTAG interface. I
decided to buy some Chinese j-link clone for about $12 (ebay).

When I had the hardware at home, I started to nd some know-how on the internet. My requirement
was, that the software has to work under Linux.

On the beginning, Ive found this article, which talks about running STM32F4 discovery under Linux. It
gave me some ideas where to start and what should I look for, so I knew I need some example code
with make le, compiler and debug/ ash tool.

Installing compiler was the easiest part, the article suggested downloading a package and
uncompressing it, but I used another way, simple package installation:

aptgetinstallgccarmnoneeabi

Next step was to get some example code, I searched for blinking LED and after some googling I found
this page. With this zip containing sample LED blinking project.

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 2/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

dano@u430:~$wgethttp://siwawi.bauing.uni
kl.de/avr_projects/arm_projects/STM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip
2015111516:35:50http://siwawi.bauing.uni
kl.de/avr_projects/arm_projects/STM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip
Resolvingsiwawi.bauing.unikl.de(siwawi.bauing.unikl.de)...131.246.51.21
Connectingtosiwawi.bauing.unikl.de(siwawi.bauing.uni
kl.de)|131.246.51.21|:80...connected.
HTTPrequestsent,awaitingresponse...200OK
Length:169687(166K)[application/zip]
Savingto:STM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip

STM32F103VHB6_RevZ_100%[=====================>]165.71K152KB/sin1.1s

2015111516:35:51(152KB/s)STM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip
saved[169687/169687]

dano@u430:~$unzipSTM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip
Archive:STM32F103VHB6_RevZ_Demo1_Lanchon_20080210.zip
inflating:STM32F103VHB6_RevZ_Demo1/jtag/flash.cfg
inflating:STM32F103VHB6_RevZ_Demo1/jtag/flash.script
inflating:STM32F103VHB6_RevZ_Demo1/jtag/openocd.cfg
inflating:STM32F103VHB6_RevZ_Demo1/jtag/target.ini
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/cortexm3_macro.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_adc.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_bkp.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_can.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_dma.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_exti.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_flash.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_gpio.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_i2c.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_iwdg.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_lib.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_map.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_nvic.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_pwr.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_rcc.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_rtc.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_spi.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_systick.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_tim.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_tim1.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_type.h
https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 3/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_usart.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/inc/stm32f10x_wwdg.h
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/cortexm3_macro.s
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_adc.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_bkp.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_can.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_dma.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_exti.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_flash.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_gpio.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_i2c.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_iwdg.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_lib.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_nvic.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_pwr.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_rcc.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_rtc.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_spi.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_systick.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_tim.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_tim1.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_usart.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_vector.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/src/stm32f10x_wwdg.c
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_128K_20K_FLASH.ld
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_COMMON.ld
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_SEC_EXT.ld
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_SEC_FLASH.ld
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_SEC_RAM.ld
inflating:STM32F103VHB6_RevZ_Demo1/lib/STM32_SEC_RAMonly.ld
extracting:STM32F103VHB6_RevZ_Demo1/lib/versionld.txt
inflating:STM32F103VHB6_RevZ_Demo1/lib/versionlib.txt
inflating:STM32F103VHB6_RevZ_Demo1/cleanmain.c
inflating:STM32F103VHB6_RevZ_Demo1/main.c
inflating:STM32F103VHB6_RevZ_Demo1/makefile
inflating:STM32F103VHB6_RevZ_Demo1/readme.txt
inflating:STM32F103VHB6_RevZ_Demo1/stm32.ld
inflating:STM32F103VHB6_RevZ_Demo1/stm32f10x_conf.h
inflating:STM32F103VHB6_RevZ_Demo1/stm32f10x_it.c
inflating:STM32F103VHB6_RevZ_Demo1/stm32f10x_it.h
dano@u430:~$cdSTM32F103VHB6_RevZ_Demo1/
dano@u430:~/STM32F103VHB6_RevZ_Demo1$make
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 4/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

main.omain.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
stm32f10x_it.ostm32f10x_it.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_adc.olib/src/stm32f10x_adc.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_bkp.olib/src/stm32f10x_bkp.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_can.olib/src/stm32f10x_can.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_dma.olib/src/stm32f10x_dma.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_exti.olib/src/stm32f10x_exti.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_flash.olib/src/stm32f10x_flash.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_gpio.olib/src/stm32f10x_gpio.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_i2c.olib/src/stm32f10x_i2c.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_iwdg.olib/src/stm32f10x_iwdg.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_lib.olib/src/stm32f10x_lib.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_nvic.olib/src/stm32f10x_nvic.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_pwr.olib/src/stm32f10x_pwr.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_rcc.olib/src/stm32f10x_rcc.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_rtc.olib/src/stm32f10x_rtc.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_spi.olib/src/stm32f10x_spi.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_systick.olib/src/stm32f10x_systick.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_tim.olib/src/stm32f10x_tim.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_tim1.olib/src/stm32f10x_tim1.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_usart.olib/src/stm32f10x_usart.c
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_wwdg.olib/src/stm32f10x_wwdg.c

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 5/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

armnoneeabigccmcpu=cortexm3mthumbWallgO0co
lib/src/cortexm3_macro.olib/src/cortexm3_macro.s
armnoneeabigccmcpu=cortexm3mthumbWallgO0I.Ilib/incco
lib/src/stm32f10x_vector.olib/src/stm32f10x_vector.c
lib/src/stm32f10x_vector.c:111:3:warning:takingaddressofexpressionoftype
'void'[enabledbydefault]
&_estack,//Theinitialstackpointer
^
lib/src/stm32f10x_vector.c:175:1:warning:initializationmakespointerfrom
integerwithoutacast[enabledbydefault]
};
^
lib/src/stm32f10x_vector.c:175:1:warning:(nearinitializationfor
'g_pfnVectors[66]')[enabledbydefault]
armnoneeabiarcrlib/libstm32.alib/src/stm32f10x_adc.olib/src/stm32f10x_bkp.o
lib/src/stm32f10x_can.olib/src/stm32f10x_dma.olib/src/stm32f10x_exti.o
lib/src/stm32f10x_flash.olib/src/stm32f10x_gpio.olib/src/stm32f10x_i2c.o
lib/src/stm32f10x_iwdg.olib/src/stm32f10x_lib.olib/src/stm32f10x_nvic.o
lib/src/stm32f10x_pwr.olib/src/stm32f10x_rcc.olib/src/stm32f10x_rtc.o
lib/src/stm32f10x_spi.olib/src/stm32f10x_systick.olib/src/stm32f10x_tim.o
lib/src/stm32f10x_tim1.olib/src/stm32f10x_usart.olib/src/stm32f10x_wwdg.o
lib/src/cortexm3_macro.olib/src/stm32f10x_vector.o
armnoneeabigccWl,gcsections,Map=main.elf.map,cref,u,Reset_HandlerI.
Ilib/incLlibTstm32.ldmain.ostm32f10x_it.olib/libstm32.aoutputmain.elf
armnoneeabiobjcopyObinarymain.elfmain.bin

Compilation worked like a charm and at the end I was left with a binary (main.bin) to put into ash.

The code originally used PC1 pin which is not populated in my board so I did a small change into the
code to use PB0 and recompiled:

@@50,23+50,23@@
NVIC_Configuration();

/*EnableGPIOCclock*/
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
+RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);

/*ConfigurePC.4asOutputpushpull*/
GPIO_InitStructure.GPIO_Pin=GPIO_Pin_4;
+GPIO_InitStructure.GPIO_Pin=GPIO_Pin_0;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_10MHz;

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 6/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_Init(GPIOC,&GPIO_InitStructure);
+GPIO_Init(GPIOB,&GPIO_InitStructure);

while(1)
{
/*TurnonledconnectedtoPC.4pin*/
GPIO_SetBits(GPIOC,GPIO_Pin_4);
+GPIO_SetBits(GPIOB,GPIO_Pin_0);
/*Insertdelay*/
Delay(0xAFFFF);

/*TurnoffledconnectedtoPC.4pin*/
GPIO_ResetBits(GPIOC,GPIO_Pin_4);
+GPIO_ResetBits(GPIOB,GPIO_Pin_0);
/*Insertdelay*/
Delay(0xAFFFF);
}

Ok, now I needed to ash the binary. So I downloaded original J-Link tools which in turn made my j-
link clone unusable (they probably try to ght counterfeits) :(.

[53331.986830]usb13:newfullspeedUSBdevicenumber53usingxhci_hcd
[53331.987000]usb13:Devicenotrespondingtosetupaddress.
[53332.190955]usb13:Devicenotrespondingtosetupaddress.
[53332.394579]usb13:devicenotacceptingaddress53,error71
[53332.506592]usb13:newfullspeedUSBdevicenumber54usingxhci_hcd
[53332.506799]usb13:Devicenotrespondingtosetupaddress.
[53332.710690]usb13:Devicenotrespondingtosetupaddress.
[53332.914295]usb13:devicenotacceptingaddress54,error71

I didnt give up and googled how to unbrick it. Fortunately, chip used in j-link is atmel AT91SAM7S64
which supports uploading rmware via USB when put into recovery mode. Full manual is available
here. Atmel SAM-BA utility can be also found here. Using this, I successfully bring my debugger back
to life.

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 7/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

So I had to nd another utilty for programming. OpenOCD is what Ive found. Some pages mentioned
it as working option so I installed it from repository:

sudoaptgetinstallopenocd

OpenOCD needs a con g to know which chip and debugger is used. I easilly found an example here. It
mentions ft2232 device as debugger but only a simple change was enough to make it work:

#daemonconfiguration
telnet_port4444
gdb_port3333

#interface
interfacejlink

#Thechiphas64KBsram
setWORKAREASIZE0x10000

source[findtarget/stm32f1x.cfg]
#adapter_khz100
gdb_breakpoint_overridehard

#daemonconfiguration
telnet_port4444
gdb_port3333

#interface
interfacejlink

#Thechiphas64KBsram

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 8/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

setWORKAREASIZE0x10000

source[findtarget/stm32f1x.cfg]
#adapter_khz100
gdb_breakpoint_overridehard

After this, my chip was successfully detected:

dano@u430:~/stm32$openocdfstm32f103.cfg
OpenOnChipDebugger0.8.0(2014102515:24)
LicensedunderGNUGPLv2
Forbugreports,read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info:onlyonetransportoption;autoselect'jtag'
adapterspeed:1000kHz
adapter_nsrst_delay:100
jtag_ntrst_delay:100
cortex_mreset_configsysresetreq
forcehardbreakpoints
Info:JLinkinitializationstarted/targetCPUresetinitiated
Info:JLinkARMV8compiledMay27200917:31:22
Info:JLinkcaps0xb9ff7bbf
Info:JLinkhwversion80000
Info:JLinkhwtypeJLink
Info:JLinkmaxmemblock9752
Info:JLinkconfiguration
Info:USBAddress:0xff
Info:KickstartpoweronJTAGpin19:0xffffffff
Info:Vref=3.287TCK=1TDI=0TDO=1TMS=0SRST=0TRST=0
Info:JLinkJTAGInterfaceready
Info:clockspeed1000kHz
Info:JTAGtap:stm32f1x.cputap/devicefound:0x3ba00477(mfg:0x23b,part:
0xba00,ver:0x3)
Info:JTAGtap:stm32f1x.bstap/devicefound:0x16410041(mfg:0x020,part:
0x6410,ver:0x1)
Info:stm32f1x.cpu:hardwarehas6breakpoints,4watchpoints
Error:stm32f1x.cpuclearinglockupafterdoublefault
Pollingtargetstm32f1x.cpufailed,GDBwillbehalted.Pollingagainin100ms
Pollingtargetstm32f1x.cpusucceededagain

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 9/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

After some ddling in debug shell and thanks to this note, I found a way how to successfully ash my
binary:

telnetlocalhost4444
Trying127.0.0.1...
Connectedtolocalhost.
Escapecharacteris'^]'.
OpenOnChipDebugger
>halt
targetstate:halted
targethaltedduetodebugrequest,currentmode:Thread
xPSR:0x21000000pc:0x080001fcmsp:0x20004fd0
>stm32f1xmass_erase0
stm32xmasserasecomplete
>flasherase_check0
successfullycheckederasestate
#0:0x00000000(0x4001kB)erased
#1:0x00000400(0x4001kB)erased
#2:0x00000800(0x4001kB)erased
#3:0x00000c00(0x4001kB)erased
#4:0x00001000(0x4001kB)erased
#5:0x00001400(0x4001kB)erased
#6:0x00001800(0x4001kB)erased
#7:0x00001c00(0x4001kB)erased
#8:0x00002000(0x4001kB)erased
#9:0x00002400(0x4001kB)erased
#10:0x00002800(0x4001kB)erased
#11:0x00002c00(0x4001kB)erased
#12:0x00003000(0x4001kB)erased
#13:0x00003400(0x4001kB)erased
#14:0x00003800(0x4001kB)erased
#15:0x00003c00(0x4001kB)erased
#16:0x00004000(0x4001kB)erased
#17:0x00004400(0x4001kB)erased
#18:0x00004800(0x4001kB)erased
#19:0x00004c00(0x4001kB)erased
#20:0x00005000(0x4001kB)erased
#21:0x00005400(0x4001kB)erased
#22:0x00005800(0x4001kB)erased
#23:0x00005c00(0x4001kB)erased
#24:0x00006000(0x4001kB)erased
#25:0x00006400(0x4001kB)erased
#26:0x00006800(0x4001kB)erased
https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 10/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

#27:0x00006c00(0x4001kB)erased
#28:0x00007000(0x4001kB)erased
#29:0x00007400(0x4001kB)erased
#30:0x00007800(0x4001kB)erased
#31:0x00007c00(0x4001kB)erased
#32:0x00008000(0x4001kB)erased
#33:0x00008400(0x4001kB)erased
#34:0x00008800(0x4001kB)erased
#35:0x00008c00(0x4001kB)erased
#36:0x00009000(0x4001kB)erased
#37:0x00009400(0x4001kB)erased
#38:0x00009800(0x4001kB)erased
#39:0x00009c00(0x4001kB)erased
#40:0x0000a000(0x4001kB)erased
#41:0x0000a400(0x4001kB)erased
#42:0x0000a800(0x4001kB)erased
#43:0x0000ac00(0x4001kB)erased
#44:0x0000b000(0x4001kB)erased
#45:0x0000b400(0x4001kB)erased
#46:0x0000b800(0x4001kB)erased
#47:0x0000bc00(0x4001kB)erased
#48:0x0000c000(0x4001kB)erased
#49:0x0000c400(0x4001kB)erased
#50:0x0000c800(0x4001kB)erased
#51:0x0000cc00(0x4001kB)erased
#52:0x0000d000(0x4001kB)erased
#53:0x0000d400(0x4001kB)erased
#54:0x0000d800(0x4001kB)erased
#55:0x0000dc00(0x4001kB)erased
#56:0x0000e000(0x4001kB)erased
#57:0x0000e400(0x4001kB)erased
#58:0x0000e800(0x4001kB)erased
#59:0x0000ec00(0x4001kB)erased
#60:0x0000f000(0x4001kB)erased
#61:0x0000f400(0x4001kB)erased
#62:0x0000f800(0x4001kB)erased
#63:0x0000fc00(0x4001kB)erased
>flashwrite_bank0main.bin0
wrote6840bytesfromfilemain.bintoflashbank0atoffset0x00000000in
0.331746s(20.135KiB/s)
>resetrun
JTAGtap:stm32f1x.cputap/devicefound:0x3ba00477(mfg:0x23b,part:0xba00,ver:
0x3)

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 11/12
21/5/2017 BlinkingLEDonSTM32F103withonlyLinuxtools| danman'sblog

JTAGtap:stm32f1x.bstap/devicefound:0x16410041(mfg:0x020,part:0x6410,ver:
0x1)
>
telnet>q
Connectionclosed.

And voila! Blinking LED. This whole took me about 5 hours also with this blog writing. Next time I hope
Ill post some more interesting usage of this devel board. Stay tuned.

https://blog.danman.eu/blinkingledonstm32f103withonlylinuxtools/ 12/12

Das könnte Ihnen auch gefallen