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

Welcome to the XC32 wiki!

The platform will / must support:

  • Baremetal - no Harmony
  • Arduino

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

Integrated Uploader

PicKit4 / Snap

Uploader use "libusb-1.0.dll" https://github.com/libusb/libusb/releases

Put DLL in PlatformIO Python folder ( .platformio/penv/Scripts )

or use Microchip IPE

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_mapfile = 0      ; create map-file

custom_module  = md-module.py

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

PlatformIO Documentation

custom_module = md-module.py

CoreMark Performance Benchmark

CoreMark measures how quickly your processor can manage linked
lists, compute matrix multiply, and execute state machine code.

Iterations/Sec is the main benchmark result, higher numbers are better
Running.... (usually requires 12 to 20 seconds)

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
O0      = 120.66
O1      = 470.26
O2      = 595.33
O3      = 577.40
Os      = 468.24
Ofast   = 577.40
Clone this wiki locally