MicrochipTech / aws-iot-firmware-pic32mz

Microchip's PIC32MZ based IoT demos are designed to work with Amazon Web Service's AWS IoT platform and Microchip's "Insight on Things" (IoT) desktop application.
http://www.microchip.com/iot
Other
23 stars 17 forks source link

Build issue #12

Closed Oakeson closed 7 years ago

Oakeson commented 7 years ago

In the Compiling and Programming instructions here, the instructions say "With your project opened, right click on the project aws-iot-ethernet in the Projects tab and select Set as Main Project". This cannot be done as the project loads with file not found errors using MPLAB 3.40 and Harmony v1.09.

I suspect the problem is in aws-iot-firmware-pic32mz\software\aws-iot-ethernet\firmware\src\system_config\DM990004_IoT_Ethernet\configuration.xml, as it contains relative directory locations for Harmony and absolute directory locations for the developer's Documents directory; however, even making all harmony directories absolute and updating the location of Documents yields the same project loading file-not-found errors. The sections of configuration.xml that are affected are <HarmonyPath>, <CompilerItems>, and <Libraries>

bellhop commented 7 years ago

What OS are you using? I will see if I can replicate the issue.

Oakeson commented 7 years ago

I'm using Windows 10 (64-bit).

I uninstalled all other versions of MPLAB X IDE and all other versions of Harmony. Harmony v1.09 was installed by downloading and then going to MPLAB's Plugins dialog and adding in the Downloaded tab.

I have my git repo at the same directory depth as the code here (i.e. /Users/XXX/Documents/GitHub/aws-iot-firmware-pic32mz) and I edited the configuration.xml to swap in any differences in the directory path such as the username under /Users.

I tried installing Harmony at the following locations -- either is fine long term, but they both yield the same failures. The first is, I believe, the Microchip recommended location while the second appears to match where the developer has it for this project

/microchip/harmony/v1_09
/Users/XXX/Documents/Microchip/harmony/v1_09

With both Harmony locations, I tried adding the Harmony source folder to the Source Folders under the General section of the Project Properties. I also loaded the Harmony Configurator and had it generate code.

In all scenarios, I get a "Errors while reading XML from aws-iot-ethernet" dialog box when I bring up the project in MPLAB X IDE. There's also a stream of errors like this:

Error: Project "aws-iot-ethernet" refers to file "ecc.h" which does not exist in the disk. The project failed to load.
Error: Project "aws-iot-ethernet" refers to file "arc4.h" which does not exist in the disk. The project failed to load.
Error: Project "aws-iot-ethernet" refers to file "pwdbased.h" which does not exist in the disk. The project failed to load.
Error: Project "aws-iot-ethernet" refers to file "tfm.h" which does not exist in the disk. The project failed to load.
...

I have not modified the Include directories section of the Preprocessing and messages dropdown menu of the XC32 xc32-gcc project properties.

Thanks for looking into it...

bellhop commented 7 years ago

I am not able to replicate your error, but let me walk you though what I have done just so that we are on the same page. I am using a clean install of Windows 10 Pro 64-bit on an i5 Surface Pro 4 4G Ram.


  1. I download a fresh copy of the same tools you used.

    mchp-versions

  2. Installed each of the following

    • MPLab 3.40 - Default location
      C:\Program Files (x86)\Microchip\MPLABX\v3.40
    • XC32 1.42 - Default location
      C:\Program Files (x86)\Microchip\xc32\v1.42
    • Harmony 1.09 - Default location and all components
      C:\microchip\harmony\v1_09
  3. Started MPLab X and made sure that Harmony v1.09 was setup with the right configurator

    • Following the in this link Steps to Install MHC to make sure you get the right version
    • Making sure to install the version for 1.09 and not using the default version. Each release of Harmony has a different configurator file that has to be installed. hmc
  4. Clone the repo to the c:\ location so that I got a directory structure of...

    C:\aws-iot-firmware-pic32mz\software\aws-iot-ethernet\firmware\aws-iot-ethernet.X
  5. I then followed the steps in the Compile and Programing Guide guide (skipping step 8 as I did in step 3 of this reply)

    NOTE: When you run step 12 -> 14 is should reconfigure all of the file locations for you so you do not have to modify anything.

  6. Ran Clean, Build and Compile - Code fully compiled build-at-root


Just to make sure that the path was not an issue for you, I cloned the repo to my user documents folder as you have done

C:\Users\steph\Documents\aws-iot-firmware-pic32mz\software\aws-iot-ethernet\firmware\aws-iot-ethernet.X

I got the same results in building this time. build-at-user-docs

Oakeson commented 7 years ago

Thanks for the detailed investigation. Apparently the directory name was too long/deep -- I was using the following location: C:\Users\SGWXXXX\Documents\GitHub\aws-iot-firmware-pic32mz

I was sure that was safe from directory depth issues, but it's not and moving it to C:\aws-iot-firmware-pic32mz worked.

niccivyea commented 5 years ago

I'm going through the same error, and I'm using a macOS. It's weird because last week, it compiled with my "HW 1.s," but now, I added another filed names "HW 2.s," and it's giving me a refer error. What causes this?

sankar87eee commented 4 years ago

why Microchip is not responding to this error, me too got the same error. I have all latest version of MPLABX, x32, x16, x8, harmony v2.06. However, I am getting this error with all demo projects of PIC24 curiosity board and pic32MX EF curiosity board.