STM32F103C8T6 ARM STM32 Minimum System Development Board

September 5, 2020

libmaple -- try the sample build

After getting my compiler and toolchain set up on Fedora, I try the recommended first sample build, as follows:
cd libmaple
cp main.cpp.example main.cpp
make clean
export BOARD=maple_mini
make
# BOARD=maple_mini make
This yields:
make
================================================================================

  Build info:
     BOARD:           maple_mini
     MCU:             STM32F103CB
     MEMORY_TARGET:   flash

  See 'make help' for all possible targets

================================================================================

  [CC]        ./libmaple/adc.c
  [CC]        ./libmaple/dac.c
  [CC]        ./libmaple/dma.c
  [CC]        ./libmaple/exti.c
  [CC]        ./libmaple/flash.c
  [CC]        ./libmaple/gpio.c
  [CC]        ./libmaple/iwdg.c
  [CC]        ./libmaple/nvic.c
  [CC]        ./libmaple/pwr.c
  [CC]        ./libmaple/rcc.c
  [CC]        ./libmaple/spi.c
  [CC]        ./libmaple/systick.c
  [CC]        ./libmaple/timer.c
  [CC]        ./libmaple/usart.c
  [CC]        ./libmaple/usart_private.c
  [CC]        ./libmaple/util.c
  [CC]        ./libmaple/i2c.c
  [AS]        ./libmaple/exc.S
  [CC]        ./libmaple/usb/stm32f1/usb.c
  [CC]        ./libmaple/usb/stm32f1/usb_reg_map.c
  [CC]        ./libmaple/usb/stm32f1/usb_cdcacm.c
  [CC]        ./libmaple/usb/usb_lib/usb_core.c
  [CC]        ./libmaple/usb/usb_lib/usb_init.c
  [CC]        ./libmaple/usb/usb_lib/usb_mem.c
  [CC]        ./libmaple/usb/usb_lib/usb_regs.c
  [AS]        ./libmaple/stm32f1/performance/isrs.S
  [AS]        ./libmaple/stm32f1/performance/vector_table.S
  [CC]        ./libmaple/stm32f1/adc.c
  [CC]        ./libmaple/stm32f1/bkp.c
  [CC]        ./libmaple/stm32f1/dma.c
  [CC]        ./libmaple/stm32f1/exti.c
  [CC]        ./libmaple/stm32f1/fsmc.c
  [CC]        ./libmaple/stm32f1/gpio.c
  [CC]        ./libmaple/stm32f1/i2c.c
  [CC]        ./libmaple/stm32f1/rcc.c
  [CC]        ./libmaple/stm32f1/spi.c
  [CC]        ./libmaple/stm32f1/timer.c
  [CC]        ./libmaple/stm32f1/usart.c
  [AS]        ./wirish/start.S
  [CC]        ./wirish/start_c.c
  [CC]        ./wirish/syscalls.c
  [CC]        ./wirish/stm32f1/util_hooks.c
  [CXX]       ./wirish/boards.cpp
  [CXX]       ./wirish/cxxabi-compat.cpp
  [CXX]       ./wirish/ext_interrupts.cpp
  [CXX]       ./wirish/HardwareSerial.cpp
  [CXX]       ./wirish/HardwareTimer.cpp
  [CXX]       ./wirish/Print.cpp
  [CXX]       ./wirish/pwm.cpp
  [CXX]       ./wirish/usb_serial.cpp
  [CXX]       ./wirish/HardwareSPI.cpp
  [CXX]       ./wirish/wirish_analog.cpp
  [CXX]       ./wirish/wirish_digital.cpp
  [CXX]       ./wirish/wirish_math.cpp
  [CXX]       ./wirish/wirish_shift.cpp
  [CXX]       ./wirish/wirish_time.cpp
  [CXX]       ./wirish/stm32f1/boards_setup.cpp
  [CXX]       ./wirish/stm32f1/wirish_digital.cpp
  [CXX]       ./wirish/stm32f1/wirish_debug.cpp
  [CXX]       ./wirish/boards/maple_mini/board.cpp
  [CXX]       ./libraries/Servo/Servo.cpp
  [CXX]       ./libraries/LiquidCrystal/LiquidCrystal.cpp
  [CXX]       ./libraries/Wire/WireBase.cpp
  [CXX]       ./libraries/Wire/HardWire.cpp
  [CXX]       ./libraries/Wire/Wire.cpp
  [CXX]       main.cpp
  [LD]        maple_mini.elf
  [OBJCOPY]   maple_mini.bin
  [DISAS]     maple_mini.disas

Object file sizes:
   text	   data	    bss	    dec	    hex	filename
     84	      0	      0	     84	     54	build/libmaple/exc.o
     18	      0	      0	     18	     12	build/libmaple/pwr.o
     20	      0	      0	     20	     14	build/libmaple/gpio.o
     28	      0	      0	     28	     1c	build/libmaple/dma.o
    108	      0	      0	    108	     6c	build/libmaple/adc.o
    132	      0	      0	    132	     84	build/libmaple/nvic.o
    272	      0	      0	    272	    110	build/libmaple/usart.o
   1079	      0	      0	   1079	    437	build/libmaple/i2c.o
    192	      0	      0	    192	     c0	build/libmaple/dac.o
    626	      0	    128	    754	    2f2	build/libmaple/exti.o
    192	     32	      0	    224	     e0	build/libmaple/stm32f1/gpio.o
   1195	     68	      0	   1263	    4ef	build/libmaple/stm32f1/dma.o
    142	     24	      0	    166	     a6	build/libmaple/stm32f1/adc.o
    343	    252	     36	    631	    277	build/libmaple/stm32f1/usart.o
    232	     72	      0	    304	    130	build/libmaple/stm32f1/i2c.o
    161	      8	      0	    169	     a9	build/libmaple/stm32f1/bkp.o
     20	      0	      0	     20	     14	build/libmaple/stm32f1/exti.o
    556	      0	      0	    556	    22c	build/libmaple/stm32f1/timer.o
      0	      0	      0	      0	      0	build/libmaple/stm32f1/performance/vector_table.o
      2	      0	      0	      2	      2	build/libmaple/stm32f1/performance/isrs.o
      0	      0	      0	      0	      0	build/libmaple/stm32f1/fsmc.o
    497	     20	      0	    517	    205	build/libmaple/stm32f1/rcc.o
    130	     24	      0	    154	     9a	build/libmaple/stm32f1/spi.o
    747	    164	      0	    911	    38f	build/libmaple/timer.o
    356	      0	      0	    356	    164	build/libmaple/util.o
     20	      0	      0	     20	     14	build/libmaple/flash.o
     36	      0	      0	     36	     24	build/libmaple/usart_private.o
     66	      0	      0	     66	     42	build/libmaple/usb/usb_lib/usb_mem.o
   1680	      0	      0	   1680	    690	build/libmaple/usb/usb_lib/usb_regs.o
     52	      0	      0	     52	     34	build/libmaple/usb/usb_lib/usb_init.o
   2018	      0	      1	   2019	    7e3	build/libmaple/usb/usb_lib/usb_core.o
   1479	    189	     86	   1754	    6da	build/libmaple/usb/stm32f1/usb_cdcacm.o
    200	      0	      0	    200	     c8	build/libmaple/usb/stm32f1/usb_reg_map.o
    783	     20	      0	    803	    323	build/libmaple/usb/stm32f1/usb.o
     80	      0	      4	     84	     54	build/libmaple/systick.o
    152	      0	      0	    152	     98	build/libmaple/rcc.o
     48	      0	      0	     48	     30	build/libmaple/iwdg.o
    222	      0	      0	    222	     de	build/libmaple/spi.o
   1276	      0	      0	   1276	    4fc	build/libraries/LiquidCrystal/LiquidCrystal.o
    148	      0	      0	    148	     94	build/libraries/Wire/HardWire.o
    630	      4	     88	    722	    2d2	build/libraries/Wire/Wire.o
    312	      0	      0	    312	    138	build/libraries/Wire/WireBase.o
    466	      0	      0	    466	    1d2	build/libraries/Servo/Servo.o
    130	      4	      0	    134	     86	build/main.o
    612	      4	      5	    621	    26d	build/wirish/usb_serial.o
     93	      0	      0	     93	     5d	build/wirish/pwm.o
      2	      0	      0	      2	      2	build/wirish/cxxabi-compat.o
    457	      4	     21	    482	    1e2	build/wirish/HardwareTimer.o
     72	      0	      0	     72	     48	build/wirish/wirish_shift.o
     50	      0	      0	     50	     32	build/wirish/wirish_math.o
     36	      0	      0	     36	     24	build/wirish/stm32f1/wirish_debug.o
    142	      0	      0	    142	     8e	build/wirish/stm32f1/wirish_digital.o
     54	     15	      0	     69	     45	build/wirish/stm32f1/boards_setup.o
    128	      0	      0	    128	     80	build/wirish/stm32f1/util_hooks.o
     96	      0	      0	     96	     60	build/wirish/start_c.o
    230	      0	      0	    230	     e6	build/wirish/wirish_digital.o
    807	      0	      0	    807	    327	build/wirish/HardwareSPI.o
    441	      4	     36	    481	    1e1	build/wirish/HardwareSerial.o
    462	      2	      0	    464	    1d0	build/wirish/boards.o
     24	      0	      0	     24	     18	build/wirish/wirish_analog.o
     24	      0	      0	     24	     18	build/wirish/start.o
     38	      0	      0	     38	     26	build/wirish/wirish_time.o
    200	      0	      0	    200	     c8	build/wirish/ext_interrupts.o
    272	      0	      4	    276	    114	build/wirish/syscalls.o
    269	    548	      0	    817	    331	build/wirish/boards/maple_mini/board.o
    965	      0	      0	    965	    3c5	build/wirish/Print.o
  22404	   1458	    409	  24271	   5ecf	(TOTALS)

Final Size:
   text	   data	    bss	    dec	    hex	filename
  13140	   2488	    544	  16172	   3f2c	build/maple_mini.elf
  [OBJCOPY]   maple_mini.hex
[tom@trona libmaple]$
Amazing. It works first time. No compile errors or warnings.

Note that "make V=1" will give detailed commands. This is actually quite a nice system and worth getting familiar with.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org