Bläddra i källkod

chore: use CMSIS V4 or CMSIS V5 directory structure

closes #7
Dmitry 8 år sedan
förälder
incheckning
083821a33f
2 ändrade filer med 11 tillägg och 9 borttagningar
  1. 6 7
      Makefile
  2. 5 2
      readme.md

+ 6 - 7
Makefile

@@ -1,6 +1,6 @@
 CMSIS       ?=../../CMSIS
-CMSISDEV     = $(CMSIS)/Device/ST
-CMSISINC     = $(CMSIS)/Include
+CMSISDEV    ?= $(CMSIS)/Device
+CMSISCORE   ?= $(CMSIS)/CMSIS/Include $(CMSIS)/CMSIS/Core/Include
 FLASH       ?= st-flash
 TOOLSET     ?= arm-none-eabi-
 CC           = $(TOOLSET)gcc
@@ -8,18 +8,17 @@ LD           = $(TOOLSET)gcc
 AR           = $(TOOLSET)gcc-ar
 OBJCOPY      = $(TOOLSET)objcopy
 
-
-STARTUP.stm32l052x8  = $(CMSISDEV)/STM32L0xx/Source/Templates/gcc/startup_stm32l052xx.s
+STARTUP.stm32l052x8  = $(CMSISDEV)/ST/STM32L0xx/Source/Templates/gcc/startup_stm32l052xx.s
 CFLAGS.stm32l052x8   = -mcpu=cortex-m0plus -mfloat-abi=soft
 DEFINES.stm32l052x8  = STM32L0 STM32L052xx
 LDSCRIPT.stm32l052x8 = demo/stm32l052x8.ld
 
-STARTUP.stm32l100xc  = $(CMSISDEV)/STM32L1xx/Source/Templates/gcc/startup_stm32l100xc.s
+STARTUP.stm32l100xc  = $(CMSISDEV)/ST/STM32L1xx/Source/Templates/gcc/startup_stm32l100xc.s
 CFLAGS.stm32l100xc   = -mcpu=cortex-m3 -mfloat-abi=soft
 DEFINES.stm32l100xc  = STM32L1 STM32L100xC
 LDSCRIPT.stm32l100xc = demo/stm32l100xc.ld
 
-STARTUP.stm32l476rg  = $(CMSISDEV)/STM32L4xx/Source/Templates/gcc/startup_stm32l476xx.s
+STARTUP.stm32l476rg  = $(CMSISDEV)/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l476xx.s
 CFLAGS.stm32l476rg   = -mcpu=cortex-m4
 DEFINES.stm32l476rg  = STM32L4 STM32L476xx
 LDSCRIPT.stm32l476rg = demo/stm32l476xg.ld
@@ -37,7 +36,7 @@ MODULE      ?= libusb_stm32.a
 CFLAGS      ?= $(CFLAGS.$(MCU))
 CFLAGS2      = -mthumb -Os -std=gnu99
 DEFINES     ?= $(DEFINES.$(MCU)) FORCE_C_DRIVER
-INCLUDES    ?= $(CMSISDEV) $(CMSISINC) .
+INCLUDES    ?= $(CMSISDEV)/ST $(CMSISCORE) .
 SOURCES      = $(wildcard src/*.c) $(wildcard src/*.S)
 OBJECTS      = $(addsuffix .o, $(basename $(SOURCES)))
 ARFLAGS     ?= -cvq

+ 5 - 2
readme.md

@@ -7,6 +7,8 @@
 
 ### 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
 
 ### Supported hardware ###
@@ -17,7 +19,7 @@
 | usb_stmv0a | GCC ASM    | 8         | Internal S/N, Doublebuffered, BC1.2 | STM32L0x2 STM32L0x3 STM32L4x2 STM32L4x3 STM32F0x2 STM32F0x8 |
 | usb_stmv1  | GCC C      | 8         | Internal S/N, Doublebuffered | STM32L1xx  |
 | usb_stmv1a | GCC ASM    | 8         | Internal S/N, Doublebuffered | STM32L1xx  |
-| usb_stmv2  | GCC C      | 6         | Internal S/N, Doublebuffered, BC1.2 | STM32L4x5 STM32L4x6 (OTG FS (Device mode)) |
+| usb_stmv2  | GCC C      | 6         | Internal S/N, Doublebuffered, BC1.2 | STM32L4x5 STM32L4x6 (OTG FS Device mode) |
 | usb_stmv3  | GCC C      | 8         | Internal S/N, Doublebuffered | STM32F1xx STM32F3xx  |
 
 1. Single physical endpoint can be used to implement
@@ -54,10 +56,11 @@ make program
 | Variable | Default Value                       | Means                         |
 |----------|-------------------------------------|-------------------------------|
 | CMSIS    | ../../CMSIS                         | path to CMSIS root folder     |
+| CMSISDEV | $(CMSIS)/Device                     | path to CMSIS device folder   |
+| CMSISCORE| $(CMSIS)/CMSIS/Include $(CMSIS)/CMSIS/Core/Include | path to CMSIS core headers |
 | MCU      | stm32l100xc                         | MCU selection for demo project|
 | CFLAGS   | -mcpu=cortex-m3 -mfloat-abi=soft    | MCU specified compiler flags  |
 | DEFINES  | STM32L1 STM32L100xC                 | MCU specified defines         |
-| INCLUDES | $(CMSIS)/Device/ST $(CMSIS)/Include | path to ST CMSIS includes     |
 
 ### Useful Resources ###
 1. [USB Implementers Forum official site](http://www.usb.org/home)