It was a *** mess to set it up, but I got it working in Eclipse.
1 - Install Eclipse for C/C++ Embedded.
2 - Install python 3 from windows store.
3 - Install pyocd with
pip3 install pyocd4 - Download
xPack gcc, extract it somewhere, ex.
c:\xpack\xpack-arm-none-eabi-gcc-10.3.1-2.3.
5 - Download
xPack build tools, extract t it somewhere, ex.
c:\xpack\xpack-windows-build-tools-4.4.1-1.
6 - Eclipse->Window->Preferences->MCU->Global Arm Toolchains Paths->Default toolchain: xPack GNU Arm Embedded GCC
Toolchain folder:
C:\xpack\xpack-arm-none-eabi-gcc-10.3.1-2.3\bin.
Global Build Tools Path:
C:\xpack\xpack-windows-build-tools-4.4.1-1\bin.
7 - Eclipse->Help->Marketplace, install EmbSysRegView plugin, close the IDE.
8 - Place
Puya.PY32F0xx_DFP.1.1.0.pack in
C:\Users\user_name\AppData\Roaming\CMSIS-Packs.
9 - Temporary rename the file from .pack to .zip, extract the SVD files somewhere, then rename it to .pack again.
10 - Go to
C:\Users\user_name\.p2\pool\plugins\org.eclipse.cdt.embsysregview.data_0.2.6.r191\data\SVD(CMSIS) Create the folder "Puya". Place the SVD files file inside it, change the extension to xml.
9 - Open Eclipse->Window->Preferences->C/C++->Debug->Embsys Register View-> Architecture:SVD, Vendor:Puya, Chip: py32f030xx (The svd name).
10 - Eclipse->New->C/C++ Project->C Managed build->Empty project, Arm Cross GCC->Should use the toolchain be set earlier->Finish
11 - Right click on project->C/C++ Build-> External Builder
Behaviour-> Enable parallel build
Settings->Target Processor->
cortexm0-plus.
Settings->Optimization->Other optimization flags:
-Wl,--cref -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group (Apply this to both Debug and Release profiles). This saves a lot of space, it's what CubeIDE uses.
12 - Eclipse->Window->Preferences->MCU->Global pyOCD Path
Executable:
pyocd.exe Folder:
C:\Users\user_name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.xxx\LocalCache\local-packages\Python3xx\Scripts 13 - Click on the Debug button->Debug configurations->Create New GDB PyOCD -> Debugger tab
Click override target:
py32f030x6 Other options:
--pack=C:\Users\user_name\AppData\Roaming\CMSIS-Packs\Puya.PY32F0xx_DFP.1.1.0.packLinker script is set in Project properties->C/C++ Build->Settings->GNU Arm Cross Linker->General
It's common to have a startup file in asm, Eclipse only takes assembler files with .S extension, must be uppercase!
Debugging and programmign works, but EmbSys won't show the register data by default, you must first enable each by double-clicking on the reg name, it'll become green, now you can write and read to it.
Attached a simple project.