Help compiling Teensy firmware

I am trying to compile the latest firmware, Autosteer_gps_teensy_v2_5, from the boards repository. The firmware compiles using Arduino IDE 2.1.0 with a few warnings listed below. The firmware is uploaded to the Teensy 4.1. However, it seems the Teensy crashes before the serial monitor port can even open. I can see the USB port appear and disappear in the devices manager like the board keeps rebooting.

The precompiled firmware in the boards repository works fine.

I have compiled and uploaded some simple LED flashing sketches and they function normally. I have commented out the entire setup() and loop() section of the sketch but the compiled firmware still causes the board to reboot. I have installed a completely clean build environment with a fresh download of the firmware source on a laptop. Still the same issue.

I am at a loss on more troubleshooting since the serial monitor port does not connect due to the reboots so I can’t see any error messages.

Thanks!

See topic(if you haven’t already):

1 Like

Thanks for the quick assist! Reverting back to Teensy 1.57.2 of the board manager did the trick. I didn’t think to search for the “disconnecting” symptom.

1 Like

Did the exact same thing to me 1.57 solved it!

What are you putting together??

I just did my panda and had issues by using the ardusimple config for your f9p. Make sure you use the one in the aog boards master repo for your setup.

Yes, definitely using the recommend f9p configs. Also, made sure to save them to the f9p. Forgot that step once and it drove nuts that t wouldn’t work after power down and power up. :wink:

I have a base station set up sending data to RTK2go. In the tractor, I am putting in a Panda board and lightbar. I use a Toughpad in a docking station with a custom mount. The Toughpad acts as an AP tying all the components together over WiFi. I tether my iPhone to the Toughpad via USB for Internet access to the RTK data. Probably will change that to the cellular in the Toughpad. I am planning on using hologram.io as the cell provider. They charge $0.70 per month for the service and $0.08/MB of data. A typical days uses about 600 - 700K of data. This would eliminate one more cable in the cabin.

I created a custom board using a BNO085 IMU, Ardusimple RTK2B-lite GPS and ESP32. That one runs a modified version of MechanicTonys’ Basic-Dual firmware. I added WiFi to the firmware to eliminate the USB cable. I also modified hargres’ UDP lightbar software to add WiFi. Here is a link to my post in the lightbar thread which contains links to the repo’s with the modified code. External Light Bar - #90 by chri5k

I created a stripped down Teensy Panda AIO board with just the BNO085, RTK2B-lite and Teensy. I bought a cheap ethernet to WiFi card and will try hooking it up to the Teensy ethernet. I left space on the board to mount the WiFi card so it will be a single “unit”.

Hi, im also trying to change PWM_Frequency to 1 and I cant compile the sketch.
This is what I get:

C:\Users\User\Desktop\Autosteer_gps_teensy_v2_5\Autosteer_gps_teensy_v2_5.ino: In function ‘void setup()’:
C:\Users\User\Desktop\Autosteer_gps_teensy_v2_5\Autosteer_gps_teensy_v2_5.ino:247:14: error: ‘class HardwareSerial’ has no member named ‘addMemoryForRead’
247 | SerialGPS->addMemoryForRead(GPSrxbuffer, serial_buffer_size);
| ^~~~~~~~~~~~~~~~
C:\Users\User\Desktop\Autosteer_gps_teensy_v2_5\Autosteer_gps_teensy_v2_5.ino:248:14: error: ‘class HardwareSerial’ has no member named ‘addMemoryForWrite’
248 | SerialGPS->addMemoryForWrite(GPStxbuffer, serial_buffer_size);
| ^~~~~~~~~~~~~~~~~
C:\Users\User\Desktop\Autosteer_gps_teensy_v2_5\Autosteer_gps_teensy_v2_5.ino:256:15: error: ‘class HardwareSerial’ has no member named ‘addMemoryForRead’
256 | SerialGPS2->addMemoryForRead(GPS2rxbuffer, serial_buffer_size);
| ^~~~~~~~~~~~~~~~
C:\Users\User\Desktop\Autosteer_gps_teensy_v2_5\Autosteer_gps_teensy_v2_5.ino:257:15: error: ‘class HardwareSerial’ has no member named ‘addMemoryForWrite’
257 | SerialGPS2->addMemoryForWrite(GPS2txbuffer, serial_buffer_size);
| ^~~~~~~~~~~~~~~~~

exit status 1
Compilation error: ‘class HardwareSerial’ has no member named ‘addMemoryForRead’

Looks like you selected the wrong board

1 Like

I checked, 4.1 is selected… is there anything else?
Same happens with connected and disconnected teensy with usb, even tried brand new teensy that still has original led blink sketch on it. I think im missing some files or…?

Fond here, had to rewind 1 version of teensyduino back… now I have another problem, after compiling, teensyloader starts automaticaly and asking me to press a button on the teensy which I did and it apparently flashed the firmware but now teensy is always connecting and disconnecting repeatedly non stop everfy few seconds(I hear usb plug in and unplug sound).

And you did follow the wiki instructions?

2 Likes

Teensyduino 1.58.0 had a bug in it could cause this issue. I think it was fixed in 1.58.1 or 1.57.0 did not have this issue. Or you can apply this fix to the source. Teensy disconnecting? - #10 by CQuick

1 Like

1.57.3 did the job… thanks!