LowPowerLab Forum

Hardware support => Moteino => Topic started by: alexsh1 on September 14, 2022, 01:02:45 PM

Title: Compiling error
Post by: alexsh1 on September 14, 2022, 01:02:45 PM
Hi all,

I have the following problem when compiling a sketch and choosing "Moteino USB"
If I choose Arduino Nano, there is no problem so I assume the problem pertains to Moteino ?!
Any help is appreciated.

"C:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\Moteino\\hardware\\avr\\1.6.1\\variants\\Moteino" "-Ic:\\Users\\ashes\\Documents\\Arduino\\libraries\\MySensors" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\libraries\\SPI\\src" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\libraries\\Wire\\src" "-Ic:\\Users\\ashes\\Documents\\Arduino\\libraries\\SparkFun_BME280\\src" "C:\\Users\\ashes\\AppData\\Local\\Temp\\arduino-sketch-9F678573572D7168587156F8AF298387\\sketch\\MotionSensor-lowlabs_v2_Nr2.ino.cpp" -o "C:\\Users\\ashes\\AppData\\Local\\Temp\\arduino-sketch-9F678573572D7168587156F8AF298387\\sketch\\MotionSensor-lowlabs_v2_Nr2.ino.cpp.o"
In file included from c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/MyCryptoAVR.h:25:0,
                 from c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/MyCryptoAVR.cpp:21,
                 from c:\Users\ashes\Documents\Arduino\libraries\MySensors/MySensors.h:65,
                 from C:\Users\ashes\Documents\Arduino\MotionSensor-lowlabs_v2_Nr2\MotionSensor-lowlabs_v2_Nr2.ino:17:
c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp: In function 'AES_CBC_encrypt_buffer(AES_ctx*, unsigned char*, unsigned long)':
c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525:1: error: unable to find a register to spill in class 'POINTER_REGS'
}
^
c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525:1: error: this is the insn:
(insn 288 325 289 11 (set (reg:HI 26 r26)
        (reg/v/f:HI 67 [ buf ])) c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:524 82 {*movhi}
     (expr_list:REG_DEAD (reg/v/f:HI 67 [ buf ])
        (nil)))
c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525: confused by earlier errors, bailing out

Using library MySensors at version 2.3.2 in folder: C:\Users\ashes\Documents\Arduino\libraries\MySensors
Using library SPI at version 1.0 in folder: C:\Users\ashes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI
Using library Wire at version 1.0 in folder: C:\Users\ashes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\Wire
Using library SparkFun_BME280 at version 2.0.9 in folder: C:\Users\ashes\Documents\Arduino\libraries\SparkFun_BME280
exit status 1

Compilation error: exit status 1


Thananks
Alex
Title: Re: Compiling error
Post by: Felix on September 15, 2022, 05:17:10 PM
Not sure how to help without going through the attempt to replicate the exact thing you're doing, including having the same source code and all lib versions etc.
In another similar case (not sure if here in the forum or over email) a reinstall of the IDE and the board packages solved the compile issue, I know this is a long shot but sometimes nonsensical compilation errors come from some mismatch of versions, a manual install that has something missing etc.
Title: Re: Compiling error
Post by: alexsh1 on September 17, 2022, 04:26:57 AM
Quote from: Felix on September 15, 2022, 05:17:10 PM
Not sure how to help without going through the attempt to replicate the exact thing you're doing, including having the same source code and all lib versions etc.
In another similar case (not sure if here in the forum or over email) a reinstall of the IDE and the board packages solved the compile issue, I know this is a long shot but sometimes nonsensical compilation errors come from some mismatch of versions, a manual install that has something missing etc.

Thanks Felix
This is happening after installing latest Arduino IDE and all updated libs. And this is only happening under "Moteino" board, i.e. if I choose Arduino Nano, I do not have this error message - looks like this is a gcc bug or something?

Do you have a link to the latest board manager URL?
Title: Re: Compiling error
Post by: Felix on September 19, 2022, 11:42:25 AM
Whatever is posted here is the latest:
https://lowpowerlab.com/guide/moteino/programming-libraries/
Title: Re: Compiling error
Post by: alexsh1 on September 20, 2022, 05:00:10 PM
This is the one I have installed.
Still throws me this error under Arduino IDE 2.0.0
Title: Re: Compiling error
Post by: Felix on September 21, 2022, 08:21:54 AM
I tried some basic compilations on 2.0.0 and I can see no issues with Moteino.
Do you want to send me your sketch to try to replicate?