diff --git a/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f003.s b/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f003.s index dfdca33..78fb610 100644 --- a/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f003.s +++ b/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f003.s @@ -13,7 +13,7 @@ */ .syntax unified - .cpu cortex-m0 + .cpu cortex-m0plus .fpu softvfp .thumb diff --git a/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f030.s b/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f030.s index ff0befc..cd973ab 100644 --- a/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f030.s +++ b/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f030.s @@ -1,7 +1,7 @@ /** ****************************************************************************** - * @file startup_py32f003x6.s - * @brief PY32F003X6 devices vector table for GCC toolchain. + * @file startup_py32f030x6.s + * @brief PY32F030X6 devices vector table for GCC toolchain. * This module performs: * - Set the initial SP * - Set the initial PC == Reset_Handler, @@ -13,7 +13,7 @@ */ .syntax unified - .cpu cortex-m0 + .cpu cortex-m0plus .fpu softvfp .thumb diff --git a/Libraries/LDScripts/py32f030x6.ld b/Libraries/LDScripts/py32f030x6.ld index 86273e4..d3351db 100644 --- a/Libraries/LDScripts/py32f030x6.ld +++ b/Libraries/LDScripts/py32f030x6.ld @@ -3,7 +3,7 @@ ** ** File : LinkerScript.ld ** -** Abstract : Linker script for PY32F003x6 series +** Abstract : Linker script for PY32F030x6 series ** Set heap size, stack size and stack location according ** to application requirements. ** Set memory bank area and size if external memory is used. diff --git a/Libraries/LDScripts/py32f030x8.ld b/Libraries/LDScripts/py32f030x8.ld index 3d4fed5..c76e498 100644 --- a/Libraries/LDScripts/py32f030x8.ld +++ b/Libraries/LDScripts/py32f030x8.ld @@ -3,7 +3,7 @@ ** ** File : LinkerScript.ld ** -** Abstract : Linker script for PY32F003x8 series +** Abstract : Linker script for PY32F030x8 series ** Set heap size, stack size and stack location according ** to application requirements. ** Set memory bank area and size if external memory is used. diff --git a/Makefile b/Makefile index 0bea47f..40b5816 100644 --- a/Makefile +++ b/Makefile @@ -18,19 +18,20 @@ ARM_TOOCHAIN ?= /opt/gcc-arm/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bi # path to JLinkExe JLINKEXE ?= /opt/SEGGER/JLink/JLinkExe -# MCU type: PY32F003X4, PY32F003X6, PY32F003X8 -JLINK_DEVICE ?= PY32F003X6 -# path to PyOCD +# JLink device type, options: PY32F003X4, PY32F003X6, PY32F003X8, PY32F030X6, PY32F030X7, PY32F030X8 +JLINK_DEVICE ?= PY32F003X8 +# path to PyOCD, PYOCD_EXE ?= pyocd -PYOCD_DEVICE ?= py32f003x6 +# PyOCD device type, options: py32f003x4, py32f003x6, py32f003x8, py32f030x3, py32f030x4, py32f030x6, py32f030x7, py32f030x8 +PYOCD_DEVICE ?= py32f003x8 ##### Paths ############ # Link descript file -LDSCRIPT = Libraries/LDScripts/py32f003x6.ld +LDSCRIPT = Libraries/LDScripts/py32f003x8.ld # Library build flags: PY32F030x3, PY32F030x4, PY32F030x6, PY32F030x7, PY32F030x8, PY32F003x4, PY32F003x6, PY32F003x8 -LIB_FLAGS = PY32F003x6 +LIB_FLAGS = PY32F003x8 # C source folders CDIRS := User \ diff --git a/rules.mk b/rules.mk index 346cfdd..f05360f 100644 --- a/rules.mk +++ b/rules.mk @@ -106,7 +106,7 @@ flash: ifeq ($(FLASH_PROGRM),jlink) $(JLINKEXE) -device $(JLINK_DEVICE) -if swd -speed 4000 -CommanderScript $(TOP)/Misc/flash.jlink else ifeq ($(FLASH_PROGRM),pyocd) - $(PYOCD_EXE) erase -c -t $(PYOCD_DEVICE) --config $(TOP)/Misc/pyocd.yaml + $(PYOCD_EXE) erase -t $(PYOCD_DEVICE) --chip --config $(TOP)/Misc/pyocd.yaml $(PYOCD_EXE) load $(BDIR)/$(PROJECT).hex -t $(PYOCD_DEVICE) --config $(TOP)/Misc/pyocd.yaml else @echo "FLASH_PROGRM is invalid\n"