VS Arduino
Visual Micro >> Installation & Troubleshooting >> STM32 extremly slow build
https://www.visualmicro.com/forums/YaBB.pl?num=1599197188

Message started by SaturdayScience on Sep 4th, 2020 at 5:26am

Title: STM32 extremly slow build
Post by SaturdayScience on Sep 4th, 2020 at 5:26am
I'm beginning to explore STM32; I know the world has moved on...
I thought I would use the ASCII Table example code and the build time is 460seconds. Adding an extra character to a Serial.print and rebuild takes a similar time.
Am I doing something wrong or missing a trick?

Code (c++):
/*
Name:            ASCII_table.ino
Created:      9/3/2020 6:40:02 PM
Author:      mikeh
*/

/*
ASCII table

Prints out byte values in all possible formats :
-as raw binary values
- as ASCII - encoded decimal, hex, octal, and binary values

For more on ASCII, see http ://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII

The circuit : No external hardware needed.

created 2006
by Nicholas Zambetti < http ://www.zambetti.com>
     modified 9 Apr 2012
     by Tom Igoe

     This example code is in the public domain.

     http ://www.arduino.cc/en/Tutorial/ASCIITable
     */

     void setup() {
     //Initialize serial and wait for port to open:
     Serial.begin(500000);
     while (!Serial) {
           ; // wait for serial port to connect. Needed for native USB port only
     }

     // prints title with ending line break
     Serial.println("ASCII Table ~ Character Map");
}

// first visible ASCIIcharacter '!' is number 33:
int thisByte = 33;
// you can also write ASCII characters in single quotes.
// for example, '!' is the same as 33, so you could also use this:
// int thisByte = '!';

void loop() {
     // prints value unaltered, i.e. the raw binary version of the byte.
     // The Serial Monitor interprets all bytes as ASCII, so 33, the first number,
     // will show up as '!'
     Serial.write(thisByte);

     Serial.print(", dec: ");
     // prints value as string as an ASCII-encoded decimal (base 10).
     // Decimal is the default format for Serial.print() and Serial.println(),
     // so no modifier is needed:
     Serial.print(thisByte);
     // But you can declare the modifier for decimal if you want to.
     // this also works if you uncomment it:

     // Serial.print(thisByte, DEC);


     Serial.print(", hex: ");
     // prints value as string in hexadecimal (base 16):
     Serial.print(thisByte, HEX);

     Serial.print(", oct: ");
     // prints value as string in octal (base 8);
     Serial.print(thisByte, OCT);

     Serial.print(", bin: ");
     // prints value as string in binary (base 2) also prints ending line break:
     Serial.println(thisByte, BIN);

     // if printed last visible character '~' or 126, stop:
     if (thisByte == 126) {    // you could also use if (thisByte == '~') {
       // This loop loops forever and does nothing
           while (true) {
                 continue;
           }
     }
     // go on to the next character
     thisByte++;
}


https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=20200904_Buildlog.txt ( 1273 KB | 5 Downloads )

Title: Re: STM32 extremly slow build
Post by Simon@Visual Micro on Sep 4th, 2020 at 9:14am
Thanks for the report and detailed information.

Are you running the second builds using Build > Rebuild?  (or just Build?)

It may be worth upgrading to the latest release available (20.07.08.13) as there have been changes to how paths are treated which could have affected this too.
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

When just running Build for a second time, I can compile the sketch in around 13s even with the change to a Serial.print() as described, and in the output it should show "Using Previous Search Results: " for a large number of core files as they are cached.

Title: Re: STM32 extremly slow build
Post by SaturdayScience on Sep 4th, 2020 at 11:00am
I'll have to wait until this evening as currently I'm in work.
I was using build on both occasions; I was ignorant to the rebuild.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.