simple LED-Blink program with CMSIS for a stm32f030
> compiled it with:
arm-none-eabi-gcc -DSTM32F030x6 -mthumb -mcpu=cortex-m0 --specs=nano.specs --specs=nosys.specs -Wall -fmessage-length=0 -ffunction-sections -fdata-sections -I./cmsis
/CMSIS-5.8.0/Core/Include -I./device/STM32F030x6/include -Os -c main.c -o main.o
> linking it with startup_stm32f030xx.S (startup.o) and linker-script:
arm-none-eabi-gcc -T/home/e72f46e/projects/CMake-Sample/device/STM32F030x6/STM32F030x6_FLASH.ld --specs=nosys.specs --specs=nano.specs main.o startup.o -o test.elf
> extracting hex code from elf file:
arm-none-eabi-objcopy -O ihex
test.elf test.hex
> flashing it using st-flash at address 0x8000000:
st-flash write test.hex 0x80000000
- wired connections from header-board (PA4) to the LED is OK.
It doesn't work ... any advice ?
Thanks.
Error in line 603
First, try resetting the device. it sometimes happen that ST-Link won't release the reset line.
Pls provide more information, what dose it mean Dont work, can set break points in code under debug session?
actually my ST-Link is a chinese clone ... so, it doesn't have debug support.
Could you provide us with the source code you're trying to compile? :)
Hm all clones line stlink v2 has it
Even chinese clones must have debug support :/
Use that: https://pastebin.com/ to demonstrate your code to everyone. I bet you'll be amazed with the number of help-wishers here if you do just that.
oh, ok : | didn't know that, thanks.
What is ur Ide? Or may be u just compile and upload from command line?
Are you using any IDE (i.e. Cube-IDE/IAR/Keil) for your project?
you russian guys are so nice people 😔
KDevelop / Debian 11 / GCC 10.8
OK, firmware uplodes process returns good code, with out errors?
yes, no warnning and no error.
也许这不是原始处理器,而是它的中文克隆
seems so, is there any difference (except the lifetime) ? here in Iran the original ones are relativly expensive after covid.
Обсуждают сегодня