refactor: set py32f030 as default part

This commit is contained in:
IOsetting 2023-01-19 23:53:38 +08:00
parent 9b1847fe09
commit 7d51b453e6
2 changed files with 8 additions and 14 deletions

View File

@ -30,7 +30,7 @@ JLINKEXE ?= /opt/SEGGER/JLink/JLinkExe
# PY32F002AX5, PY32F002X5, # PY32F002AX5, PY32F002X5,
# PY32F003X4, PY32F003X6, PY32F003X8, # PY32F003X4, PY32F003X6, PY32F003X8,
# PY32F030X4, PY32F030X6, PY32F030X7, PY32F030X8 # PY32F030X4, PY32F030X6, PY32F030X7, PY32F030X8
JLINK_DEVICE ?= PY32F003X8 JLINK_DEVICE ?= PY32F030X8
# path to PyOCD, # path to PyOCD,
PYOCD_EXE ?= pyocd PYOCD_EXE ?= pyocd
# PyOCD device type, options: # PyOCD device type, options:
@ -38,19 +38,19 @@ PYOCD_EXE ?= pyocd
# py32f003x4, py32f003x6, py32f003x8, # py32f003x4, py32f003x6, py32f003x8,
# py32f030x3, py32f030x4, py32f030x6, py32f030x7, py32f030x8 # py32f030x3, py32f030x4, py32f030x6, py32f030x7, py32f030x8
# py32f072xb # py32f072xb
PYOCD_DEVICE ?= py32f003x8 PYOCD_DEVICE ?= py32f030x8
##### Paths ############ ##### Paths ############
# Link descript file: py32f002x5.ld, py32f003x6.ld, py32f003x8.ld, py32f030x6.ld, py32f030x8.ld # Link descript file: py32f002x5.ld, py32f003x6.ld, py32f003x8.ld, py32f030x6.ld, py32f030x8.ld
LDSCRIPT = Libraries/LDScripts/py32f003x8.ld LDSCRIPT = Libraries/LDScripts/py32f030x8.ld
# Library build flags: # Library build flags:
# PY32F002x5, PY32F002Ax5, # PY32F002x5, PY32F002Ax5,
# PY32F003x4, PY32F003x6, PY32F003x8, # PY32F003x4, PY32F003x6, PY32F003x8,
# PY32F030x3, PY32F030x4, PY32F030x6, PY32F030x7, PY32F030x8, # PY32F030x3, PY32F030x4, PY32F030x6, PY32F030x7, PY32F030x8,
# PY32F072xB # PY32F072xB
LIB_FLAGS = PY32F003x8 LIB_FLAGS = PY32F030x8
# C source folders # C source folders
CDIRS := User \ CDIRS := User \
@ -61,7 +61,7 @@ CFILES :=
# ASM source folders # ASM source folders
ADIRS := User ADIRS := User
# ASM single files # ASM single files
AFILES := Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f003.s AFILES := Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f030.s
# Include paths # Include paths
INCLUDES := Libraries/CMSIS/Core/Include \ INCLUDES := Libraries/CMSIS/Core/Include \

View File

@ -34,11 +34,9 @@ static void APP_LedConfig(void);
int main(void) int main(void)
{ {
HAL_Init(); HAL_Init();
/* LED GPIO init */
APP_LedConfig(); APP_LedConfig();
BSP_USART_Config(); BSP_USART_Config();
printf("SystemClk:%ld\r\n", SystemCoreClock);
while (1) while (1)
{ {
@ -64,9 +62,7 @@ static void APP_LedConfig(void)
void APP_ErrorHandler(void) void APP_ErrorHandler(void)
{ {
while (1) while (1);
{
}
} }
#ifdef USE_FULL_ASSERT #ifdef USE_FULL_ASSERT
@ -76,9 +72,7 @@ void APP_ErrorHandler(void)
void assert_failed(uint8_t *file, uint32_t line) void assert_failed(uint8_t *file, uint32_t line)
{ {
/* printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
while (1) while (1);
{
}
} }
#endif /* USE_FULL_ASSERT */ #endif /* USE_FULL_ASSERT */