This is my seventh week in AESTE. Getting started on PIC32 with DM320004 and wolfssl library.

┏(-_-)┓┏(-_-)┛┗(-_– )┓┗(-_-)┛┏(-_-)┓ ┏(-_-)┛┗(-_– )┓┗(-_-)┛┏(-_-)┓┏(-_-)┛┗(-_– )┓┗(-_-)┛┏(-_-)┓┏(-_-)┛┗(-_– )┓┗(-_-)┛┏(-_-)┓

Getting Started with PIC32

The following are needed before starting pic32

  2. Microchip Library for Application – MLA (I suggest 2013 June MLA version for DM320004)
  3. Install XC32 compiler then install PIC32 Legacy Peripheral Libraries(two setup with XC32 first)
  4. Follow this link to import TCPIP Stack for PIC32 (First Step with DM320004)
  5. Next is to compile the TCPIP stack example project (choose XC32 as compiler), during compilation there will be a lot of warning, to reduce the warning add these to preprocessor macros (_SUPPRESS_PLIB_WARNING , _DISABLE_OPENADC10_CONFIGPORT_WARNING) located in “project > properties > xc32-gcc > preprocessing and messages”

Hopefully there wont be any error encountered, but if 2015 MLA version was used I’m pretty sure there will be some error, the problem for 2015 MLA is the PLIB cannot be found, to solve this problem is to manually included the PLIB directory into project. “project > properties > xc32-gcc > Include Directories > browse for ..\xc32\v1.40\pic32mx\include\lega-c. If there are still error then i suggest to get an older MLA version. The reason June 2013 MLA version was suggested is because this version contain the hardware profile for DM320004, (and this particular version is the last version Microchip provide all their development board hardware profile, because after this version till latest MLA version the hardware profile for TCPIP stack will be slightly different).

After successfully compiling the TCPIP stack for ETH STK, I proceed with including wolfssl library into the project.

Getting Started with WolfSSL on PIC32
  1. Follow this link Wolfssl pic32 (Download latest wolfssl library or clone in through GIT)
  2. Go the “..\wolfssl-3.6.8\wolfssl-3.6.8\wolfssl\wolfcrypt\setting.h” to uncomment ‘MICROCHIP_PIC32’
  3. Step 2 is really important then only import wolfssl.x to workspace and compile the project (located in wolfssl-3.6.8\mplabx)
  4. Hopefully no error will occur, but many warning will be encountered eg: plib, adc10 and indianess (update Preprocessor macros to suppress the warnings)
  5. Import wolfcrypt_test.x to compile, then click the ‘Debug main project’ with dm320004 connected to PC. (At Output window-mplabX ide bottom section, will have a new section appear name DBPRINTF, this will act as a console window for PIC32)
  6. Import wolfcrypt_benchmark.c, do the same thing in (5), then observe the output window -> DBPRINTF

To be honest to reach these step seems like a piece of cake, but trust me, if the above step was not done properly starting from getting started on PIC32, then good luck in solving all the error that will pop out like popcorn. Next is to import wolfssl library into TCPIP stack project, “in workspace choose the TCPIP stack example project (TCPIP – Demo App) > Libraries > Add Library Project > browse wolfssl.x > Add” Build & Clean project to ensure no error. When everything can be compiled properly i proceed with playing around with the function in wolfssl to enable TLS to my project.

Some additional Stuff:

For this week I only able to get the TCPIP stack and wolfssl up and running for PIC32, to be honest my progress is pretty slow, really slow to be exact. Well….. after working for 7weeks in AESTE (about half of my internship period) I realize I did not improve at all, maybe that’s my limit, but I won’t deny its really fun working in AESTE, getting scold is really fun. Sometimes when i tried to be a little bit crazy/creative to try some stuff I will get shoot back down to HELL. However the funny thing is I don’t feel anything. Every time when I will get shoot by a machine gun  ̿̿ ̿’̿’̵͇̿̿з=༼ ▀̿̿Ĺ̯̿̿▀̿ ̿ ༽=ε/̵͇̿̿/’̿’̿ ̿ ̿̿[} ̿ ̿ ̿ ̿^  i will just go ¯\(ツ)/¯. Because I know I am not smart at all, I am not a bright student, not even a first class honours to begin with, and my boss have zero tolerance towards people like me (stupid people to be exact). His expression is always……… ლ(ಠ益ಠლ)…….. or ……….щ(゚Д゚щ)……..Why so Stupid! Hahahahhaha. Which is why I am looking forward to next week, its gonna be another hellish week and more things to learn (more on network programming especially TLS on PIC32). And next week my boss is bringing us out for movie again!! Woots~