PORTENTA H7 compilation error

eeuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

Hi @thalesmaissa. I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Check the box next to "Show verbose output during: compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE's menus.
  5. Wait for the compilation to end.
  6. Right click on the black "Output" pane at the bottom of the Arduino IDE 2.x window.
  7. From the context menu, click Copy All.
  8. Open a forum reply here by clicking the Reply button.
  9. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  10. Press Ctrl+V. This will paste the compilation output into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the Reply button to post the output.

yes here it's.

Using board 'envie_m7' from platform in folder: C:\Users\THALES\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2
Using core 'arduino' from platform in folder: C:\Users\THALES\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2
Detecting libraries used...
"C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino/api/deprecated" "-iprefixC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/includes.txt" "C:\\Users\\THALES\\AppData\\Local\\Temp\\arduino-sketch-C02787BA9E205524C01EA63CD24D234C\\sketch\\TEST.ino.cpp" -o nul
Alternatives for Arduino_PortentaBreakout.h: [Arduino_PortentaBreakout@1.0.1]
ResolveLibrary(Arduino_PortentaBreakout.h)
  -> candidates: [Arduino_PortentaBreakout@1.0.1]
"C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\THALES\\Documents\\Arduino\\libraries\\Arduino_PortentaBreakout\\src" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino/api/deprecated" "-iprefixC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/includes.txt" "C:\\Users\\THALES\\AppData\\Local\\Temp\\arduino-sketch-C02787BA9E205524C01EA63CD24D234C\\sketch\\TEST.ino.cpp" -o nul
Alternatives for Wire.h: [Wire]
ResolveLibrary(Wire.h)
  -> candidates: [Wire]
"C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\THALES\\Documents\\Arduino\\libraries\\Arduino_PortentaBreakout\\src" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\Wire" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino/api/deprecated" "-iprefixC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/includes.txt" "C:\\Users\\THALES\\AppData\\Local\\Temp\\arduino-sketch-C02787BA9E205524C01EA63CD24D234C\\sketch\\TEST.ino.cpp" -o nul
Alternatives for SPI.h: [SPI]
ResolveLibrary(SPI.h)
  -> candidates: [SPI]
"C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\THALES\\Documents\\Arduino\\libraries\\Arduino_PortentaBreakout\\src" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\Wire" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\SPI" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino/api/deprecated" "-iprefixC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/includes.txt" "C:\\Users\\THALES\\AppData\\Local\\Temp\\arduino-sketch-C02787BA9E205524C01EA63CD24D234C\\sketch\\TEST.ino.cpp" -o nul
Alternatives for PDM.h: [PDM@1.0]
ResolveLibrary(PDM.h)
  -> candidates: [PDM@1.0]
"C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\THALES\\Documents\\Arduino\\libraries\\Arduino_PortentaBreakout\\src" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\Wire" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\SPI" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\libraries\\PDM\\src" "-IC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino/api/deprecated" "-iprefixC:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\cores\\arduino" "@C:\\Users\\THALES\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed\\1.3.2\\variants\\PORTENTA_H7_M7/includes.txt" "C:\\Users\\THALES\\AppData\\Local\\Temp\\arduino-sketch-C02787BA9E205524C01EA63CD24D234C\\sketch\\TEST.ino.cpp" -o nul
Alternatives for Portenta_Ethernet.h: []
ResolveLibrary(Portenta_Ethernet.h)
  -> candidates: []
Using library Arduino_PortentaBreakout at version 1.0.1 in folder: C:\Users\THALES\Documents\Arduino\libraries\Arduino_PortentaBreakout 
Using library Wire in folder: C:\Users\THALES\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\libraries\Wire (legacy)
Using library SPI in folder: C:\Users\THALES\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\libraries\SPI (legacy)
Using library PDM at version 1.0 in folder: C:\Users\THALES\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\libraries\PDM 
Compilation error: Error: 2 UNKNOWN: exit status 1

thank you

The problem is that you are using an outdated version of the "Arduino Mbed OS Boards" platform of the Portenta. The Portenta_Ethernet.h file was added after the time the 1.3.2 release you are using came out.

The fix is to update to the latest version of the boards platform. In order to reduce installation and compilation times, since the time of the release you are using, the "Arduino Mbed OS Boards" platform has been split into separate platforms for each board family. So I'm going to recommend you to install the latest version of the "Arduino Mbed OS Portenta Board" platform which is specifically for the Portenta.

Please do this:

  1. Select Tools > Board > Boards Manager from the Arduino IDE's menus to open the Boards Manager panel from the side bar.
  2. In the "Filter your search" field, type mbed
  3. Scroll down through the list of boards platforms until you see "[DEPRECATED - Please install standalone packages] Arduino Mbed OS Boards by Arduino". Hover the mouse pointer over the label on that platform that says "INSTALLED".
  4. You will now see the label text change to "UNINSTALL". Click on it.
  5. An uninstallation dialog will now appear, asking you to confirm that you want to uninstall the "[DEPRECATED - Please install standalone packages] Arduino Mbed OS Boards" platform. Click the Yes button.
  6. Scroll through the list of boards platforms in the Boards Manager side bar until you see "Arduino Mbed OS Portenta Boards by Arduino". Click on it.
  7. Click the Install button.
  8. Wait for the installation to finish.

You should now be able to compile your sketch without getting this error.

hello,
I did like you said I installed the mbed Portenta but it didn't work :confused:


I have this as error and without any details :
Compilation error: Error: 2 UNKNOWN: platform not installed
thank

it's ok it works I should install the [DEPRECATED - Please install standalone packages] Arduino Mbed OS Boards by Arduino".
know it's working fine
thank you for the explication it was very helpful.
Maissa

Sorry about that. I should have mentioned that, in this particular unusual case where the Portenta boards platform was split out from the original multi-board platform, you must select the Portenta board again from the Arduino IDE's Tools > Boards menu.

I strongly recommend against using the "[DEPRECATED - Please install standalone packages] Arduino Mbed OS Boards" platform. As the name indicates, you are discouraged from using this and it will cease to be maintained sometime in the near future. You will also have a better experience by using the "Arduino Mbed OS Portenta Boards" platform due to faster updates and compilations.

ok I got it.
it's obvious that with the Arduino Mbed OS Portenta Boards it's much more faster.
it works perfectly.
thank you again for your help

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

1 Like