Region `FLASH' overflowed by 1096 bytes

Hello all!

I'm testing the Arduino IoT Cloud with the new Portenta H7.

I do a program two weeks ago, to read temperature with BM280 and print it on ArduinoIoTCloud. It works fine, but now i want to make some changes in the sketch but i have this issue when i try to verify the code:

\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp: In member function 'ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()':
\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp:266:15: error: 'F' was not declared in this scope
     DBG_ERROR(F("ArduinoIoTCloudTCP::%s MQTT client connection lost"), __FUNCTION__);
               ^
\Arduino\libraries\ArduinoIoTCloud\src/AIoTC_Config.h:30:54: note: in definition of macro 'DBG_ERROR'
   #define DBG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
                                                      ^~~
\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp: In member function 'void ArduinoIoTCloudTCP::handleMessage(int)':
C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp:317:20: warning: variable length array 'bytes' is used [-Wvla]
   byte bytes[length];
                    ^
exit status 1
Error compiling for board Arduino Portenta H7 (M7 core).

I have the latest version of the Arduino IoT Cloud library and IDE. Anyone can help me please? Im desesperated.

Best regards!

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link that will allow you to make the attachment.


Please post your full sketch.

If possible, you should always post code directly in the forum thread as text using code tags:

  • Do an Auto Format (Tools > Auto Format[/b) on your code. This will make it easier for you to spot bugs and make it easier for us to read.[/li]
  • - Edit > Copy for Forum*
  • - In a forum reply here, click on the reply field.*
    - Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • - Press “Ctrl + V”. This will paste the sketch between the code tags.*
  • - Move the cursor outside of the code tags before you add any additional text to your reply.*
  • - Repeat the above process if your sketch has multiple tabs.*
  • [/list]*
  • This will make it easy for anyone to look at it, which will increase the likelihood of you getting help.*
  • If the sketch is longer than the 9000 characters maximum allowed by the forum, then it’s OK to add it as an attachment. After clicking the “Reply” button, you will see an “Attachments and other settings” link that will allow you to make the attachment.*
    When your code requires a library that’s not included with the Arduino IDE please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

Hello all!

I have an issue (as the title explains) with the WiFi library for Portenta H7. I installed the v1.2.0 and v1.2.2 drivers, and i test both but i have the same error message when i try to validate the sketch:

Multiple libraries were found for "WiFi.h"
 Used: \ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\libraries\WiFi
 Not used: \Arduino\libraries\WiFiNINA
exit status 1
Error compiling for board Arduino Portenta H7 (M7 core).

The library is called from ArduinoIoTCloud or Arduino_ConnectionHandler.

Anyone else has this problem too?

Best regards!!

Anytime you feel like providing the information I requested, I can get started with helping you to fix the error.

Hello all!

I have an issue (as the title explains) with the WiFi library for Portenta H7. I installed the v1.2.0 and v1.2.2 drivers, and i test both but i have the same error message when i try to validate the sketch:

Multiple libraries were found for "WiFi.h"
 Used: \ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\libraries\WiFi
 Not used: \Arduino\libraries\WiFiNINA
exit status 1
Error compiling for board Arduino Portenta H7 (M7 core).

The library is called from ArduinoIoTCloud or Arduino_ConnectionHandler.

Anyone else has this problem too?

Best regards!!

PD: Here is the sketch i make: GitHub - amoya04/Portenta-H7-Arduino-IoT-Cloud: This project is in progress, its pending to made changes because it doesnt compiles.

I’ve merged your cross-posts @Quijano__.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky “How to use this forum - please read.” post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Ok, i understood. Sorry for the inconveniente, i think the post with the Library issue maybe was well st Portenta's forum.

Regards and thank you

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link that will allow you to make the attachment.

Ok, thanks!

There is all the error code

Regards

errorcode_AIoT.txt (13.6 KB)

The error message from @Quijano__'s errorcode_AIoT.txt:

In file included from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Arduino_ConnectionHandler\src/Arduino_ConnectionHandler.h:216:0,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:27,

                 from sketch\thingProperties.h:2,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT\PortentaIoT.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Arduino_ConnectionHandler\src/Arduino_WiFiConnectionHandler.h:58:13: error: cannot declare field 'WiFiConnectionHandler::_wifi_udp' to be of abstract type 'arduino::WiFiUDP'

     WiFiUDP _wifi_udp;

             ^~~~~~~~~

In file included from C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\libraries\WiFi\src/WiFi.h:32:0,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Arduino_ConnectionHandler\src/Arduino_ConnectionHandler.h:44,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:27,

                 from sketch\thingProperties.h:2,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT\PortentaIoT.ino:19:

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\libraries\WiFi\src/WiFiUdp.h:33:7: note:   because the following virtual functions are pure within 'arduino::WiFiUDP':

 class WiFiUDP : public UDP {

       ^~~~~~~

In file included from C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/ArduinoAPI.h:41:0,

                 from C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/Arduino.h:47,

                 from C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\libraries\WiFi\src/WiFi.h:27,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Arduino_ConnectionHandler\src/Arduino_ConnectionHandler.h:44,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:27,

                 from sketch\thingProperties.h:2,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT\PortentaIoT.ino:19:

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:80:16: note: 	virtual void arduino::UDP::flush()

   virtual void flush() =0; // Finish reading the current packet

                ^~~~~

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:69:15: note: 	virtual int arduino::UDP::available()

   virtual int available() =0;

               ^~~~~~~~~

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:79:15: note: 	virtual int arduino::UDP::peek()

   virtual int peek() =0;

               ^~~~

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:53:15: note: 	virtual int arduino::UDP::beginPacket(arduino::IPAddress, uint16_t)

   virtual int beginPacket(IPAddress ip, uint16_t port) =0;

               ^~~~~~~~~~~

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:83:21: note: 	virtual arduino::IPAddress arduino::UDP::remoteIP()

   virtual IPAddress remoteIP() =0;

                     ^~~~~~~~

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.0\cores\arduino/api/Udp.h:85:20: note: 	virtual uint16_t arduino::UDP::remotePort()

   virtual uint16_t remotePort() =0;

                    ^~~~~~~~~~

@Quijano__ I tried your code out with the latest version of the Arduino Mbed OS-enabled Boards platform (1.2.2) and latest version of all libraries and it does compile. Unfortunately, the sketch is too large to fit in the Portenta’s memory:

c:/users/per/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\per\AppData\Local\Temp\arduino_build_433135/ArduinoIoTCloud-Basic.ino.elf section `.ARM.exidx' will not fit in region `FLASH'
c:/users/per/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 820 bytes
collect2.exe: error: ld returned 1 exit status

So I think the error you are getting is caused by you using an outdated version of the Arduino Mbed OS-enabled boards platform. This beta phase boards platform is in active development and the ArduinoIoTCloud library is mirroring the changes made to the platform, so it’s important to keep your installation of the Arduino Mbed OS-enabled boards platform updated. You can do that via Tools > Board > Boards Manager.

As for the memory issue, I’m not sure. Maybe some of the other forum members will have some ideas about that.

I think i solve the UDP error by following this post:

What you do you mean by "following this post"? That post is two months old. The only thing you need to do now to get that fix is to use the current version of the Arduino Mbed OS-enabled boards platform, as I told you to do in my previous reply.

Hello all!

I am having a lot of problems when i try to compile this project: GitHub - amoya04/Portenta-H7-Arduino-IoT-Cloud: This project is in progress, its pending to made changes because it doesnt compiles.

I wrote some post asking for some of them, but i dont know how to do with this one:

./arduinodata/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 1096 bytes

collect2.exe: error: ld returned 1 exit status

I’m using last version both IDE and Portenta H7 (1.2.2).

I am not having a good experience with Arduino, i think i expend more time solving issues with incopatibilities than programming or enjoying the arduino’s ecosystem.

Regards.

errorcode_AIoT.txt (10.4 KB)

I've merged your cross-posts yet again @Quijano__.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum. This is your final warning.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.