Skip to content

Commit

Permalink
bl
Browse files Browse the repository at this point in the history
  • Loading branch information
fishpepper committed Sep 15, 2017
1 parent 6fe986f commit 0b0adb6
Show file tree
Hide file tree
Showing 11 changed files with 891 additions and 59 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -64,6 +64,7 @@ STYLECHECK := /checkpatch.pl
STYLECHECKFLAGS := --no-tree -f --terse --mailback
STYLECHECKFILES := $(shell find . -name '*.[ch]')
OPT := -Os
SIZE := $(PREFIX)-size
CSTD ?= -std=gnu99


Expand Down Expand Up @@ -177,6 +178,10 @@ $(OBJECT_DIR)/%.o: $(SOURCE_DIR)/%.c libopencm3 obj_dir
@printf " CC $(*).c\n"
$(Q)$(CC) $(TGT_CFLAGS) $(CFLAGS) -o $(OBJECT_DIR)/$(*).o -c $(SOURCE_DIR)/$(*).c

size: $(BIN_DIR)/$(TARGET).elf
@printf "\n"
$(Q)$(SIZE) $(BIN_DIR)/$(TARGET).elf

clean:
@#printf " CLEAN\n"
$(Q)$(RM) $(OBJECT_DIR)/*.o $(OBJECT_DIR)/*.d $(BIN_DIR)/*.elf $(BIN_DIR)*.bin $(BIN_DIR)*.hex $(BIN_DIR)/*.srec $(BIN_DIR)/*.lst $(BIN_DIR)/*.map generated.* ${OBJS} ${OBJS:%.o:%.d}
Expand Down
5 changes: 5 additions & 0 deletions bootloader/Makefile
Expand Up @@ -53,6 +53,7 @@ STYLECHECK := /checkpatch.pl
STYLECHECKFLAGS := --no-tree -f --terse --mailback
STYLECHECKFILES := $(shell find . -name '*.[ch]')
OPT := -Os
SIZE := $(PREFIX)-size
CSTD ?= -std=gnu99


Expand Down Expand Up @@ -185,6 +186,10 @@ obj_dir:
@mkdir -p ${OBJECT_DIR}
@mkdir -p ${OBJECT_DIR}/eeprom_emulation

size: $(BIN_DIR)/$(TARGET).elf
@printf "\n"
$(Q)$(SIZE) $(BIN_DIR)/$(TARGET).elf

ifeq ($(STLINK_PORT),)
ifeq ($(BMP_PORT),)
ifeq ($(OOCD_FILE),)
Expand Down
4 changes: 2 additions & 2 deletions bootloader/linker/stm32f301k8.ld
@@ -1,8 +1,8 @@
/* linker script for STM32F051R8T6, 64K flash, 8K RAM) */
/* linker script for STM32F301K8, 64K flash, 16K RAM) */

/* define memory regions */
MEMORY {
rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K
rom (rx) : ORIGIN = 0x08000000, LENGTH = 20*2K
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 16K
}

Expand Down

0 comments on commit 0b0adb6

Please sign in to comment.