This file contains the following sections:
- Summary
- How to execute
- How to create new target
- Troubleshooting
- API migration
- Integration examples
This folder contains a makefile and *.mk files for target specification. The makefile compiles the X2C Scope source files for the target MCUs.
- Compilers: XC16 and/or XC32 and/or XC-DSC http://microchip.com/xc
- GNU Make: MPLAB X IDE contains it: http://microchip.com/mplabx
- Modify system path environment to make.exe be available in command line: C:\Program Files (x86)\Microchip\MPLABX\v5.20\gnuBins\GnuWin32\bin
- Modify makefile compiler paths to your XC compiler installation paths:
Open cmd in the root folder and execute "make" command. The main makefile will call all *.mk file in the folder and compile all targets.
Execute "make clean" to delete all obj and lib files.
If new target or custom configuration(Scope_size) required just duplicate one of the *.mk file and modify the following variables to the needs:
- TARGET_FILENAME - The output filename. (Will be located in the dist folder after compilation.)
- OBJDIR - Folder to store the temporary object files. Must start with underscore(_) and must be different than other .mk files!
- SET_PROCESSOR - Use XC Readme.html for the list of supported Devices. (xc32\v2.xx\docs)
- DEFINE_X2C_MCU_FAMILY - Check the X2C Scope header files for details. Keep as it is.
- OPTIMISATION - Compiler optimisation level
Then just execute the make command in the folder and makefile will call automatically the newly created .mk file.
- 'make' is not recognized as an internal or external command, operable program or batch file.
- Set Path environment as described in the Prerequisites section. (See at Prerequisites)
- The system cannot find the file specified.
- Edit makefile and set the correct compiler paths according to your system. (See at Prerequisites)
If updating from a previous version of the X2Cscope interface files, see
MIGRATION_GUIDE.md for the full description of the X2Cscope_InitialiseEx()
/ X2CSCOPE_CONFIG_INIT() API and the required migration steps.
Note: The legacy X2Cscope_HookUARTFunctions() + X2Cscope_Initialise()
two-step API has been removed. Existing code using those functions must migrate
to X2Cscope_InitialiseEx().
The interface/examples/ folder contains ready-to-use communication layer
implementations for three transport interfaces. Each example provides
X2CscopeComm.h and X2CscopeComm.c — the only files that need to be adapted
per project — alongside any required peripheral driver files and a README.md
with hardware configuration and integration steps.
| Folder | Interface | Key files included |
|---|---|---|
interface/examples/uart/ |
UART (MCC Melody driver) | X2CscopeComm.h, X2CscopeComm.c |
interface/examples/can/ |
CAN 2.0 (MCC Melody driver) | X2CscopeComm.h, X2CscopeComm.c |
interface/examples/tcpip/ |
TCP/IP over 10BASE-T1S (lwIP) | X2CscopeComm.h, X2CscopeComm.c, lwip/tcp_server.h/.c, hal/dmaspi.h/.c |
Copy the contents of the relevant example folder into your project's X2Cscope/
folder alongside interface/X2Cscope.h and interface/X2Cscope.c, then follow
the README.md in that example folder for MCC configuration and call sequence.
The PC-side tool is pyX2Cscope:
pip install pyx2cscope
pyx2cscope # Qt GUI
pyx2cscope -w # Web GUI (browser)

