Skip to content
Georgi Angelov edited this page Feb 24, 2023 · 57 revisions

Welcome to the XC32 wiki!

The platform will / must support:

  • Baremetal - no Harmony
  • Arduino

Boards

  • Curiosity v1.0 PIC32MZ2048EFM100
    • Curiosity PIC32MZ ( PKOB )
    • WizIO-PIC32MZ-EFM100 is as Curiosity ( PIC32MZ2048EFM100 ) but uploader is PK4/SNAP or UF2
  • Looking for Hardware cooperation

Compiler

The Platform use installed Microchip XC32 compiler ( must work on Windows / Linux / Mac )
Install XC32 from the Microchip website. Default used is v4.21
If you want to use other version - Project INI

custom_xc32 = PATH-TO/Microchip/xc32/vX.XX ; change compiller path

OR if you don't want to constantly edit in the path
( default used is: C:\Program Files\Microchip\xc32\v4.21 )

Open folder USER \ .platformio\platforms\XC32
Create text file XC32PATH Open, Edit and Put path to your compiler
Example:

C:\\Program Files\\Microchip\\xc32\\vX.XX

Uploader

Integrated for PicKit4 / Snap and/or PKOB(3) for Curiosity board
Uploader use "libusb-1.0" https://github.com/libusb/libusb/releases
Download and Put DLL/LIB in PlatformIO Python folder ( USER / .platformio/penv/Scripts )
OR use Microchip IPE
OR Microsoft UF2 ( USB MSD )

upload_protocol = UF2
custom_linker   = application.ld

( note: the configuration bits are set by the bootloader )

Common project INI settings ( default values )

custom_xc32    = C:/Program Files/Microchip/xc32/v4.21 ; select other XC32 compiler
custom_heap    = 65536
custom_stack   = 1024
custom_opt     = -O1                  ; -O0 or -O1 for free compiler
custom_linker  = p32MZ2048EFM100.ld   ; userware.ld
custom_name    = APPLICATION          ; change application name
custom_mapfile = False                ; create map-file
custom_module  = md-module.py         ; read below

build_flags    = -DSOME_DEFINES ; read PlatformIO documentation
monitor_port   = COM26
monitor_speed  = 115200

PlatformIO Documentation

custom_module = md-module.py

2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 13000
Total time (secs): 13.00
Iterations/Sec   : 461.54
Iterations       : 6000
Compiler version : GCC4.8.3 MPLAB XC32 Compiler v2.10
Compiler flags   : (flags unknown)
Memory location  : STACK
seedcrc          : 0xE9F5
[0]crclist       : 0xE714
[0]crcmatrix     : 0x1FD7
[0]crcstate      : 0x8E3A
[0]crcfinal      : 0xA14C
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 461.54 / GCC4.8.3 MPLAB XC32 Compiler v2.10 ( -O1 ) / STACK

XC32-v4.21 (x64) GCC8.3.1 ( compiler last version)
O0      = 120.66 ( free compiler )
..      = 153.76 ( Raspberry PI Pico )
..      = 351.33 ( ESP32 )
O1      = 470.26 ( free compiler ) <--- nice
O2      = 595.33 ( licensed )      <--- wow !!!
O3      = 577.40 ( licensed )
Os      = 468.24 ( licensed )
Ofast   = 577.40 ( licensed )
Clone this wiki locally