forked from rogerclarkmelbourne/STM32duino-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Rohit Samineni edited this page Nov 26, 2020
·
2 revisions
Bootloader for STM32F103 boards, for use with the Arduino_STM32 repo and the Arduino IDE.
- GNU Arm Embedded Toolchain ver 4.8
- GNU MAKE Tool
- Both toolchain and make tool must be added to the path.
- define your stm32f103 custom board hardware in config.h, eg:
#elif defined TARGET_CUSTOM_BOARD
#define HAS_MAPLE_HARDWARE 1
#define LED_BANK GPIOB
#define LED_PIN 1
#define LED_ON_STATE 1
/* On the Mini, BUT is PB8 */
#define BUTTON_BANK GPIOB
#define BUTTON 8
/* USB Disc Pin Setup. USB DISC is PB9 */
#define USB_DISC_BANK GPIOB
#define USB_DISC 9
#define USER_CODE_RAM ((u32)0x20000C00)
#define RAM_END ((u32)0x20005000)
- Add rules for your custom board in the MAKE file
custom-board: begin clean gccversion build_custom-board sizeafter finished copy_custom-board end
build_custom-board: TARGETFLAGS= -DTARGET_CUSTOM_BOARD $(DEFINES)
# Set the linker script
build_custom-board: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
build_custom-board: elf bin lss sym
copy_custom-board:
@echo
@echo "Copying to binaries folder"
@echo
cp $(TARGET).bin bootloader_only_binaries/custom-board.bin
@echo
- save the files and enter the command
make custom-board