Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/flipperdevices/libusb_stm32.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Voronov <avv.0@ya.ru>2020-07-11 00:14:17 +0300
committerAlexander Voronov <avv.0@ya.ru>2020-07-11 00:14:17 +0300
commit83519f9ae43aa7f33560ffa539873f9fab9f2344 (patch)
tree7d50f935b0161a69d444135733a5202defbb6264
parentb3434fa65887f1cd18d00a8d7d44f98af7d4e1c1 (diff)
parent08985fd91433ef9a2afda22cb49e3a9a1317bc23 (diff)
Merge branch 'master' into linkage
-rw-r--r--.travis.yml58
-rw-r--r--Makefile13
-rw-r--r--demo/stm32f373xc.ld87
-rw-r--r--inc/usb_dfu.h2
-rw-r--r--readme.md2
5 files changed, 156 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..96b5cc8
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,58 @@
+
+language: c
+
+matrix:
+ include:
+ - os: linux
+ install:
+ - export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2?revision=c34d758a-be0c-476e-a2de-af8c6e16a8a2?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,8-2019-q3-update
+ - pushd $HOME
+ - mkdir arm-gcc-toolchain
+ - wget -O $HOME/arm-gcc-toolchain/gcc.tar.bz2 $GCC_URL
+ - cd arm-gcc-toolchain
+ - tar -jxf gcc.tar.bz2 --strip=1
+ - export PATH=$HOME/arm-gcc-toolchain/bin:$PATH
+ - export GMAKE=make
+ - popd
+
+ - os: windows
+ install:
+ - export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32.zip?revision=2f0fd855-d015-423c-9c76-c953ae7e730b?product=GNU%20Arm%20Embedded%20Toolchain,ZIP,,Windows,8-2019-q3-update
+ - pushd $HOME
+ - mkdir arm-gcc-toolchain
+ - wget --no-check-certificate -O arm-gcc.zip $GCC_URL
+ - 7z x arm-gcc.zip -oarm-gcc-toolchain -r -y
+ - export PATH=$HOME/arm-gcc-toolchain/bin:$PATH
+ - export GMAKE="mingw32-make SHELL=cmd"
+ - popd
+
+ - os: osx
+ install:
+ - export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-mac.tar.bz2?revision=6a06dd2b-bb98-4708-adac-f4c630c33f4f?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Mac%20OS%20X,8-2019-q3-update
+ - pushd $HOME
+ - mkdir arm-gcc-toolchain
+ - wget -O ./arm-gcc-toolchain/gcc.tar.bz2 $GCC_URL
+ - cd arm-gcc-toolchain
+ - tar -jxf gcc.tar.bz2 --strip=1
+ - export PATH=$HOME/arm-gcc-toolchain/bin:$PATH
+ - export GMAKE=make
+ - popd
+
+before_script:
+ - $GMAKE -v
+ - arm-none-eabi-gcc --version
+
+script:
+ - $GMAKE cmsis
+ - $GMAKE stm32f103x6
+ - $GMAKE stm32f303xe
+ - $GMAKE stm32f105xb
+ - $GMAKE stm32l052x8
+ - $GMAKE stm32l100xc
+ - $GMAKE stm32l476xg
+ - $GMAKE stm32f429xi
+ - $GMAKE stm32l433cc
+ - $GMAKE stm32f070xb
+ - $GMAKE stm32g431xb
+ - $GMAKE stm32f446xc
+ - $GMAKE stm32f373xc
diff --git a/Makefile b/Makefile
index 1df5c50..afa0c6e 100644
--- a/Makefile
+++ b/Makefile
@@ -72,10 +72,13 @@ 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
+cmsis: $(CMSISDEV)/ST
+
+$(CMSISDEV)/ST: $(CMSIS)
+ @git clone --recurse-submodules --depth 1 https://github.com/dmitrystu/stm32h.git $@
+
+$(CMSIS):
+ @git clone --depth 1 https://github.com/ARM-software/CMSIS_5.git $@
$(OBJDIR):
@mkdir $@
@@ -128,7 +131,7 @@ $(OBJDIR)/%.o: %.s
@echo assembling $<
@$(CC) $(CFLAGS2) $(addprefix -D, $(DEFINES)) $(addprefix -I, $(INCLUDES)) -c $< -o $@
-.PHONY: module doc demo clean program help all program_stcube
+.PHONY: module doc demo clean program help all program_stcube cmsis
stm32f103x6 bluepill: clean
@$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103x6.s' \
diff --git a/demo/stm32f373xc.ld b/demo/stm32f373xc.ld
new file mode 100644
index 0000000..5230b2c
--- /dev/null
+++ b/demo/stm32f373xc.ld
@@ -0,0 +1,87 @@
+ENTRY(Reset_Handler)
+MEMORY
+{
+ ROM (rx): ORIGIN = 0x08000000, LENGTH = 256K
+ RAM (rwx): ORIGIN = 0x20000000, LENGTH = 32K
+}
+SECTIONS
+{
+ .text :
+ {
+ KEEP(*(.isr_vector))
+ *(.text*)
+ KEEP(*(.init)) KEEP(*(.fini))
+ *crtbegin.o(.ctors)
+ *crtbegin?.o(.ctors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+ *(SORT(.ctors.*))
+ *(.ctors)
+ *crtbegin.o(.dtors)
+ *crtbegin?.o(.dtors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o).dtors)
+ *(SORT(.dtors.*))
+ *(.dtors)
+ *(.rodata*)
+ KEEP(*(.eh_frame*))
+ } > ROM
+ .ARM.extab :
+ {
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ } > ROM
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > ROM
+ __exidx_end = .;
+ __etext = .;
+ .data : AT (__etext)
+ {
+ __data_start__ = .;
+ *(vtable)
+ *(.data*)
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP(*(.preinit_array))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP(*(SORT(.init_array.*)))
+ KEEP(*(.init_array))
+ PROVIDE_HIDDEN (__init_array_end = .);
+ . = ALIGN(4);
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP(*(SORT(.fini_array.*)))
+ KEEP(*(.fini_array))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+ . = ALIGN(4);
+ __data_end__ = .;
+ } > RAM
+ .bss (NOLOAD) :
+ {
+ __bss_start__ = .;
+ *(.bss*)
+ *(COMMON)
+ __bss_end__ = .;
+ } > RAM
+ .heap (NOLOAD) :
+ {
+ __end__ = .;
+ *(.heap*)
+ __HeapLimit = .;
+ } > RAM
+ .stack_dummy (NOLOAD) :
+ {
+ *(.stack)
+ } > RAM
+ __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+ __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+ PROVIDE(__stack = __StackTop);
+ ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
+ PROVIDE(_estack = __stack);
+ PROVIDE(_sidata = __etext);
+ PROVIDE(_sdata = __data_start__);
+ PROVIDE(_edata = __data_end__);
+ PROVIDE(_sbss = __bss_start__);
+ PROVIDE(_ebss = __bss_end__);
+}
diff --git a/inc/usb_dfu.h b/inc/usb_dfu.h
index 6f0103f..cb05c5b 100644
--- a/inc/usb_dfu.h
+++ b/inc/usb_dfu.h
@@ -47,7 +47,7 @@
* solicit firmware from the device.*/
#define USB_DFU_GETSTATUS 0x03 /**<\brief The host employs this request to facilitate
* synchronization with the device.*/
-#define USB_DFU_CLRSTATAUS 0x04 /**<\brief This request resets DFU machine state to
+#define USB_DFU_CLRSTATUS 0x04 /**<\brief This request resets DFU machine state to
* DFU_IDLE.*/
#define USB_DFU_GETSTATE 0x05 /**<\brief This request solicits a report about the
* state of the device.*/
diff --git a/readme.md b/readme.md
index a7c664c..c82059e 100644
--- a/readme.md
+++ b/readme.md
@@ -1,3 +1,5 @@
+![Travis (.org) branch](https://img.shields.io/travis/dmitrystu/libusb_stm32/master?logo=travis)
+
### Lightweight USB Device Stack ###
+ Lightweight and fast