Fixing Compile Errors in an MPLAB-X Harmony TCP/IP Project

I just bought a PIC32 Ethernet Starter Kit on eBay.

I initially tried to follow this guide to setting up a HTTP server:

However, I ran into a few issues when I tried to compile the project:

  1. The TCP/IP library complained about missing “SHA-256”. Easily resolved by adding: MPLAB Harmony Configurator –> MPLAB Harmony & Application Configuration –> Harmony Framework Configuration –> Cryptographic (Crypto) Library –> Hashes –> Use SHA-256

  2. The variables for the LEDs and buttons were missing. Most likely something changed in Harmony and you must check a box to get those now. Who knows. Instead, I noted that all the missing variables were defined as, for instance ‘BSP_LED_1’ rather than ‘APP_LED_1’. So, I just added the following defines to the top of ‘app.h’:

    #define APP_LED_1 BSP_LED_1

    #define APP_LED_2 BSP_LED_2

    #define APP_LED_3 BSP_LED_3

    #define APP_SWITCH_1StateGet BSP_SWITCH_1StateGet

    #define APP_SWITCH_2StateGet BSP_SWITCH_2StateGet

    #define APP_SWITCH_3StateGet BSP_SWITCH_3StateGet

Now the project compiles and runs!

Leave a Reply

%d bloggers like this: