Can someone explain why this simple blink code will not work.
It seem like it compiles and flashes OK; but no activity on STM32F103C8 broad.
It work in the Arduino environment.
CODE:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin PB1 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
OUTPUT:
Terrestrial Control System v.009|| STATE: maintenance
Response: ASSEMBLE
copy from `build/blue_pill.elf' [elf32-littlearm] to `build/blue_pill.bin' [binary]
text data bss dec hex filename
12264 2152 968 15384 3c18 build/blue_pill.elf
-rwxrwxr-x 1 craft craft 14416 May 28 20:33 build/blue_pill.bin
build/blue_pill.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00002c58 08000000 08000000 00010000 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .text.align 00000000 08002c58 08002c58 00023850 2**0
CONTENTS, ALLOC, LOAD, CODE
2 .ARM.exidx 00000008 08002c58 08002c58 00012c58 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .data 00000868 20000000 08002c60 00020000 2**3
CONTENTS, ALLOC, LOAD, DATA
4 .rodata 00000388 080034c8 080034c8 000234c8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .bss 000003c8 20000868 20000868 00030868 2**2
ALLOC
6 .debug_aranges 00000f40 00000000 00000000 00023850 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
7 .debug_info 00005272 00000000 00000000 00024790 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
8 .debug_abbrev 000020a2 00000000 00000000 00029a02 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
9 .debug_line 00006981 00000000 00000000 0002baa4 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
10 .debug_frame 00002414 00000000 00000000 00032428 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
11 .debug_str 0000325e 00000000 00000000 0003483c 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
12 .ARM.attributes 00000029 00000000 00000000 00037a9a 2**0
CONTENTS, READONLY
13 .debug_ranges 00001998 00000000 00000000 00037ac3 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
14 .comment 00000049 00000000 00000000 0003945b 2**0
CONTENTS, READONLY
Source dirs
src
./STM32F1/cores/maple
./STM32F1/variants/blue_pill
src/
./STM32F1/cores/maple/
./STM32F1/cores/maple/avr/
./STM32F1/cores/maple/libmaple/
./STM32F1/cores/maple/libmaple/stm32f1/performance/
./STM32F1/cores/maple/libmaple/usb/stm32f1/
./STM32F1/cores/maple/libmaple/usb/usb_lib/
./STM32F1/cores/maple/stm32f1/
./STM32F1/variants/blue_pill/
./STM32F1/variants/blue_pill/wirish/
Includes
-ISTM32F1/cores/maple/
-ISTM32F1/system/libmaple/
-ISTM32F1/system/libmaple/include/
-ISTM32F1/system/libmaple/stm32f1/include/series/
-ISTM32F1/system/libmaple/usb/stm32f1/
-ISTM32F1/system/libmaple/usb/usb_lib/
-ISTM32F1/variants/blue_pill/
Defines
-DMCU_STM32F103C8
-D__STM32F1__
-DVECT_TAB_ADDR=0x8002000
-DUSER_ADDR_ROM=0x08000000
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
-DDEBUG_LEVEL=DEBUG_NONE
-DF_CPU=72000000L
-DSERIAL_USB
-DUSB_VID=0403
-DUSB_PID=6001
-DUSB_MANUFACTURER="Unknown"
-DUSB_PRODUCT=
-DLED_BUILTIN=PC13
-DHAVE_ERROR_LED
-DERROR_LED_PORT=GPIOC
-DERROR_LED_PIN=13
craft@vmc:~/Arduino_STM32-master$ tools/linux64/serial_upload ttyUSB0 2 0403:6001 build/blue_pill.bin
stm32flash Arduino_STM32_0.9
http://github.com/rogerclarkmelbourne/arduino_stm32
Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0410 (Medium-density)
- RAM : 20KiB (512b reserved by bootloader)
- Flash : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote address 0x08003850 (100.00%) Done.
Starting execution at address 0x08000000... done.