diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2018-01-23 23:24:53 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2018-01-23 23:24:53 -0700 |
commit | 2545ae2d57e5b70975e3fd3b3e570da13dbf62f0 (patch) | |
tree | a8fe7fe54688defdab1ce5fcd83f66f17eb5bb4b /03-refactor/Makefile.preamble | |
parent | 7aa10db46c13ad8adc88aadff39b8cf6b15db09d (diff) | |
download | stm32l4-2545ae2d57e5b70975e3fd3b3e570da13dbf62f0.tar.gz stm32l4-2545ae2d57e5b70975e3fd3b3e570da13dbf62f0.tar.bz2 stm32l4-2545ae2d57e5b70975e3fd3b3e570da13dbf62f0.zip |
start refactor process. Change rcc->c_r to bitfield.
Diffstat (limited to '03-refactor/Makefile.preamble')
-rw-r--r-- | 03-refactor/Makefile.preamble | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/03-refactor/Makefile.preamble b/03-refactor/Makefile.preamble new file mode 100644 index 0000000..3c8a61b --- /dev/null +++ b/03-refactor/Makefile.preamble @@ -0,0 +1,21 @@ +OPT?=-O +PREFIX?=arm-unknown-eabi- +CC=$(PREFIX)gcc +LD=$(PREFIX)ld +CFLAGS?=$(OPT) -mcpu=cortex-m4 -mthumb -g -lgcc -static -nostartfiles -Iinclude +LD_FLAGS?=-T linker/linker_script.ld -nostdlib --cref -Map linker/main.map -static + + +all: _$(PREFIX)_obs/main.elf + +_$(PREFIX)_obs/main.bin: _$(PREFIX)_obs/main.elf + $(PREFIX)objcopy -O binary _$(PREFIX)_obs/main.elf _$(PREFIX)_obs/main.bin + +flash: _$(PREFIX)_obs/main.bin + st-flash write _$(PREFIX)_obs/main.bin 0x8000000 + +clean: + rm -rf _*_obs + +genmake: + ./genmake.pl > Makefile |