mirror of
https://github.com/IcedRooibos/py32f0-template.git
synced 2025-10-29 00:42:06 -07:00
58 lines
1.4 KiB
Makefile
58 lines
1.4 KiB
Makefile
##### Project #####
|
|
|
|
PROJECT ?= app
|
|
# The path for generated files
|
|
BUILD_DIR = Build
|
|
|
|
|
|
##### Options #####
|
|
|
|
# Programmer, jlink or pyocd
|
|
FLASH_PROGRM ?= pyocd
|
|
|
|
##### 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.mpacbti-bet1-x86_64-arm-none-eabi/bin
|
|
|
|
# path to JLinkExe
|
|
JLINKEXE ?= /opt/SEGGER/JLink/JLinkExe
|
|
# MCU type: PY32F003X4, PY32F003X6, PY32F003X8
|
|
JLINK_DEVICE ?= PY32F003X6
|
|
# path to PyOCD
|
|
PYOCD_EXE ?= pyocd
|
|
PYOCD_DEVICE ?= py32f003x6
|
|
|
|
|
|
##### Paths ############
|
|
|
|
# Link descript file
|
|
LDSCRIPT = Libraries/LDScripts/py32f003x6.ld
|
|
# Library build flags: PY32F030x3, PY32F030x4, PY32F030x6, PY32F030x7, PY32F030x8, PY32F003x4, PY32F003x6, PY32F003x8
|
|
LIB_FLAGS = PY32F003x6
|
|
|
|
# C source folders
|
|
CDIRS := User \
|
|
Libraries/CMSIS/Device/PY32F0xx/Source \
|
|
Libraries/PY32F0xx_HAL_Driver/Src \
|
|
Libraries/BSP/Src \
|
|
Libraries/BSP/PY32F003xx_Start_Kit
|
|
# 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_py32f003.s
|
|
|
|
# Include paths
|
|
INCLUDES := Libraries/CMSIS/Include \
|
|
Libraries/CMSIS/Device/PY32F0xx/Include \
|
|
Libraries/PY32F0xx_HAL_Driver/Inc \
|
|
Libraries/BSP/Inc \
|
|
Libraries/BSP/PY32F003xx_Start_Kit \
|
|
User
|
|
|
|
include ./rules.mk
|