Skip to content

Commit c5a0ffb

Browse files
committed
Add support for SMT32 Smart V2 board
This is a generic board with PC13 led, PA0 user button and STM32F103C8T6 microprocessor
1 parent f9cc0e9 commit c5a0ffb

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ gd32f1-generic-pc13: begin clean gccversion build_gd32f1-generic-pc13 sizeafter
139139
gd32f1-frankenmaple: begin clean gccversion build_gd32f1-frankenmaple sizeafter finished copy_gd32f1-frankenmaple end
140140
cc3d: begin clean gccversion build_cc3d sizeafter finished copy_cc3d end
141141
generic-pc13-fastboot: begin clean gccversion build_generic-pc13-fastboot sizeafter finished copy_generic-pc13-fastboot end
142+
smart-v2: begin clean gccversion build_smart-v2 sizeafter finished copy_smart-v2 end
142143

143144
build: elf bin lss sym
144145

@@ -439,6 +440,16 @@ copy_generic-pc13-fastboot:
439440
cp $(TARGET).bin bootloader_only_binaries/generic_boot20_pc13_fastboot.bin
440441
@echo
441442

443+
build_smart-v2: TARGETFLAGS= -DTARGET_STM32_SMART_V20 $(DEFINES)
444+
# Set the linker script
445+
build_smart-v2: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
446+
build_smart-v2: elf bin lss sym
447+
copy_smart-v2:
448+
@echo
449+
@echo "Copying to binaries folder"
450+
@echo
451+
cp $(TARGET).bin bootloader_only_binaries/smart-v2.bin
452+
@echo
442453

443454
bin: $(TARGET).bin
444455
elf: $(TARGET).elf
6.96 KB
Binary file not shown.

config.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@
388388
/* CRISTAL 12MHz */
389389
#define XTAL12M 1
390390

391+
#elif defined TARGET_STM32_SMART_V20
392+
393+
#define LED_BANK GPIOC
394+
#define LED_PIN 13
395+
#define LED_ON_STATE 1
396+
397+
#define BUTTON_BANK GPIOA
398+
#define BUTTON_PIN 0
399+
#define BUTTON_PRESSED_STATE 1
400+
401+
/* CRISTAL 8MHz */
402+
391403
#elif defined TARGET_CC3D
392404

393405
#define LED_BANK GPIOB

0 commit comments

Comments
 (0)