energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
798 stars 671 forks source link

Compilation Error for BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0 in Energia with MSP432E401Y #1076

Open dcl920108 opened 5 days ago

dcl920108 commented 5 days ago

Description:

Thank you for your support. I encountered compilation issues when attempting to upload the BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0 firmware to the MSP432E401Y using Energia. Below are the relevant details:

Board Information:


Expected Results:

The firmware should compile and upload successfully to the MSP432E401Y LaunchPad, allowing me to run the BOOSTXL-TECDRV GUI.


Actual Results:

Compilation fails with the following errors:

  1. Warnings: 'typedef' was ignored in this declaration

    • Example:
      typedef enum {OPEN_LOOP, CLOSED_LOOP}; // Control modes
  2. Ambiguous function call:

    • Example:
      ISO C++ says these are ambiguous... in the function Wire.requestFrom(TMP117_ADDRESS,2).
  3. Errors from aJSON library:

    • strcasecmp and strdup were not declared in aJSON.cpp.
  4. Multiple libraries issue:

    • Compiler detected multiple libraries for aJSON.h but selected the wrong one.

Steps to Reproduce the Problem:

  1. Download the BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0 firmware from the official site.
  2. Open the .ino file in Energia (1.8.11E23).
  3. Select LaunchPad w/ msp432e EMT (120MHz) as the board in Tools > Board.
  4. Compile the project without modifications.
  5. Observe the error logs.

Troubleshooting Tried:

  1. Verified aJSON library in libraries/ folder and removed duplicates.
  2. Moved Energia installation to C:\energia-1.8.10E23 to avoid OneDrive conflicts.
  3. Tried modifying the sensor type to SENS_TYPE_ANL for NTC sensors, but the errors persisted.

Any guidance on resolving these compilation issues would be greatly appreciated. Let me know if further details or files are needed. Thank you!

"Energia: 1.8.11E23 (Windows 10), Board: "LaunchPad w/ msp432e EMT (120MHz)"

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:66:1: warning: 'typedef' was ignored in this declaration

typedef enum {OPEN_LOOP, CLOSED_LOOP}; // Control modes

^~~

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:67:1: warning: 'typedef' was ignored in this declaration

typedef enum {SENS_TYPE_I2C, SENS_TYPE_ANL}; // Sensor types

^~~

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:68:1: warning: 'typedef' was ignored in this declaration

typedef enum {

^~~

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:81:1: warning: 'typedef' was ignored in this declaration

typedef enum {

^~~

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:87:1: warning: 'typedef' was ignored in this declaration

typedef enum {

^~~

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino: In function 'void loopBOOSTXL_TECDRV_LaunchPad_Source_v1_0_0()':

C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:173:42: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:

     Wire.requestFrom(TMP117_ADDRESS,2);

                                      ^

In file included from C:\energia-1.8.10E23\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0\BOOSTXL_TECDRV_LaunchPad_Source_v1_0_0.ino:49:0:

C:\Users\nerod\AppData\Local\Energia15\packages\energia\hardware\msp432e\5.19.0\cores\msp432e/ti/runtime/wiring/Wire.h:96:17: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)

     uint8_t requestFrom(int, int);

             ^~~~~~~~~~~

C:\Users\nerod\AppData\Local\Energia15\packages\energia\hardware\msp432e\5.19.0\cores\msp432e/ti/runtime/wiring/Wire.h:94:17: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)

     uint8_t requestFrom(uint8_t, uint8_t);

             ^~~~~~~~~~~

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp: In member function 'aJsonObject aJsonClass::getObjectItem(aJsonObject, const char*)':

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:944:41: error: 'strcasecmp' was not declared in this scope

while (c && strcasecmp(c->name, string))

                                     ^

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp: In member function 'void aJsonClass::addItemToObject(aJsonObject, const char, aJsonObject*)':

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:996:29: error: 'strdup' was not declared in this scope

item->name = strdup(string);

                         ^

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp: In member function 'aJsonObject aJsonClass::detachItemFromObject(aJsonObject, const char*)':

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:1038:41: error: 'strcasecmp' was not declared in this scope

while (c && strcasecmp(c->name, string))

                                     ^

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp: In member function 'void aJsonClass::replaceItemInObject(aJsonObject, const char, aJsonObject*)':

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:1077:41: error: 'strcasecmp' was not declared in this scope

while (c && strcasecmp(c->name, string))

                                     ^

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:1081:36: error: 'strdup' was not declared in this scope

   newitem->name = strdup(string);

                                ^

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp: In member function 'aJsonObject aJsonClass::createItem(const char)':

C:\energia-1.8.10E23\libraries\aJson\aJSON.cpp:1161:40: error: 'strdup' was not declared in this scope

   item->valuestring = strdup(string);

                                    ^

Multiple libraries were found for "aJSON.h" Used: C:\energia-1.8.10E23\libraries\aJson exit status 1 Error compiling for board LaunchPad w/ msp432e EMT (120MHz).

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. "