Getting Started with the Microchip Curiosity PIC32MZEF - MQTT message issue

olafp wrote on March 22, 2018:

Hi,
I can compile the aws_demos project successful in mplabx, with some warnings.
and download the firmware to the Curiosity PIC32MZEF target. When running the
WiFi7Click board’s STAT2 LED is blinking, indicate that its sending packages I assume.

To verify I am receiving the packages I go into AWS IoT Console- Test “MQTT client”- Subscribtion topic and Subscribe to topic “freertos/demos/echo” or “#”.
But no messages appears.

In AWS IoT - Monitor I can see Successful connections increase and Messages published both In and Out bound when I restart the Curiosity board, and debug the main program.

I created a Thing that I registered and attached security certificate, have tried with and without policies. Thing does not belong to any Group.

I am just using the Curiosity PIC32MZEF build-in PKOB debugger and the WiFi7Click board.
So how do I open a terminal window to see the programs output log statements?
Appreciate any feedback.
Thanks.

https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_mch.html

"In the MQTT client in the AWS IoT console, you should see the MQTT messages sent by your device.

Troubleshooting
If no messages appear in the AWS IoT console, try the following:

Open a terminal window to view the logging output of the sample. This can help you determine what is going wrong.

Check that your network credentials are valid."

olafp wrote on March 23, 2018:

Ok, the program prints to a serial port 115200 8n1, but what serial port is it? My microUSB cable in J3 is not detected as a com port in windows. Neither is J12! So there is no build-in serial port!! I need to use 1 of 2 clickboard slots, to get a RX/TX lines(buying a mikroe-1203 board)? Iwas planning of the slots for sensors/wireless communication.
Or is there an other way to see debug print statement from your code?

I am able to debug through the aws_demos program using the build-in PKOB debugger.
Wonder if I can see runtime print statements from mplabx terminal windows.??

Appreciate any feedback, Thanks.

Gaurav-Aggarwal-AWS wrote on March 23, 2018:

Hello,

In order to get the debug output messages, you need to get a MIKROE-1203 (USB UART Click Board) and set it up as mentioned here: https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_mch.html

We currently do not support outputting debug messages over USB. If you want to do that, you can refer to this example from Microchip:
Project: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en588540
Document: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en593891

Thanks,
Gaurav

olafp wrote on March 26, 2018:

Hi Gaurav,
Thanks for your reply!
Ok, I have ordered MIKROE-1203 (USB UART Click Board).

I tried to debug the project you referred to in http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en588540

I found and opened the project “cdc_com_port_dual” from the Harmony framework.
Made 2 modifications from “Project Properties”

  1. SettingDevice to Pic32MZ2048EFM100
  2. Debug Tool to Starter Kits(PKOB)

I then tried to debug the demo project, but build failed.
Since its a demo project, I assume my build system is setup incorrect. It seem like this curiosity board does not have some HW feature that is needed.
But I have encountered “Project Loading Error” when loading the “aws_demos” project in MPLAB X IDE. That indicate that MPLAB X is not configured correctly.

So my questions/wishes to the Microchip Curiosity PIC32MZEF demo are:

  1. More detailed instruction setting up MPLAB X build environment.
  2. More detailed info how to use the local MPLAB X debugger, and AWS IoT -Test environment.

Appreciate any feedback, thanks.
Olaf

Build log for cdc_com_port_dual:
///
"make -f nbproject/Makefile-pic32mk_gp_db_int_dyn.mk SUBPROJECTS= .build-conf
make[1]: Entering directory ‘C:/microchip/harmony/v2_05_01/apps/usb/multi_usb/cdc_com_port_dual/firmware/cdc_com_port_dual.X’
make -f nbproject/Makefile-pic32mk_gp_db_int_dyn.mk dist/pic32mk_gp_db_int_dyn/debug/cdc_com_port_dual.X.debug.elf
make[2]: Entering directory ‘C:/microchip/harmony/v2_05_01/apps/usb/multi_usb/cdc_com_port_dual/firmware/cdc_com_port_dual.X’
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c: In function ‘SYS_CLK_Initialize’:
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:97:2: error: ‘PLIB_OSC_UPLLInputDivisorSet’ is unsupported: The microcontroller selected does not implement this feature. [-Werror]
PLIB_OSC_UPLLInputDivisorSet(OSC_ID_0, OSC_UPLL_IN_DIV_1);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:97:41: error: ‘OSC_UPLL_IN_DIV_1’ undeclared (first use in this function)
PLIB_OSC_UPLLInputDivisorSet(OSC_ID_0, OSC_UPLL_IN_DIV_1);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:97:41: note: each undeclared identifier is reported only once for each function it appears in
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:98:2: error: ‘PLIB_OSC_UPLLFrequencyRangeSet’ is unsupported: The microcontroller selected does not implement this feature. [-Werror]
PLIB_OSC_UPLLFrequencyRangeSet(OSC_ID_0, OSC_UPLL_FREQ_RANGE_8M_TO_16M);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:98:43: error: ‘OSC_UPLL_FREQ_RANGE_8M_TO_16M’ undeclared (first use in this function)
PLIB_OSC_UPLLFrequencyRangeSet(OSC_ID_0, OSC_UPLL_FREQ_RANGE_8M_TO_16M);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:99:2: error: ‘PLIB_OSC_UPLLMultiplierSelect’ is unsupported: The microcontroller selected does not implement this feature. [-Werror]
PLIB_OSC_UPLLMultiplierSelect(OSC_ID_0, 32);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:100:2: error: ‘PLIB_OSC_UPLLOutputDivisorSet’ is unsupported: The microcontroller selected does not implement this feature. [-Werror]
PLIB_OSC_UPLLOutputDivisorSet(OSC_ID_0, OSC_UPLL_OUT_DIV_8);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:100:42: error: ‘OSC_UPLL_OUT_DIV_8’ undeclared (first use in this function)
PLIB_OSC_UPLLOutputDivisorSet(OSC_ID_0, OSC_UPLL_OUT_DIV_8);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:102:2: error: ‘PLIB_OSC_UsbClockSourceSelect’ is unsupported: The microcontroller selected does not implement this feature. [-Werror]
PLIB_OSC_UsbClockSourceSelect (OSC_ID_0, SYS_OSC_USBCLK_PRIMARY);
^
…/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c:102:43: error: ‘SYS_OSC_USBCLK_PRIMARY’ undeclared (first use in this function)
PLIB_OSC_UsbClockSourceSelect (OSC_ID_0, SYS_OSC_USBCLK_PRIMARY);
^
cc1.exe: all warnings being treated as errors
make[2]: *** [build/pic32mk_gp_db_int_dyn/debug/_ext/784443848/sys_clk_pic32mk.o] Error 1
make[2]: *** Waiting for unfinished jobs…
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/784443848/sys_clk_pic32mk.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/784443848/sys_clk_pic32mk.o …/src/system_config/pic32mk_gp_db_int_dyn/framework/system/clk/src/sys_clk_pic32mk.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
nbproject/Makefile-pic32mk_gp_db_int_dyn.mk:116: recipe for target ‘build/pic32mk_gp_db_int_dyn/debug/_ext/784443848/sys_clk_pic32mk.o’ failed
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/548107327/bsp.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/548107327/bsp.o …/src/system_config/pic32mk_gp_db_int_dyn/bsp/bsp.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
…/src/system_config/pic32mk_gp_db_int_dyn/system_interrupt.c:74:1: error: Vector number must be an integer between 0 and 255
{
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_interrupt.c:79:1: error: Vector number must be an integer between 0 and 255
{
^
make[2]: *** [build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_interrupt.o] Error 1
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_interrupt.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_interrupt.o …/src/system_config/pic32mk_gp_db_int_dyn/system_interrupt.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
nbproject/Makefile-pic32mk_gp_db_int_dyn.mk:146: recipe for target ‘build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_interrupt.o’ failed
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/797334065/sys_devcon_pic32mk.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/797334065/sys_devcon_pic32mk.o …/src/system_config/pic32mk_gp_db_int_dyn/framework/system/devcon/src/sys_devcon_pic32mk.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/1360937237/app.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/1360937237/app.o …/src/app.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/797334065/sys_devcon.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/797334065/sys_devcon.o …/src/system_config/pic32mk_gp_db_int_dyn/framework/system/devcon/src/sys_devcon.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/738678904/sys_ports_static.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/738678904/sys_ports_static.o …/src/system_config/pic32mk_gp_db_int_dyn/framework/system/ports/src/sys_ports_static.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/1360937237/main.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/1360937237/main.o …/src/main.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_exceptions.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_exceptions.o …/src/system_config/pic32mk_gp_db_int_dyn/system_exceptions.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_tasks.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_tasks.o …/src/system_config/pic32mk_gp_db_int_dyn/system_tasks.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:100:9: error: unknown configuration setting: ‘VBATBOREN’
#pragma config VBATBOREN = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:101:9: error: unknown configuration setting: ‘DSBOREN’
#pragma config DSBOREN = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:102:9: error: unknown configuration setting: ‘DSWDTPS’
#pragma config DSWDTPS = DSPS32
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:103:9: error: unknown configuration setting: ‘DSWDTOSC’
#pragma config DSWDTOSC = LPRC
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:104:9: error: unknown configuration setting: ‘DSWDTEN’
#pragma config DSWDTEN = OFF
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:105:9: error: unknown configuration setting: ‘FDSEN’
#pragma config FDSEN = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:106:9: error: unknown configuration setting: ‘BORSEL’
#pragma config BORSEL = HIGH
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:107:9: error: unknown configuration setting: ‘UPLLEN’
#pragma config UPLLEN = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:111:9: error: unknown configuration setting: ‘FUSBIDIO2’
#pragma config FUSBIDIO2 = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:112:9: error: unknown configuration setting: ‘FVBUSIO2’
#pragma config FVBUSIO2 = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:116:9: error: unknown configuration setting: ‘FUSBIDIO1’
#pragma config FUSBIDIO1 = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:117:9: error: unknown configuration setting: ‘FVBUSIO1’
#pragma config FVBUSIO1 = ON
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:161:14: error: ‘USB_ID_1’ undeclared here (not in a function)
.usbID = USB_ID_1
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:170:24: error: ‘INT_SOURCE_USB_2’ undeclared here (not in a function)
.interruptSource = INT_SOURCE_USB_2,
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:186:14: error: ‘USB_ID_2’ undeclared here (not in a function)
.usbID = USB_ID_2
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c: In function ‘SYS_Initialize’:
In file included from …/…/…/…/…/…/framework/system/int/sys_int.h:964:0,
from …/src/system_config/pic32mk_gp_db_int_dyn/system_definitions.h:54,
from …/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:50:
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:791:31: error: ‘INT_VECTOR_USB2’ undeclared (first use in this function)
SYS_INT_VectorPrioritySet(INT_VECTOR_USB2, INT_PRIORITY_LEVEL4);
^
…/…/…/…/…/…/framework/system/int/sys_int_mapping.h:207:46: note: in definition of macro ‘SYS_INT_VectorPrioritySet’
PLIB_INT_VectorPrioritySet( INT_ID_0,vector, priority)
^
…/src/system_config/pic32mk_gp_db_int_dyn/system_init.c:791:31: note: each undeclared identifier is reported only once for each function it appears in
SYS_INT_VectorPrioritySet(INT_VECTOR_USB2, INT_PRIORITY_LEVEL4);
^
…/…/…/…/…/…/framework/system/int/sys_int_mapping.h:207:46: note: in definition of macro ‘SYS_INT_VectorPrioritySet’
PLIB_INT_VectorPrioritySet( INT_ID_0,vector, priority)
^
make[2]: *** [build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_init.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
“C:\Program Files (x86)\Microchip\xc32\v2.05\bin\xc32-gcc.exe” -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=32MZ2048EFM100 -ffunction-sections -O1 -I…/src -I…/src/system_config/pic32mk_gp_db_int_dyn -I…/src/pic32mk_gp_db_int_dyn -I…/…/…/…/…/…/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/framework -I…/src/system_config/pic32mk_gp_db_int_dyn/bsp -Werror -Wall -MMD -MF build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_init.o.d -o build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_init.o …/src/system_config/pic32mk_gp_db_int_dyn/system_init.c -DXPRJ_pic32mk_gp_db_int_dyn=pic32mk_gp_db_int_dyn -no-legacy-libc
nbproject/Makefile-pic32mk_gp_db_int_dyn.mk:140: recipe for target ‘build/pic32mk_gp_db_int_dyn/debug/_ext/518178801/system_init.o’ failed
make[2]: Leaving directory ‘C:/microchip/harmony/v2_05_01/apps/usb/multi_usb/cdc_com_port_dual/firmware/cdc_com_port_dual.X’
nbproject/Makefile-pic32mk_gp_db_int_dyn.mk:90: recipe for target ‘.build-conf’ failed
make[1]: Leaving directory ‘C:/microchip/harmony/v2_05_01/apps/usb/multi_usb/cdc_com_port_dual/firmware/cdc_com_port_dual.X’
nbproject/Makefile-impl.mk:39: recipe for target ‘.build-impl’ failed

BUILD FAILED (exit value 2, total time: 10s)"

///
“aws_demos” project loading errors log:

Error: Project “harmony_boot” refers to file “bootloader.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “nvm.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “datastream.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_tmr_variant_mapping.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_tmr_local.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_tmr.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_tmr_mapping.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_tmr_compatibility.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “tmr_definitions_pic32m.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_usart_variant_mapping.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_usart_local.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_usart.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “drv_usart_definitions.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “driver.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “driver_common.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “osal.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “osal_definitions.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “osal_impl_basic.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_clk.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_clk_compatibility.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_clk_mapping.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_command.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_common.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_module.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_buffer.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_queue.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_console_local.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_console_uart.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_console.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_debug_local.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_debug.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_dma.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_dma_definitions.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_fs.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_int_private.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_int.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_int_mapping.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_ports.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_ports_definitions.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_reset.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_reset_definitions_pic32m.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_tmr_local.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “sys_tmr.h” which does not exist in the disk. The project failed to load.
Error: Project “harmony_boot” refers to file “system.h” which does not exist in the disk. The project failed to load.

Gaurav-Aggarwal-AWS wrote on March 27, 2018:

The project I mentioned in my previous response, is from Microchip (Curiosity Demo Examples tab): http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=DM320104&utm_source=MicroSolutions&utm_medium=Link&utm_term=FY18Q1&utm_content=DevTools&utm_campaign=Article

For the harmony_boot project load errors, these are because of some incorrect references in the project file and we will fix them. But these do not cause any build failures and you should be able to build it successfully.

Let us know if that does not work.

Thanks,
Gaurav

hbouvier-AWS wrote on March 30, 2018:

Hello,

Define like GAIN_LEVEL_3 are present in the X32 compiler.
They should be pulled in automatically. Do you have the latest version installed? You can find it here http://www.microchip.com/mplabxc32windows

We follow this process:

  1. Install the latest Java SE JDK.
  2. Install each of Microchip’s required software tools:
    Latest Version of MPLAB® X Integrated Development Environment
    Windows: http://www.microchip.com/mplabx-ide-windows-installer
    MAC OS: http://www.microchip.com/mplabx-ide-osx-installer
  3. Latest Version of MPLAB® XC32 Compiler
    Windows: http://www.microchip.com/mplabxc32windows
    MAC OS: http://www.microchip.com/mplabxc32osx
  4. Optional: Latest version of MPLAB® Harmony Integrated Software Framework
    Windows: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en599906
    MAC OS: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en599908

For connecting:

  1. Connect the MikroElectronika USB UART Click™ Board to the microBUS 1 connector (J5)
  2. Connect the MikroElectronika WiFi 7 Click Board to the microBUS 2 connector (J10)
  3. Connect a USB A to USB Mini B cable to the USB UART Click™ Board.
  4. Connect the On board debugger on J3.

After that there should not be anything special, just opening the project and compile should work.
From experience you could encounter the following issues:

  1. Unable to compile because path name is too long. It is recommended to put project at the root or higher level.
  2. Sometime a re-import clean is needed.
  3. Be careful not to use the same USB port to supply everything (like with USB switch), the power output is too high. More info about supplying power here: http://ww1.microchip.com/downloads/en/DeviceDoc/40001804B.pdf

Best,

Hugues

olafp wrote on March 30, 2018:

I got it to work, after trying lots of different projects and playing around with MPLAB X, so I was not sure what caused it to work.
So I closed both aws_demos and harmony_boot projects, and loaded them again.
First time I loaded aws_demos, it loaded harmony_boot, second time it loaded aws_demos??
Unfortunately, it doesn’t work again. And I can’t compile the project. its back to a previous state, when I got the same build errors…

// system_init.c and aws_bootloader.c are causing problems:

…/src/system_config/pic32mz_ef_curiosity/system_init.c:69:9: error: unknown value for configuration setting ‘SOSCGAIN’: ‘GAIN_LEVEL_3’
#pragma config SOSCGAIN = GAIN_LEVEL_3
^
…/src/system_config/pic32mz_ef_curiosity/system_init.c:71:9: error: unknown value for configuration setting ‘POSCGAIN’: ‘GAIN_LEVEL_3’
#pragma config POSCGAIN = GAIN_LEVEL_3
^
make[4]: *** [build/pic32mz_ef_curiosity/debug/_ext/1488941123/system_init.o] Error 1
make[4]: *** Waiting for unfinished jobs…
…/src/aws_bootloader.c:185:62: error: ‘__KSEG0_PROGRAM_MEM_BASE’ undeclared here (not in a function)
…/src/aws_bootloader.c:187:87: error: ‘__KSEG0_PROGRAM_MEM_LENGTH’ undeclared here (not in a function)

nbproject/Makefile-pic32mz_ef_curiosity.mk:2334: recipe for target ‘.build-subprojects’ failed
make[1]: Leaving directory ‘C:/aFreeRTOScur/demos/microchip/curiosity_pic32mzef/mplab’
nbproject/Makefile-impl.mk:39: recipe for target ‘.build-impl’ failed
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 10s)

Good to know that it can work, most be configuration issue then.
It worked with USB Uart Click in slot 1 and WiFi7Click in slot 2, with usb cables to both PKOB and Uart interfaces.
What steps to load,build and debug do you go through to get it to work?
Thanks

Edited by: olafp on Mar 30, 2018 3:35 PM