@smitthhyy and @zoomto.jitendra - did either of you figure out a solution to your compile failures with wolfMQTT and MPLAB Harmony? I'm having some very similar issues and I'd like to throw my hat in the ring with you two to figure this out and get a solution posted once and for all!
@dgarske - thank you for all of the awesome work you've done with wolfMQTT to date! You may have some insight on my problem...
Setup:
I developed a hardware device that was originally based on the IoT Ethernet Kit (DM990004) by Microchip. The kit came with example firmware for MPLAB Harmony which used wolfMQTT v0.6. This was before wolfMQTT was officially integrated with MPLAB Harmony.
I'm currently making some firmware updates to my product and I wanted to update my MPLAB Harmony Project to:
1.) take advantage of the fact that wolfMQTT is now integrated into MPLAB Harmony and
2.) utilize the latest version of wolfMQTT (v1.2)
I created a new MPLAB Harmony Project, imported my previous MPLAB Harmony Configurator (.mhc) file, added my selection for wolfMQTT from the MHC list (now that it's integrated), and clicked 'Generate Code.'
Next I downloaded the latest version of wolfMQTT (v1.2) and followed these instructions to be sure this updated version was added to my Project.
Finally, I copied my application specific source files from my old Project to the new Project. I also had to replace a few Harmony generated files with versions from my original project that were slightly modified by //DCG (David Garske, I suspect):
- net_pres_enc_glue.c
- net_pres_cert_store.c
- system_interrupt.c
Problem:
When I attempted to compile this new Project, it failed with errors that are similar to what @smithhyy described - results that look like #include errors but they don't make sense because it seems like all of the appropriate #include statements are where they belong for the wolfMQTT files (see attachment).
For example, mqtt_socket.h seems to not understand what word16 means, but word16 is defined in mqtt_types.h and mqtt_types.h is #included at the top of mqtt_socket.h - so it should have access to that information.
New Information:
On my PC, the wolfMQTT folder is located here:
C:\microchip\harmony\v2_06\third_party\tcpip\wolfMQTT
Just for kicks, I closed MPLAB, then replaced the contents of this folder (currently containing the v1.2 files) with the v0.6 files. I reopened MPLAB and compiled the Project again - success! So the Project is setup fine, but there's something about the differences in the wolfMQTT files between v0.6 and v1.2 that's causing the compile errors.
I started repeating this process to step through the wolfMQTT versions to see where the compile errors start:
- v0.6: compiled
- v0.8: compiled
- v0.9: failed
- v0.10: failed (version currently included in Harmony v2.06)
[did not test the versions between here]
- v1.2: failed
wolfMQTT v0.9 is the first version that "Added Microchip Harmony support" and it's the first version that breaks my project on compile. So the first version of wolfMQTT that is setup for Harmony integration doesn't work with my Project/code that was written prior to integration.
I know @dgarske said he tested one of the later versions of wolfMQTT with Harmony v2.05 and did not get the errors that @smittthhyy saw. I'm wondering if there's something else related to the IDE or Project that might be causing this for some of us, but not for David?