First steps with the Microchip PIC32
Ethernet Starter Kit (DM320004)
I received this Ethernet Starter Kit
for evaluation. The kit is available with order
You can find more Microchip development kits and tools at this link
The kit contains a development board with a 32-bit MIPS4k
PIC32 microcontroller, a 10/100 Ethernet port, an on-board debugger and
programmer, and an OTG USB port. You can get the User's Guide and code
examples from the Microchip
. Microchip has a software library collection for their
line of PIC16/PIC18/PIC24/PIC32 microcontrollers called "Microchip
" or MAL. This collection includes the TCP/IP
stack the kit uses.
The first part of this article can be read here
Compile the TCPIP
In this step, the full firmware is
compiled from source. Thus you can experiment with customizing the
TCPIP library, eg. stripping unneeded features such as SNMP, SMTP,
upload handling, etc. For this step, we will need the Microchip
Make sure you have MPLABX and C32
correctly installed and the starter kit is connected to your computer.
These steps are detailed in part I
Download the Microchip Application Libraries from http://microchip.com/mal
- choose Beta Linux, the actual version (v2011-10-18 as of writing).
This library can be installed as a normal user, no need to get root.
$ chmod +x microchip-application-libraries-v2011-10-18-beta-linux-installer-v2.run
I choose installation directory ~/MPLABXProjects/MAL
Start MPLABX, then choose File/Open project. Browse to
~/MPLABXProjects/MAL/TCPIP/Demo App and open the MPLAB.X project
directory. Don't care about the "Configuration loading error" messages.
select the "MPLAB: C32-PIC32_ETH_SK_ETH795" configuration as seen on
Edit the project properties by right clicking on the project "TCPIP -
Demo App" and selecting "Properties". Select the Conf:
C32-PIC32_ETH_SK_ETH795 item from the categories, and modify the
Hardware tool to SKDE PIC32 and the Compiler toolchain to C32 (see
Select the "Build the Project" button. If you see "BUILD SUCCESSFUL" at
the end of the messages, you can press the button "Make and Program
Device". This will upload the program to the board.
Now open the URL of the board. If everything is fine, you will see that
the stack version is now v5.36 and the build date is changed to the
BSD TCP/IP Stack
Microchip has another, older TCP/IP stack (v2.00), which appeared in AN1108
and in the PIC32 Starter Kit Software v2.0. It would be a good
experiment to compare performance and code size to the current (v5.31 and later) MAL TCP/IP stack.
uIP TCP/IP Stack
Yet another TCP/IP stack for consideration is the open-source uIP TCP/IP stack. The code is already ported by bonybrown for the dsPIC33.