arduino-cli does not compile sketch for Teensy4.1

shookti

Active member
I am trying to upload a sketch to a Teensy 4.1 on a raspberry pi running raspbian bullseye using arduino-cli, however it throws an error:

Command used:
Code:
arduino-cli compile HardwareTest.ino --output-dir Build/ --fqbn teensy:avr:teensy41 -v

Output:
Code:
FQBN: teensy:avr:teensy41
Using board 'teensy41' from platform in folder: /home/pi/.arduino15/packages/teensy/hardware/avr/1.59.0
Using core 'teensy4' from platform in folder: /home/pi/.arduino15/packages/teensy/hardware/avr/1.59.0


Detecting libraries used...
/home/pi/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/pi/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /tmp/arduino/sketches/92B0F0E14D32A709C62320DED291AF39/sketch/HardwareTest.ino.cpp -o /dev/null


Used platform Version Path
teensy:avr    1.59.0  /home/pi/.arduino15/packages/teensy/hardware/avr/1.59.0
Error during build: fork/exec /home/pi/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++: no such file or directory

The same error was thrown by arduino-ide (version 1.8.x as those are the only ones available for raspbian), that was solved by uninstalling and reinstalling the board using the board manager, suggested by the solution to this post on the arduino forum:

Is there any way to do the same for arduino-cli?

Thanks
 
Last edited:
The underlying link appears to be broken. Here’s the correct link:
 
Is there any way to do the same for arduino-cli?

Yes, arduino-cli has the ability to uninstall and re-install boards. In fact, Boards Manager in Arduino IDE 2.3.x actually uses arduino-cli to do all this stuff. You can too, if you figure out the correct command line parameters.

I don't use arduino-cli directly very often, so I'm not really familiar with the details. If you're stuck, probably best to ask on the Arduino forum. You can also get (somewhat terse) help by running "arduino-cli --help", or with the specific command, like "arduino-cli core --help". Looking at those now, maybe you want something like "arduino-cli core install teensy:avr". You might need to edit a config file to add the Teensy boards URL somehow, as is done in the IDE with File > Preferences. Or maybe you can just give it on the command line with the optional --additional-urls options. Again, I don't use this very much so I'm not 100% sure exactly which command you should run, but hopefully this helps get you closer.
 
I think the main steps you need are:
Code:
arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
arduino-cli core install teensy:avr
wget https://www.pjrc.com/teensy/00-teensy.rules -P /etc/udev/rules.d
You may already have done some of these, like load the udev rules...

Note that the compile process fails if the Teensy loader is not running: you can find it at ~/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/teensy. It's a pain because AFAIK the loader isn't actually needed to generate a binary, and it needs a GUI to run under, so your Pi will need that even if you're trying to run headless. I'd love to be proven wrong on this one...
 
@h4yn0nnym0u5e

Yes, the udev rules are in place, but I don't think it should matter as the command is only compiling the sketch, and I think udev rules would come into the picture during the upload process.

I know for a fact that arduino-cli does not need the teensy loader to be running during compilation. I use arduino-cli on other computers (linux) and it works perfectly fine without the loader running. I upload to the Teensy using teensy_loader_cli so I essentially never require teensy loader to be running.

The IDE however, even if running headlessly (by using xvfb for example), does require teensy loader to be running (last tested months ago, IDE version 1.8.x). I don't think that's relevant but just posting it here for your information.
 
Last edited:
@PaulStoffregen

I tried reinstalling the teensy board using arduino-cli like so (yes, the board url has been placed in ~/.arduino15/arduino-cli.yaml):
I first ran:
Code:
arduino-cli core uninstall teensy:avr
Then:
Code:
arduino-cli core install teensy:avr
However, that did not work. The compilation command still throws the same error.

I just posted my question on the Arduino forum:
 
Hmm ... curious. Here's a slightly redacted version of my experience. It clearly finds the compiler, and most of the teensy tools like teensy_post_compile, but then despite being passed the correct path to the tools, it claims "Unable find Teensy Loader" [sic].
Code:
jroadmin@jropi:~/Team/arduino/Teensy4 $ arduino-cli compile --verbose --clean --fqbn teensy:avr:teensy41 --build-path manual Teensy4.ino

FQBN: teensy:avr:teensy41
Using board 'teensy41' from platform in folder: /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0
Using core 'teensy4' from platform in folder: /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0

Detecting libraries used...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/Team/arduino/Teensy4/manual/sketch/Teensy4.ino.cpp -o /dev/null
Generating function prototypes...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/Team/arduino/Teensy4/manual/sketch/Teensy4.ino.cpp -o /tmp/2616037245/sketch_merged.cpp
/home/jroadmin/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/2616037245/sketch_merged.cpp
Compiling sketch...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/precompile_helper /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/Team/arduino/Teensy4/manual /home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/Team/arduino/Teensy4/manual/pch/Arduino.h -o /home/jroadmin/Team/arduino/Teensy4/manual/pch/Arduino.h.gch
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/Team/arduino/Teensy4/manual/pch -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/Team/arduino/Teensy4/manual/sketch/Teensy4.ino.cpp -o /home/jroadmin/Team/arduino/Teensy4/manual/sketch/Teensy4.ino.cpp.o
Compiling libraries...
Compiling core...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/Team/arduino/Teensy4/manual/pch -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/AudioStream.cpp -o /home/jroadmin/Team/arduino/Teensy4/manual/core/AudioStream.cpp.o
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/Team/arduino/Teensy4/manual/pch -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/DMAChannel.cpp -o /home/jroadmin/Team/arduino/Teensy4/manual/core/DMAChannel.cpp.o
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/jroadmin/Team/arduino/Teensy4/manual/pch -I/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4 /home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/Blink.cc -o /home/jroadmin/Team/arduino/Teensy4/manual/core/Blink.cc.o

<many lines of core build omitted>

/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-gcc-ar rcs /home/jroadmin/Team/arduino/Teensy4/manual/core/core.a /home/jroadmin/Team/arduino/Teensy4/manual/core/usb_touch.c.o
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-gcc-ar rcs /home/jroadmin/Team/arduino/Teensy4/manual/core/core.a /home/jroadmin/Team/arduino/Teensy4/manual/core/yield.cpp.o
Archiving built core (caching) in: /tmp/arduino/cores/teensy_avr_teensy41_03645f1758624fcb9c02fa0d06134039/core.a
Linking everything together...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-gcc -O2 -Wl,--gc-sections,--relax -T/home/jroadmin/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/imxrt1062_t41.ld -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.elf /home/jroadmin/Team/arduino/Teensy4/manual/sketch/Teensy4.ino.cpp.o /home/jroadmin/Team/arduino/Teensy4/manual/core/core.a -L/home/jroadmin/Team/arduino/Teensy4/manual -larm_cortexM7lfsp_math -lm -lstdc++
Opening Teensy Loader...
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.elf /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.eep
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.elf /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.hex
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/teensy_secure encrypthex TEENSY41 /home/jroadmin/Team/arduino/Teensy4/manual/Teensy4.ino.hex
Can't find location of default key .pem file, skipping .ehex encryption
/home/jroadmin/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/teensy_post_compile -file=Teensy4.ino -path=/home/jroadmin/Team/arduino/Teensy4/manual -tools=/home/jroadmin/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/ -board=TEENSY41
Unable find Teensy Loader.  (p)  Is the Teensy Loader application running?
quit

None of which is actually relevant to your experience of the compiler going AWOL ... sorry!

[EDIT] for what it's worth, I'm running bookworm, not bullseye
 
Last edited:
Sorry it has been a lloonngg time since I tried running any of these tools on an RPI. So please forgive me if I state or ask some simple questions, which may be obvious to others...

Is this a 32 bit or 64 bit version?

I believe that @PaulStoffregen has builds for RPI 32 and 64 bits for IDE 1.x. Not sure if there are installs for both of them as part of the board manager?

Back to Teensy loader - If I remember correctly the normal teensy loader app is built with libraries which will not run on a
headless environment. Back when I was playing with it I mucked up the boards.txt or the like to use teansyloadercli to do
the downloads, which worked.

There are a few different threads about this that I did at the time... One which points to some others:

Back then I was trying to different approaches to updating a Teensy sketch running on the RPI (or other like boards) that were
on a robot.

1) the approach of installing all of this stuff on the RPI, and run these commands over a PuTTy (more likely Kitty) and
that is where I updated the boards.txt platform.txt to use the CLI version of the loader.

2) Built on my PC, Used WinSCP or one of its command line apps, to copy the binary file to the RPI and then ran the command line loader to program the teensy. At one point I mucked up my PC version of boards/platform to add Upload options. One being the normal one, but another that did an RCP to transfer the binary file to a known directory on the RPI. On The RPI I had a script running looking for a new binary file and if it found one, would do the teensyloader cli app to program the teensy.

Not sure if this helps or not, but good luck!
 
I believe that @PaulStoffregen has builds for RPI 32 and 64 bits for IDE 1.x. Not sure if there are installs for both of them as part of the board manager?

All 6 architectures are listed in the JSON file. But really a 7th is needed soon for ARM-based MacOS... but I don't know how to rebuilt the gcc 11.3 toolchain for ARM MacOS. :(

The sad reality is only 2 platforms (Windows and Linux x86-64) get a lot of testing. MacOS gets less, but still quite a lot more than the 3 seldom used Linux flavors.

@shookti - I have no idea why it's not working for you. Maybe if you run arduino-cli in verbose mode and show us all the stuff it prints, perhaps we'll be able to help more? You might also try looking in /home/pi/.arduino15/packages/teensy/tools/teensy-compile/11.3.1 to see if anything got installed. Again, if you show us what actually happened, maybe we can help more than just telling us it didn't work without any visibility into what really happened.
 
@PaulStoffregen
Maybe if you run arduino-cli in verbose mode and show us all the stuff it prints, perhaps we'll be able to help more?
The original command and output are in verbose mode ('-v' at the end of the command). I have put the entire output of the command in post #1. I guess the screenshot below is 'proof' 🙃:
1723014485144.png


You might also try looking in /home/pi/.arduino15/packages/teensy/tools/teensy-compile/11.3.1 to see if anything got installed
There is stuff in there:
Code:
pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/11.3.1/
arm  avr
However, the directory one level above has two folders, one of them is empty:
Code:
pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/ -a
.  ..  11.3.1  5.4.1
pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/11.3.1/ -a
.  ..  arm  avr
pi@raspberrypi:~ $
pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/5.4.1/ -a
.  ..
pi@raspberrypi:~ $
Not sure if that's relevant.

Again, if you show us what actually happened, maybe we can help more than just telling us it didn't work without any visibility into what really happened
I'm not sure about what else I can tell you that's not in post #1 and #7, could you please clarify?
 
Last edited:
Try running "ls -la /home/pi/.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin", to check if the actual arm-none-eabi-g++ binary is present.
 
This is the output, looks like the file you refer to exists:
Code:
pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/
arm-none-eabi-addr2line  arm-none-eabi-gcc         arm-none-eabi-gdb            arm-none-eabi-objdump
arm-none-eabi-ar         arm-none-eabi-gcc-11.3.1  arm-none-eabi-gdb-add-index  arm-none-eabi-ranlib
arm-none-eabi-as         arm-none-eabi-gcc-ar      arm-none-eabi-gprof          arm-none-eabi-readelf
arm-none-eabi-c++        arm-none-eabi-gcc-nm      arm-none-eabi-ld             arm-none-eabi-run
arm-none-eabi-c++filt    arm-none-eabi-gcc-ranlib  arm-none-eabi-ld.bfd         arm-none-eabi-size
arm-none-eabi-cpp        arm-none-eabi-gcov        arm-none-eabi-lto-dump       arm-none-eabi-strings
arm-none-eabi-elfedit    arm-none-eabi-gcov-dump   arm-none-eabi-nm             arm-none-eabi-strip
arm-none-eabi-g++        arm-none-eabi-gcov-tool   arm-none-eabi-objcopy
pi@raspberrypi:~ $
 
Can you run "uname -m" to show what the OS architecture is (32 or 64-bit).
"file not found" is a typical error when trying to run a 32-bit app on a 64-bit OS when a 32-bit library dependency is missing.
 
Try running "ldd .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++" and "file .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++".

Here's the output of both on my Linux x86-64 desktop machine.

Code:
    linux-vdso.so.1 (0x00007ffce5ffe000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007450bfc00000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007450bfb17000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007450bfeb6000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007450bf800000)
    /lib64/ld-linux-x86-64.so.2 (0x00007450bff06000)

Code:
.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ef9a7bc77523a1146246e992b669325f087e25d6, stripped
 
Can you run "uname -m" to show what the OS architecture is (32 or 64-bit).
"file not found" is a typical error when trying to run a 32-bit app on a 64-bit OS when a 32-bit library dependency is missing.
@jmarsh
This the output of uname -m:
Code:
aarch64

@PaulStoffregen
ldd:
Code:
pi@raspberrypi:~ $ ldd .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++
    not a dynamic executable
pi@raspberrypi:~ $

file:
Code:
pi@raspberrypi:~ $ file .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++
.arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=a8eccd33e654a98f7572c3e0f1f5525fa41acc7d, for GNU/Linux 3.7.0, stripped
pi@raspberrypi:~ $
 
Ok, more commands to try....

Code:
cd /tmp
rm -rf teensy-compile-* tools/
wget https://www.pjrc.com/teensy/td_158/teensy-compile-11.3.1-linuxaarch64.tar.zst
zstd -d teensy-compile-11.3.1-linuxaarch64.tar.zst
tar -xf teensy-compile-11.3.1-linuxaarch64.tar
ldd tools/arm/bin/arm-none-eabi-g++

This will download the toolchain package and give you the ldd output of its arm-none-eabi-g++ file.

I ran it just now on my Jetson TX2 (the only non-Mac ARM64 hardware I have) and this was the result.

Code:
    linux-vdso.so.1 (0x0000007f986ac000)
    libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f98520000)
    /lib/ld-linux-aarch64.so.1 (0x00000055712f6000)

sc.png
 
One final command, if I run "sha256sum tools/arm/bin/arm-none-eabi-g++", this is the result.

Code:
5fa1b0632ba685933d638bf0b1f4f4566624691cb15d452bca5fbd7c07065dc1  tools/arm/bin/arm-none-eabi-g++

Just as a final check that you really do have the exact same arm-none-eabi-g++ file.

Edit: if you get "not a dynamic executable" from the ldd command and sha256sum confirms you do have the correct file, that's a sure sign something is very messed up with your Linux install. Maybe a 64 bit kernel with 32 bit userland? Or other complicated problems I can't even imagine. On a correct aarch64 system, your ldd command should definitely recognize an aarch64 executable and print something similar to the result from my Jetson TX2 system running Ubuntu 20.04.5.
 
Last edited:
if you get "not a dynamic executable" from the ldd command and sha256sum confirms you do have the correct file, that's a sure sign something is very messed up with your Linux install
Looks like this is the case, will confirm
 
The RPI being used is 64 bit, and the OS installed is the 32 bit version because there are certain programs that need it that way. Would this cause the problem?

if you get "not a dynamic executable" from the ldd command and sha256sum confirms you do have the correct file, that's a sure sign something is very messed up with your Linux install
It's strange that Arduino IDE managed to compile the sketch after doing what I've described in post #1, where I uninstalled and installed the board using the GUI board manager.

Perhaps this similar (cannot find a file that does exist) error that is thrown by the IDE during the upload process is due to the inconsistency between the RPI hardware and the installed OS:
Code:
java.io.IOException: Cannot run program "/home/pi/.arduino15/packages/teensy/tools/teensy-tools/1.59.0/teensy_post_compile": error=2, No such file or directory
but if the compilation process was fixed by reinstalling the board, shouldn't the error during upload also be fixable, where binaries built for 32 bit running on 64 bit hardware are rebuilt?
 
Last edited:
Sorry, I don't know. This is far beyond the level of Linux support I can offer. Maybe the Raspberry Pi forum would be a better place to ask?

If you want to experiment, the only other (probably bad) idea I can offer is you could manually download the 32 bit ARM toolchain and other Teensy packages built for 32 bit ARM. Just open the package index JSON and look for the download URLs. You can manually download and extract them with commands like in msg #17. If your system is able to run those files, maybe you could craft a working setup by replacing the 64 bit files?

But I hope you can understand the Teensyduino packages are only "supported" on correctly functioning systems. If your kernel is aarch64 but your dynamic loader (ldd) can't recognize an aarch64 executable, that's a very broken Linux system. :(
 
Back
Top