Gcc 12.3 (new compiler maybe)

So I’ve been having some trouble with my color display implementation. Turns out that part of the problem is that the compiler will in some case generate completely bogus code.

Luckly, there are new releases of the gcc compiler. The arduino-proffieboard plugin currently uses gcc 9.2, which a couple of years old. The latest is 12.3, which so far seems to be better at not generating bogus code.

Anyways, unless I find something wrong with it, I will make an update for the arduino-proffieboard plugin soon which uses a newer compiler.

1 Like

I wonder if maybe some of the other weird bugs we’ve been chasing are related to gcc bugs too?

Not sure how it could be related to SD card not found once in a blue moon, but better sleep at night would be nice.

It’s possible, although the errors I’ve had while working on color displays have been a lot more severe. In one instance, a function which does not have any loops whatsoever was compiled into an infinite loop, causing ProffieOS to freeze instantly. In another case, debug printouts from the code were printed out of order, indicating that some parts of the code had either been optimized away, or that jumps in the code were going to the wrong location. Pretty weird stuff.

Ok, so I made a version of the arduino-proffieboard plugin that uses gcc 12.3.
It seems to work pretty well and generate slightly smaller code.

If you want to try it, you’ll need to have the “experimental” package index in your “additional board manager urls”:


Arduino 2.x is reasonably good at keeping things separate, so you can have both the experimental and the regular version installed and swap between them in Tools → Board.

If you try it out, let me know if it works for you. (Just drop a note in this thread) I hope to promote this to beta, and then stable eventually, but I want plenty of testing first, and it takes forever if I have to do it all myself.

I had moved up in arduino versions and rolled back at some point to 1.8.19

Has anyone had probs with 2.2.1 (current public release). If not then I’ll upgrade and try the new plugin. I just don’t wanna run two variables at the same time (the upgrade being one of them).

just flashed my v3.9 graflex, only one font and nothing fancy for blade sytle, smaller code generated and seems to be working :slight_smile:

been using 2.2.1 for a few weeks and not sure if anything bad, but sabers flash and work

@profezzorn Oddly, this is giving me a hard time installing on MacOS.
It seemed like it worked:

  • Boards Manager progress bar completed “downloading tools”
  • Tools>Board>Proffieboard was there.
  • Error compiling for Proffieboard V2. Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/arm-none-eabi-g++: no such file or directory
    I looked and actually there’s nothing inside 12-3-rel1.
    I uninstalled (deleted package) and tried to reinstall a few more times but I repeatedly got:
java.lang.NoClassDefFoundError: org/tukaani/xz/XZInputStream
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:103)
	at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
	at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:141)
	at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.tukaani.xz.XZInputStream
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

Tried removing and installing again, and now back to case 1, it looks successful, but no directories after /12-3-rel1.

I manually installed from the tarball and working now.
However, compiled size is larger now.
3.6.0 = sketch 247800
3.7.0 = sketch 255832

Also a note, Arduino 1.8.19 is allowing me to have both installed simultaneously, and choose from the Tools>Board menu no problem.

Arduino 1.x doesn’t support *.tar.xz files.
Not an issue on windows, because the windows file is zip file, but the Linux and Mac files are *.xz files, which requires Arduino 2.x. I could repackage the files I suppose, but as it is, I can reference the files directly from the arm-gcc website, which is kind of nice.

Guess size depends on what is compiled.
I’ve only tried a couple of things, and most of them were slightly smaller.
The color display program got bigger though, but that is because gcc 9 was optimizing away things that are actually needed…

I’m running Mac Ventura 13.5.1 and Arduino 1.8.19

When I attempted to install the experimental package 3.7, I got this error at the bottom of the boards manager and the installation failed:


Bumped up to Arduino 2.2.1

With the current plug-in:

Sketch uses 206512 bytes (78%) of program storage space. Maximum is 262144 bytes.

With the experimental plug-in I got an error. I was able to select Tools>Board>Proffieboard Experimental>Proffieboard V2


fork/exec /Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/arm-none-eabi-g++: no such file or directory

Compilation error: fork/exec /Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/arm-none-eabi-g++: no such file or directory

Sorry, I tried :slight_smile:

Edit: still glad to help if I can.

Correct, same. Installer doesn’t get anything extracted to go inside 12-3-rel1 directory. (see profezzorn’s explanation above)
So empty folder = file not found error.

1 Like

Try uninstall / reinstall the experimental plugin (with Arduino 2.2.1)

Successfully compiles after uninstall/reinstall.


/Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld:/Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/hardware/stm32l4/3.7/variants/STM32L433CC-ProffieboardV2/linker_scripts/STM32L433CC_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/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: warning: start of section .bss changed by 8
Sketch uses 206800 bytes (78%) of program storage space. Maximum is 262144 bytes.

Output from standard plug in:

/Users/catherinebogin/Library/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld:/Users/catherinebogin/Library/Arduino15/packages/proffieboard/hardware/stm32l4/3.6.0/variants/STM32L433CC-ProffieboardV2/linker_scripts/STM32L433CC_FLASH.ld:224: warning: memory region `SRAM2' not declared
Sketch uses 206512 bytes (78%) of program storage space. Maximum is 262144 bytes.

Looks like the experimental sketch uses 288 more bytes. Easy to switch back and forth.

I thought to run the same config for a v3 board as I’m working on one for the first time.

Standard compiler output:

/Users/catherinebogin/Library/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld:/Users/catherinebogin/Library/Arduino15/packages/proffieboard/hardware/stm32l4/3.6.0/variants/STM32L452RE-ProffieboardV3/linker_scripts/STM32L452RE_FLASH.ld:224: warning: memory region `SRAM2' not declared
Sketch uses 207664 bytes (40%) of program storage space. Maximum is 507904 bytes.


/Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld:/Users/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/hardware/stm32l4/3.7/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/catherinebogin/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: warning: start of section .bss changed by 8
Sketch uses 208248 bytes (41%) of program storage space. Maximum is 507904 bytes.

This warning is new, normal and nothing to worry about. (It’s annoying so maybe I’ll see if I can make it go away.)

1 Like

Supposedly that warning is fixed in GCC 13. The next question is how many other things does GCC 13 break.

When I try to upload a config under the 3.7.0. plugin, I get the error below.

System is MacOS 10.15.7 Catalina, Arduino 1.8.19.

Arduino: 1.8.19 (Mac OS X), Board: “Proffieboard V2, Serial + Mass Storage, SDCARD (SPI), 80 MHz, Smallest Code”

fork/exec /Users/chrisandlindsey/Library/Arduino15/packages/proffieboard_experimental/tools/arm-none-eabi-gcc/12-3-rel1/bin/arm-none-eabi-g++: no such file or directory
Error compiling for board Proffieboard V2.

Please re-install the plugin.
Also, 1.8.19 cannot install this plugin, because it doesn’t support xz files.
You can either untar the files manually, or you can use Arduino 2.2.1 to install it.
Once installed, you should be able to use the plugin with Arduino 1.8.19, as well as 2.2.1.