Comments (8)
Hi prosper00,
These examples and bsp functions were written and tested with py32f030x6 and py32f030f8 flags. I didn't test them with py32f002a flag because all 002a, 003 and 030 are the same.
You can use flag py32f030x6 on py32f002a chips, everything on 030 also works on 002a.
from py32f0-template.
Also, it does work if I go through the BSP_LL/Inc/py32f0xx_bsp_printf.h file and find/replace all occurrences of USART2 to USART1, as well as change this line to 'LL_APB1_GRP2_PERIPH_USART1' as suggested by the build. [The 'LL_PLL_ConfigSystemClock_HSI' and 'LL_PLL_ConfigSystemClock_HSE' still come up though]
./Libraries/BSP_LL/Inc/py32f0xx_bsp_printf.h:35:74: error: 'LL_APB1_GRP1_PERIPH_USART1' undeclared (first use in this function); did you mean 'LL_APB1_GRP2_PERIPH_USART1'?
35 | #define DEBUG_USART_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_USART1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
from py32f0-template.
Because all parts have USART1, I have changed the bsp debug port to USART1.
The bsp printf should work on PY32F002Ax5 now.
from py32f0-template.
Lovely. Works like a charm now; no errors. 'blink' example at least now functions as I'd expect it to on my chip
from py32f0-template.
I found some more issues with 'LIB_FLAGS = PY32F002Ax5'
(this is your LL-TIM1_PWM example):
$ make
CC User/main.c
In file included from ./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_adc.h:32,
from User/main.h:8,
from User/main.c:5:
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_EnableCSS':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:584:20: error: 'RCC_CR_CSSON' undeclared (first use in this function); did you mean 'RCC_CR_HSION'?
584 | SET_BIT(RCC->CR, RCC_CR_CSSON);
| ^~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:584:20: note: each undeclared identifier is reported only once for each function it appears in
584 | SET_BIT(RCC->CR, RCC_CR_CSSON);
| ^~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_EnableBypass':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:594:20: error: 'RCC_CR_HSEBYP' undeclared (first use in this function); did you mean 'RCC_BDCR_LSEBYP'?
594 | SET_BIT(RCC->CR, RCC_CR_HSEBYP);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_DisableBypass':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:604:22: error: 'RCC_CR_HSEBYP' undeclared (first use in this function); did you mean 'RCC_BDCR_LSEBYP'?
604 | CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_Enable':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:614:20: error: 'RCC_CR_HSEON' undeclared (first use in this function); did you mean 'RCC_CR_HSION'?
614 | SET_BIT(RCC->CR, RCC_CR_HSEON);
| ^~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_Disable':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:624:22: error: 'RCC_CR_HSEON' undeclared (first use in this function); did you mean 'RCC_CR_HSION'?
624 | CLEAR_BIT(RCC->CR, RCC_CR_HSEON);
| ^~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_IsReady':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:634:30: error: 'RCC_CR_HSERDY' undeclared (first use in this function); did you mean 'RCC_CR_HSIRDY'?
634 | return ((READ_BIT(RCC->CR, RCC_CR_HSERDY) == (RCC_CR_HSERDY)) ? 1UL : 0UL);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_HSE_SetFreqRegion':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:650:26: error: 'RCC_ECSCR_HSE_FREQ' undeclared (first use in this function); did you mean 'RCC_ICSCR_HSI_TRIM'?
650 | MODIFY_REG(RCC->ECSCR, RCC_ECSCR_HSE_FREQ, HSEFreq);
| ^~~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:183:41: note: in definition of macro 'WRITE_REG'
183 | #define WRITE_REG(REG, VAL) ((REG) = (VAL))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:650:3: note: in expansion of macro 'MODIFY_REG'
650 | MODIFY_REG(RCC->ECSCR, RCC_ECSCR_HSE_FREQ, HSEFreq);
| ^~~~~~~~~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_ClearFlag_HSERDY':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1500:22: error: 'RCC_CICR_HSERDYC' undeclared (first use in this function); did you mean 'RCC_CICR_LSERDYC'?
1500 | SET_BIT(RCC->CICR, RCC_CICR_HSERDYC);
| ^~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_ClearFlag_HSECSS':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1520:22: error: 'RCC_CICR_CSSC' undeclared (first use in this function); did you mean 'LL_RCC_CICR_CSSC'?
1520 | SET_BIT(RCC->CICR, RCC_CICR_CSSC);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_IsActiveFlag_HSERDY':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1571:32: error: 'RCC_CIFR_HSERDYF' undeclared (first use in this function); did you mean 'RCC_CIFR_HSIRDYF'?
1571 | return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSERDYF) == (RCC_CIFR_HSERDYF)) ? 1UL : 0UL);
| ^~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_IsActiveFlag_HSECSS':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1591:32: error: 'RCC_CIFR_CSSF' undeclared (first use in this function); did you mean 'RCC_CIFR_LSECSSF'?
1591 | return ((READ_BIT(RCC->CIFR, RCC_CIFR_CSSF) == (RCC_CIFR_CSSF)) ? 1UL : 0UL);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_EnableNRSTFilter':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1684:23: error: 'RCC_CSR_NRST_FLTDIS' undeclared (first use in this function)
1684 | CLEAR_BIT(RCC->CSR, RCC_CSR_NRST_FLTDIS);
| ^~~~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_DisableNRSTFilter':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1694:21: error: 'RCC_CSR_NRST_FLTDIS' undeclared (first use in this function)
1694 | SET_BIT(RCC->CSR, RCC_CSR_NRST_FLTDIS);
| ^~~~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_IsEnableNRSTFilter':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1704:31: error: 'RCC_CSR_NRST_FLTDIS' undeclared (first use in this function)
1704 | return ((READ_BIT(RCC->CSR, RCC_CSR_NRST_FLTDIS) == (RCC_CSR_NRST_FLTDIS)) ? 0UL : 1UL);
| ^~~~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_EnableIT_HSERDY':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1752:22: error: 'RCC_CIER_HSERDYIE' undeclared (first use in this function); did you mean 'RCC_CIER_LSERDYIE'?
1752 | SET_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
| ^~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_DisableIT_HSERDY':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1802:24: error: 'RCC_CIER_HSERDYIE' undeclared (first use in this function); did you mean 'RCC_CIER_LSERDYIE'?
1802 | CLEAR_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
| ^~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h: In function 'LL_RCC_IsEnabledIT_HSERDY':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_rcc.h:1852:32: error: 'RCC_CIER_HSERDYIE' undeclared (first use in this function); did you mean 'RCC_CIER_LSERDYIE'?
1852 | return ((READ_BIT(RCC->CIER, RCC_CIER_HSERDYIE) == (RCC_CIER_HSERDYIE)) ? 1UL : 0UL);
| ^~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_system.h: In function 'LL_DBGMCU_GetDeviceID':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_system.h:815:46: error: 'DBGMCU_IDCODE_DEV_ID' undeclared (first use in this function); did you mean 'DBGMCU_IDCODE_REV_ID'?
815 | return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID));
| ^~~~~~~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_EnableHalfDuplex':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1088:24: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1088 | SET_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_DisableHalfDuplex':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1101:26: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1101 | CLEAR_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_IsEnabledHalfDuplex':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1114:33: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1114 | return (READ_BIT(USARTx->CR3, USART_CR3_HDSEL) == (USART_CR3_HDSEL));
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_ConfigAsyncMode':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1152:26: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1152 | CLEAR_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_ConfigSyncMode':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1177:26: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1177 | CLEAR_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_ConfigHalfDuplexMode':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1205:24: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1205 | SET_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_ConfigMultiProcessMode':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1232:26: error: 'USART_CR3_HDSEL' undeclared (first use in this function); did you mean 'USART_CR3_CTSE'?
1232 | CLEAR_BIT(USARTx->CR3, USART_CR3_HDSEL);
| ^~~~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:177:43: note: in definition of macro 'CLEAR_BIT'
177 | #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_IsActiveFlag_SBK':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1372:33: error: 'USART_CR1_SBK' undeclared (first use in this function); did you mean 'USART_CR1_WAKE'?
1372 | return (READ_BIT(USARTx->CR1, USART_CR1_SBK) == (USART_CR1_SBK));
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:179:41: note: in definition of macro 'READ_BIT'
179 | #define READ_BIT(REG, BIT) ((REG) & (BIT))
| ^~~
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h: In function 'LL_USART_RequestBreakSending':
./Libraries/PY32F0xx_LL_Driver/Inc/py32f0xx_ll_usart.h:1943:24: error: 'USART_CR1_SBK' undeclared (first use in this function); did you mean 'USART_CR1_WAKE'?
1943 | SET_BIT(USARTx->CR1, USART_CR1_SBK);
| ^~~~~~~~~~~~~
./Libraries/CMSIS/Device/PY32F0xx/Include/py32f0xx.h:175:42: note: in definition of macro 'SET_BIT'
175 | #define SET_BIT(REG, BIT) ((REG) |= (BIT))
| ^~~
make: *** [rules.mk:82: Build/User/main.o] Error 1
It does compile great with LIB_FLAGS = PY32F030x6 as before.
from py32f0-template.
@prosper00 I tried TIM1_PWM example with 'LIB_FLAGS = PY32F002Ax5' but cannot reproduce the error. Are there anything different?
Makefile
##### Project #####
PROJECT ?= app
# The path for generated files
BUILD_DIR = Build
##### Options #####
# Use LL library instead of HAL, y:yes, n:no
USE_LL_LIB ?= y
# Enable printf float %f support, y:yes, n:no
ENABLE_PRINTF_FLOAT ?= n
# Build with FreeRTOS, y:yes, n:no
USE_FREERTOS ?= n
# Build with CMSIS DSP functions, y:yes, n:no
USE_DSP ?= n
# Build with Waveshare e-paper lib, y:yes, n:no
USE_EPAPER ?= n
# Programmer, jlink or pyocd
FLASH_PROGRM ?= jlink
##### Toolchains #######
#ARM_TOOCHAIN ?= /opt/gcc-arm/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/bin
#ARM_TOOCHAIN ?= /opt/gcc-arm/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin
ARM_TOOCHAIN ?= /opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin
# path to JLinkExe
JLINKEXE ?= /opt/SEGGER/JLink/JLinkExe
# JLink device type, options:
# PY32F002AX5, PY32F002X5,
# PY32F003X4, PY32F003X6, PY32F003X8,
# PY32F030X4, PY32F030X6, PY32F030X7, PY32F030X8
JLINK_DEVICE ?= PY32F002AX5
# path to PyOCD,
PYOCD_EXE ?= pyocd
# PyOCD device type, options:
# py32f002ax5, py32f002x5,
# py32f003x4, py32f003x6, py32f003x8,
# py32f030x3, py32f030x4, py32f030x6, py32f030x7, py32f030x8
# py32f072xb
PYOCD_DEVICE ?= py32f002ax5
##### Paths ############
# Link descript file: py32f002x5.ld, py32f003x6.ld, py32f003x8.ld, py32f030x6.ld, py32f030x8.ld
LDSCRIPT = Libraries/LDScripts/py32f002x5.ld
# Library build flags:
# PY32F002x5, PY32F002Ax5,
# PY32F003x4, PY32F003x6, PY32F003x8,
# PY32F030x3, PY32F030x4, PY32F030x6, PY32F030x7, PY32F030x8,
# PY32F072xB
LIB_FLAGS = PY32F002Ax5
# C source folders
CDIRS := User \
Libraries/CMSIS/Device/PY32F0xx/Source
# C source files (if there are any single ones)
CFILES :=
# ASM source folders
ADIRS := User
# ASM single files
AFILES := Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f002.s
# Include paths
INCLUDES := Libraries/CMSIS/Core/Include \
Libraries/CMSIS/Device/PY32F0xx/Include \
User
ifeq ($(USE_LL_LIB),y)
CDIRS += Libraries/PY32F0xx_LL_Driver/Src \
Libraries/BSP_LL/Src
INCLUDES += Libraries/PY32F0xx_LL_Driver/Inc \
Libraries/BSP_LL/Inc
LIB_FLAGS += USE_FULL_LL_DRIVER
else
CDIRS += Libraries/PY32F0xx_HAL_Driver/Src \
Libraries/BSP/Src
INCLUDES += Libraries/PY32F0xx_HAL_Driver/Inc \
Libraries/BSP/Inc
endif
ifeq ($(USE_FREERTOS),y)
CDIRS += Libraries/FreeRTOS \
Libraries/FreeRTOS/portable/GCC/ARM_CM0
CFILES += Libraries/FreeRTOS/portable/MemMang/heap_4.c
INCLUDES += Libraries/FreeRTOS/include \
Libraries/FreeRTOS/portable/GCC/ARM_CM0
endif
ifeq ($(USE_DSP),y)
CFILES += Libraries/CMSIS/DSP/Source/BasicMathFunctions/BasicMathFunctions.c \
Libraries/CMSIS/DSP/Source/BayesFunctions/BayesFunctions.c \
Libraries/CMSIS/DSP/Source/CommonTables/CommonTables.c \
Libraries/CMSIS/DSP/Source/ComplexMathFunctions/ComplexMathFunctions.c \
Libraries/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c \
Libraries/CMSIS/DSP/Source/DistanceFunctions/DistanceFunctions.c \
Libraries/CMSIS/DSP/Source/FastMathFunctions/FastMathFunctions.c \
Libraries/CMSIS/DSP/Source/FilteringFunctions/FilteringFunctions.c \
Libraries/CMSIS/DSP/Source/InterpolationFunctions/InterpolationFunctions.c \
Libraries/CMSIS/DSP/Source/MatrixFunctions/MatrixFunctions.c \
Libraries/CMSIS/DSP/Source/QuaternionMathFunctions/QuaternionMathFunctions.c \
Libraries/CMSIS/DSP/Source/StatisticsFunctions/StatisticsFunctions.c \
Libraries/CMSIS/DSP/Source/SupportFunctions/SupportFunctions.c \
Libraries/CMSIS/DSP/Source/SVMFunctions/SVMFunctions.c \
Libraries/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c
INCLUDES += Libraries/CMSIS/DSP/Include \
Libraries/CMSIS/DSP/PrivateInclude
endif
ifeq ($(USE_EPAPER),y)
CDIRS += Libraries/EPaper/Lib \
Libraries/EPaper/Examples \
Libraries/EPaper/Fonts \
Libraries/EPaper/GUI
INCLUDES += Libraries/EPaper/Lib \
Libraries/EPaper/Examples \
Libraries/EPaper/Fonts \
Libraries/EPaper/GUI
endif
include ./rules.mk
Compiling output
$ V=1 make
CC User/main.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/User/main.o -o Build/User/main.o -c User/main.c -MD -MF ./Build/User/main.d -MP
CC User/py32f0xx_it.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/User/py32f0xx_it.o -o Build/User/py32f0xx_it.o -c User/py32f0xx_it.c -MD -MF ./Build/User/py32f0xx_it.d -MP
CC Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.o -o Build/Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.o -c Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.c -MD -MF ./Build/Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.d -MP
CC Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.o -o Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.o -c Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.c -MD -MF ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.d -MP
CC Libraries/BSP_LL/Src/py32f0xx_bsp_led.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/BSP_LL/Src/py32f0xx_bsp_led.o -o Build/Libraries/BSP_LL/Src/py32f0xx_bsp_led.o -c Libraries/BSP_LL/Src/py32f0xx_bsp_led.c -MD -MF ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_led.d -MP
CC Libraries/BSP_LL/Src/py32f0xx_bsp_clock.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/BSP_LL/Src/py32f0xx_bsp_clock.o -o Build/Libraries/BSP_LL/Src/py32f0xx_bsp_clock.o -c Libraries/BSP_LL/Src/py32f0xx_bsp_clock.c -MD -MF ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_clock.d -MP
CC Libraries/BSP_LL/Src/py32f0xx_bsp_printf.c
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -std=c99 -DPY32F002Ax5 -DUSE_FULL_LL_DRIVER -Wall -ffunction-sections -fdata-sections -I ./Libraries/CMSIS/Core/Include -I ./Libraries/CMSIS/Device/PY32F0xx/Include -I ./User -I ./Libraries/PY32F0xx_LL_Driver/Inc -I ./Libraries/BSP_LL/Inc -MT Build/Libraries/BSP_LL/Src/py32f0xx_bsp_printf.o -o Build/Libraries/BSP_LL/Src/py32f0xx_bsp_printf.o -c Libraries/BSP_LL/Src/py32f0xx_bsp_printf.c -MD -MF ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_printf.d -MP
AS Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f002.s
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -gdwarf-3 -O0 -Wa,--warn -o Build/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f002.o -c Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f002.s
LD Build/app.elf
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0plus -specs=nano.specs -specs=nosys.specs -static -lc -lm -Wl,-Map=./Build/app.map -Wl,--gc-sections -Wl,--print-memory-usage -Wl,--no-warn-rwx-segments -T./Libraries/LDScripts/py32f002x5.ld ./Build/User/main.o ./Build/User/py32f0xx_it.o ./Build/Libraries/CMSIS/Device/PY32F0xx/Source/system_py32f0xx.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_pwr.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_comp.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_adc.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_i2c.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_dma.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_tim.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_lptim.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_exti.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_flash.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rtc.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_spi.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_crc.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_gpio.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_usart.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_utils.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_rcc.o ./Build/Libraries/PY32F0xx_LL_Driver/Src/py32f0xx_ll_led.o ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_led.o ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_clock.o ./Build/Libraries/BSP_LL/Src/py32f0xx_bsp_printf.o ./Build/Libraries/CMSIS/Device/PY32F0xx/Source/gcc/startup_py32f002.o -o Build/app.elf
Memory region Used Size Region Size %age Used
RAM: 1232 B 3 KB 40.10%
FLASH: 10024 B 20 KB 48.95%
OBJCP BIN Build/app.bin
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objcopy -I elf32-littlearm -O binary Build/app.elf Build/app.bin
OBJCP HEX Build/app.hex
/opt/gcc-arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objcopy -I elf32-littlearm -O ihex Build/app.elf Build/app.hex
from py32f0-template.
You are correct. I'd had "LIB_FLAGS = PY32F002x5" instead of "PY32F002Ax5"
However, this may mean there's something broken with the 002x5 target? Looking at the datasheets, I don't see any documentation for the 'non-A' part, or if it even exists (oddly, puya's website no longer makes any mention of the 002 parts at all). And LCSC only has -A parts listed.
In any case, I'm closing this for now. Can re-open is any 002 parts show up.
Thanks!
from py32f0-template.
This part 002x5 exists in Puya.PY32F0xx_DFP.1.1.3.pack, but I didn't see it be mentioned in Puya's website or anywhere else. I guess this part once existed in their early product roadmap but was renamed to 002Ax5, the only difference between 002x5 and 002Ax5 is the Comparator, 002x5 has no Comparator.
To avoid confusion, I am going to remove this part number from the repository.
from py32f0-template.
Related Issues (20)
- Urecognized option '--no-warn-rwx-segments' HOT 1
- reprogramming PY32F002A HOT 8
- wagiminator MCU-Flash-Tools puyaisp
- PY32F002B-PY32F040-PY32F072-PY32F403 PDF Files HOT 3
- Deep sleep current consumption HOT 12
- (Not an issue) Another company making the same IC? HOT 19
- app crashes during UART transmit (printf) on PY32F002AL15S6TU HOT 3
- Unlocking and erasing protected flash on PY32 chips HOT 3
- ADC support on PY32F002A HOT 4
- Help with LSI as Clock Source to reduce power consumption HOT 4
- [question] What is the story of this repository? HOT 2
- Examples of I2C DMA HOT 2
- Current Consumption in Deep Sleep LSI HOT 3
- Stop Mode on other families beside Py32f002B HOT 1
- C++ Support HOT 6
- Microsecond delay HOT 4
- ADC_COMP_IRQn on PY32F002A HOT 2
- Suppport for Py32L020 HOT 3
- Interrupts in deep sleep and delay HOT 1
- ADC Multichannel DMA Howto
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py32f0-template.