Issue with 4.6 creating huge memory increase

I initially started a stopwatch on my phone but around the 18 min mark, I had a call and stepped aside. It did finish after I returned to the room.

Jeez… 18 minutes is crazy.

The entire GUI library ProffieConfig uses takes around that long to compile on a bad day, and it’s massive. I don’t think I’ve ever heard of something ProffieOS’ size taking that long to compile. Not that I’ve heard of a lot, to be fair, but that does seem extremely exceptionally long.

EDIT: Yeah, I just checked, that library is over 1 million lines of code (Actual code lines, not counting comments or whitespace), and it probably takes around 15 minutes or so to compile…

1 Like

15-2-1-xpack-1-1 so that seems right to me at least.

2nd run that I just did went super faster (2 min) but it was because it started using a precompiled core:

Compiling libraries...
Compiling library "Wire"
"C:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\tools\\arm-none-eabi-gcc\\15-2-1-xpack-1-1/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib -fno-rtti -fno-exceptions -MMD -flto -fdevirtualize-at-ltrans -D_SYSTEM_CORE_CLOCK_=80000000L -D_SYSTEM_PCLK_DIVIDER_=1 -DARDUINO=10607 -DARDUINO_PROFFIEBOARD_V3 -DARDUINO_ARCH_STM32L4 -DSTM32L452xx -DPROFFIEBOARD_VERSION=3 -D__FPU_PRESENT=1 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -mslow-flash-data -fsingle-precision-constant -felide-constructors -ffast-math -DUSB_VID=0x1209 -DUSB_PID=0x6668 -DUSB_DID=0xffff "-DUSB_MANUFACTURER=\"hubbe.net\"" "-DUSB_PRODUCT=\"Proffieboard\"" -DUSB_TYPE=USB_TYPE_CDC_WEBUSB -DDOSFS_SDCARD=2 -DDOSFS_SFLASH=0 "-IC:\\Users\\rw\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/CMSIS/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/CMSIS/Device/ST/STM32L4xx/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/STM32L4xx/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\cores\\stm32l4" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\variants\\STM32L452RE-ProffieboardV3" "-IC:\\Users\\rwegan\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\libraries\\Wire\\src" "C:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\libraries\\Wire\\src\\Wire.cpp" -o "C:\\Users\\rw\\AppData\\Local\\arduino\\sketches\\6698B8015DE287677203D63010616F6F\\libraries\\Wire\\Wire.cpp.o"
Compiling core...
"C:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\tools\\arm-none-eabi-gcc\\15-2-1-xpack-1-1/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib -fno-rtti -fno-exceptions -MMD -flto -fdevirtualize-at-ltrans -D_SYSTEM_CORE_CLOCK_=80000000L -D_SYSTEM_PCLK_DIVIDER_=1 -DARDUINO=10607 -DARDUINO_PROFFIEBOARD_V3 -DARDUINO_ARCH_STM32L4 -DSTM32L452xx -DPROFFIEBOARD_VERSION=3 -D__FPU_PRESENT=1 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -mslow-flash-data -fsingle-precision-constant -felide-constructors -ffast-math -DUSB_VID=0x1209 -DUSB_PID=0x6668 -DUSB_DID=0xffff "-DUSB_MANUFACTURER=\"hubbe.net\"" "-DUSB_PRODUCT=\"Proffieboard\"" -DUSB_TYPE=USB_TYPE_CDC_WEBUSB -DDOSFS_SDCARD=2 -DDOSFS_SFLASH=0 "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/CMSIS/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/CMSIS/Device/ST/STM32L4xx/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7/system/STM32L4xx/Include" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\cores\\stm32l4" "-IC:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\variants\\STM32L452RE-ProffieboardV3" "C:\\Users\\rw\\AppData\\Local\\Arduino15\\packages\\proffieboard_experimental\\hardware\\stm32l4\\4.7\\variants\\STM32L452RE-ProffieboardV3\\variant.cpp" -o "C:\\Users\\rw\\AppData\\Local\\arduino\\sketches\\6698B8015DE287677203D63010616F6F\\core\\variant.cpp.o"
Using precompiled core: C:\Users\rw\AppData\Local\arduino\cores\57e9144063818d018f84714638e1c5c1\core.a

Deleting previous cores and sketches pulls it back to the now 15+ min wait.

Oh, well that makes more sense then.

If that’s cached normally then that’s much less bad.
Would be neat if that could be precompiled like the other libraries so it doesn’t have to happen on every user machine, but maybe Arduino makes that tricky.

How does that 2 minutes compare to a compilation of that config on 3.6 then?

About double. Takes about a minute to a minute half for the same config on 3.6.

471488 bytes used first run through on 3.6
467272 bytes second time around on 3.6

I can’t imagine compliers will be like cast iron pans that need seasoning…

1 Like

Without changing anything besides just being a consecutive run… that’s weird :laughing:

1 Like

Very. I’m gonna try 2 things while I do some chores. Doing a 4.7 again with just the 3.6 sketch and core left behind (likely not going to mean anything) and then deleting all sketches/cores and running 4.7 2x to see if things improve.

1 Like

An aside:

For “fun”, I rebuilt wxWidgets clean for static Win32.
The build system configuration took just under 8 minutes, with compilation taking just under 10, so the whole thing took less than 18 minutes. (17:43, but I wasn’t super precise on the stop)
This was on my less-powerful i5-9600K system. It’s quite a bit faster on my Linux machine (Ryzen smth I don’t know lol)

I acknowledge it’s very much apples to oranges, but something of a loose frame of reference. I guess the “precompiled core” it ends up with is all of ST and ARM’s libraries or something like that which is making it take so long?

1 Like

Not that it matters but Arduino is doing that even with my config which is more than mildly annoying. I have 4.6 active with 4.7 alongside, no more 3.6 at all. I cannot remove 4.6 because apparently 4.7 needs it there to run.

/Users/(NameRemoved)/Library/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/14-2-rel1-xpack/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld:/Users/0_o/Library/Arduino15/packages/proffieboard/hardware/stm32l4/4.6/variants/STM32L452RE-ProffieboardV3/linker_scripts/STM32L452RE_FLASH.ld:224: warning: memory region `SRAM2' not declared
lto-wrapper: warning: using serial compilation of 6 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
/Users/(NameRemoved)/Library/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/14-2-rel1-xpack/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld: warning: start of section .bss changed by 24
Sketch uses 197992 bytes (38%) of program storage space. Maximum is 507904 bytes.

Can someone else on a M-Chip Mac see if they have similar.
**Not to create a detour here as it’s part of the topic and symptoms happening.

4.7 with 3.6 sketch, no difference, takes a long time and it recomplies core and sketches again, never acknowledging the 3.6 sketch and core. 24 minutes, 16552 bytes over.

4.7 after running it once and it using precompiled now yields 12096 bytes over for the next 3 tries all just 2-3 minutes to compile.

1 Like

It’s strange that the core takes so long to compile, because it’s not that big, and it’s not particularly complicated.

1 Like

Well, the issue of the wrong gcc is resolved. Not sure how or why because I ran recent updates, Rosetta 2 was a poor install/upload or plain missing due to the way Apple relocates stuff.

/Users/(NameRemoved)/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/15-2-1-xpack-1-1/bin/../lib/gcc/arm-none-eabi/15.2.1/../../../../arm-none-eabi/bin/ld:/Users/NameRemoved/Library/Arduino15/packages/proffieboard_experimental/hardware/stm32l4/4.7/variants/STM32L452RE-ProffieboardV3/linker_scripts/STM32L452RE_FLASH.ld:224: warning: memory region `SRAM2' not declared

I’ll rerun the compile for EditedAniflex again in a bit.

Anyone else needing to be sure Rosetta2 is active here ya go.

Arduino on Apple Silicon (M1/M2/M3/M4) often fails to locate x86-based tools due to missing Rosetta 2, resulting in a "bad CPU type in executable" error. To fix, run softwareupdate --install-rosetta in the Terminal. Other solutions include reinstalling board packages, using the Apple Silicon IDE version, or checking USB-C drivers

It’s odd for sure. Still befuddled as to why it’s still adding 15-60k bytes to every config on my end. For now I’m just gonna leave my new installs on 3.6 but yeah, odd.

@astromech Have ya had a chance to dig into any of this on your side yet?

No, I was waiting for 4.7 to get properly working. How do I add it as another URL?

The additional boards manager url is in Reply 35 above. Having yet another set of eyes on this would be appreciated. Thanks!

@profezzorn I’m going to try out one of the nightly Arduino builds to see if perhaps something on their side is contributing to this.

https://profezzorn.github.io/arduino-proffieboard/package_proffieboard_experimental_index.json

Yeah, I know, but how do I add more than one? What’s the syntax?

If I remember right you just go to the next line. (Hit enter)

Just a comma btw urls.