diff options
author | Dmitry Filimonchuk <dmitrystu@gmail.com> | 2020-07-07 23:25:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 23:25:06 +0300 |
commit | 1b38350fc2474875487904ae17eb7dcf5578f7f0 (patch) | |
tree | 4b9178f577cb479fe84258bca05a2845ea7de369 | |
parent | 8da5559fdf345673a50a2a10234ff80f836bc8e6 (diff) | |
parent | 030e3b47b83534d5188191accf39bc6d24bfb933 (diff) |
Merge pull request #61 from a-v-v/make-cmsis
Makefile rule for downloading requirements
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | readme.md | 4 |
2 files changed, 11 insertions, 3 deletions
@@ -1,4 +1,4 @@ -CMSIS ?=../../CMSIS +CMSIS ?= CMSIS CMSISDEV ?= $(CMSIS)/Device CMSISCORE ?= $(CMSIS)/CMSIS/Include $(CMSIS)/CMSIS/Core/Include FLASH ?= st-flash @@ -53,6 +53,7 @@ help all: @echo ' stm32l052x8 CDC loopback demo for STM32L052x8 based boards' @echo ' 32f429zi-nucleo' @echo ' stm32f429xi CDC loopback demo for STM32F429xI based boards' + @echo ' cmsis Download CMSIS 5 and stm32.h into a $$(CMSIS) directory' @echo ' doc DOXYGEN documentation' @echo ' module static library module using following envars (defaults)' @echo ' MODULE module name ($(MODULE))' @@ -71,6 +72,11 @@ help all: @echo ' make bluepill program' @echo ' make module MODULE="usbd.a" CFLAGS="-mcpu=cotrex-m4" DEFINES="STM32L4 STM32L476xx USBD_VBUS_DETECT"' +.PHONY: cmsis +cmsis: + @git clone --depth 1 https://github.com/ARM-software/CMSIS_5.git $(CMSIS) + @git clone --recurse-submodules --depth 1 https://github.com/dmitrystu/stm32h.git $(CMSISDEV)/ST + $(OBJDIR): @mkdir $@ @@ -207,4 +213,4 @@ stm32f373xc: clean @$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F3xx/Source/Templates/gcc/startup_stm32f373xc.s' \ LDSCRIPT='demo/stm32f373xc.ld' \ DEFINES='STM32F3 STM32F373xC USBD_SOF_DISABLED USBD_ASM_DRIVER' \ - CFLAGS='-mcpu=cortex-m4'
\ No newline at end of file + CFLAGS='-mcpu=cortex-m4' @@ -8,9 +8,11 @@ ### Requirements ### + [CMSIS V4](https://github.com/ARM-software/CMSIS) or [CMSIS V5](https://github.com/ARM-software/CMSIS_5). -+ Device peripheral access layer header files for STM32. See [Vendor Template](https://github.com/ARM-software/CMSIS/tree/master/Device/_Template_Vendor) for details. + [stm32.h](https://github.com/dmitrystu/stm32h) STM32 universal header +All requirements can be downloaded into a directory specified in environment variable `CMSIS` using +`make cmsis` command. + ### Supported hardware ### <table> |