3 Replies Latest reply on Feb 10, 2014 7:07 AM by Mikal.Hart

    How to remove Arduino sketch file size limitation?

    Jacker.Wang

      When I download the sketch file, the log shows the used size and remaining size. Seems the sketch size limitation is embedded in Arduino IDE, is it right?

      Is there any way to remove the size limitation?

       

      thanks,

      Jacker

        • 1. Re: How to remove Arduino sketch file size limitation?
          rmm200

          For an Atmel based Arduino, file size limitations are based on actual program space and ram available. An Arduino Uno has much less than an Arduino Mega. The Galileo has no such constraints; there is no hardware division between program space and ram, and the sketch runs in an emulator.  The 256K limit is arbitrary. I know of no way to increase it though. 256K is bigger than any sketch I have seen.

          1 of 1 people found this helpful
          • 2. Re: How to remove Arduino sketch file size limitation?
            emed795

            Not sure how well this will work with the Galileo but the Arduino IDE defines sketch upload limits in its board.txt file. You can find the file at:

             

            [ide location]\hardware\arduino\x86\boards.txt

             

            You should see the following entry:

             

            izmir_fd.upload.maximum_size=262144


            This defines the sketch size limit of the Galileo board in the Arduino IDE. Modify as needed and reload the IDE for changes to take effect.

            • 3. Re: How to remove Arduino sketch file size limitation?
              Mikal.Hart

              I suspect that this is an oversight, but I can confirm that if you edit the line in arduino/hardware/arduino/x86/boards.txt, you can change it to something closer to 200MB:

               

              izmir_fd.upload.maximum_size=200000000

               

              I tested with this sketch:

               

              int array[1000000];

               

              void setup() {

                for (int i=0; i<1000000; ++i)

                  array[i] = rand();

                Serial.begin(115200);

              }

               

              void loop() {

                for (int i=0; i<1000000; ++i)

                  Serial.println(array[i]);

              }

              1 of 1 people found this helpful