Arduino teensy 4.1 upload issues

Updated: this text in red and other text below was not the real problem, reloaded hex file with teensy loader fixed my issue.

I tried to verify the teensy and this below shows up before and after I upload it. The ethernet port is solid green and will not connect to AOG on windows with a IP after changing the port ip. Any solutions?


In file included from C:\Users\windows10\Downloads\AgOpenGPS_Boards-master\AgOpenGPS_Boards-master\TeensyModules\V4.1\Firmware\Autosteer_gps_teensy_v4_1\Autosteer_gps_teensy_v4_1.ino:126:
In member function ‘void NMEAParser::addHandler(const char*, NMEAParser::NMEAHandler) [with unsigned int S = 2]’,
inlined from ‘void setup()’ at C:\Users\windows10\Downloads\AgOpenGPS_Boards-master\AgOpenGPS_Boards-master\TeensyModules\V4.1\Firmware\Autosteer_gps_teensy_v4_1\Autosteer_gps_teensy_v4_1.ino:239:20:
zNMEAParser.h:340: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 5 bytes from a string of the same length
340 | strncpy(mHandlers[mHandlerCount].mToken, inToken, 5);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function ‘void NMEAParser::addHandler(const char*, NMEAParser::NMEAHandler) [with unsigned int S = 2]’,
inlined from ‘void setup()’ at C:\Users\windows10\Downloads\AgOpenGPS_Boards-master\AgOpenGPS_Boards-master\TeensyModules\V4.1\Firmware\Autosteer_gps_teensy_v4_1\Autosteer_gps_teensy_v4_1.ino:238:20:
zNMEAParser.h:340: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 5 bytes from a string of the same length
340 | strncpy(mHandlers[mHandlerCount].mToken, inToken, 5);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\NativeEthernet\src\NativeEthernetServer.cpp: In member function ‘EthernetClient EthernetServer::available()’:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\NativeEthernet\src\NativeEthernetServer.cpp:119:103: warning: enum constant in boolean context [-Wint-in-bool-context]
119 | if(socket_poll.events_occurred & (FNET_SOCKET_EVENT_OUT || FNET_SOCKET_EVENT_IN)) {
| ^~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\service\llmnr\fnet_llmnr.c:60:30: warning: ‘fnet_llmnr_ip6_multicast_addr’ defined but not used [-Wunused-const-variable=]
60 | static const fnet_ip6_addr_t fnet_llmnr_ip6_multicast_addr = FNET_IP6_ADDR_INIT(0xFF, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0x00, 0x03);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:1062:83: warning: argument 2 of type ‘unsigned char[36]’ with mismatched bound [-Warray-parameter=]
1062 | MBEDTLSFLASHMEM void ssl_calc_verify_tls( mbedtls_ssl_context *ssl, unsigned char hash[36] )
| ^~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:483:73: note: previously declared as ‘unsigned char *’
483 | MBEDTLSFLASHMEM static void ssl_calc_verify_tls( mbedtls_ssl_context *, unsigned char * );
| ^
~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:1090:90: warning: argument 2 of type ‘unsigned char[32]’ with mismatched bound [-Warray-parameter=]
1090 | MBEDTLSFLASHMEM void ssl_calc_verify_tls_sha256( mbedtls_ssl_context *ssl, unsigned char hash[32] )
| ^~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:490:79: note: previously declared as ‘unsigned char *’
490 | MBEDTLSFLASHMEM static void ssl_calc_verify_tls_sha256( mbedtls_ssl_context *,unsigned char * );
| ^
~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:1111:90: warning: argument 2 of type ‘unsigned char[48]’ with mismatched bound [-Warray-parameter=]
1111 | MBEDTLSFLASHMEM void ssl_calc_verify_tls_sha384( mbedtls_ssl_context *ssl, unsigned char hash[48] )
| ^~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:496:80: note: previously declared as ‘unsigned char *’
496 | MBEDTLSFLASHMEM static void ssl_calc_verify_tls_sha384( mbedtls_ssl_context *, unsigned char * );
| ^
~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c: In function ‘ssl_calc_verify_tls_sha384’:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:1120:5: warning: ‘mbedtls_sha512_finish_ret’ accessing 64 bytes in a region of size 48 [-Wstringop-overflow=]
1120 | mbedtls_sha512_finish_ret( &sha512, hash );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:1120:5: note: referencing argument 2 of type ‘unsigned char *’
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\mbedtls/ssl_internal.h:43,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:48:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\mbedtls/sha512.h:128:21: note: in a call to function ‘mbedtls_sha512_finish_ret’
128 | MBEDTLSFLASHMEM int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c: In function ‘ssl_calc_finished_tls_sha384’:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:5376:5: warning: ‘mbedtls_sha512_finish_ret’ accessing 64 bytes in a region of size 48 [-Wstringop-overflow=]
5376 | mbedtls_sha512_finish_ret( &sha512, padbuf );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:5376:5: note: referencing argument 2 of type ‘unsigned char *’
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\mbedtls/ssl_internal.h:43,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\ssl_tls.c:48:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FNET\src\third_party\mbedtls-2.12.0\src\mbedtls/sha512.h:128:21: note: in a call to function ‘mbedtls_sha512_finish_ret’
128 | MBEDTLSFLASHMEM int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Memory Usage on Teensy 4.1:
FLASH: code:243712, data:83428, headers:9212 free for files:7790112
RAM1: variables:42628, code:108728, padding:22344 free for local variables:350588
RAM2: variables:12448 free for malloc/new:511840

The ethernet port should have a green and orange flashing light on it.
Have you tried a different ethernet cable?
Are your ethernet pins in the teensy/pcb definitely making contact?
There should also be an orange light flashing on the teensy when its connected.
Have you set the correct ip address in agio? Step by step guide on the github on how to do this

Yes I followed guide. Set up address in computer and aog. No orange light on teensy, Ethernet pins soldered in and connected checked with ohm meter.

Theres a very recent guide on here on testing each component as you add them to the board.
Pretty sure your teensy should be flashing an orange light so maybe check the power pins that power up the teensy , the guide indicates which pins to test on.
If you remove the teensy and connect your usb cable do it flash orange then?

Teensy is powered up and I noticed as you can see in the pic the light blue lights that are not full brightness. No orange light when removed, only when it was new. After I uploaded the Autosteer_gps_teensy_v4_1.ino code it didnt flash orange again.

Connect the teensy to your computer again and open the serial monitor. See what it spits out.

It is blank white

Flash the teensy again. It should definitely flash orange light when it has a code installed on it

I reflashed it multiple times. I just did again. No orange light.

Red light flashes at the end of uploaded though

Im pretty sure if the red light flashes you have a teensy problem.
Try a complete teensy reset and see if it reverts back to the original blink sketch which was orange light.
Might have to Google the teensy reset procedure or search for it on here
Are you flashing the teensy with it connected to the board?

I did reset just now with instructions below and it will not blink orange for me again after doing reset.
Mine is recognized by Arduino 1.8.19

Posting this for anyone in future:

Teensy Not Recognized by Teensy Loader

A previously working board may seem to be dead, but the problem may simply be code on your Teensy which confuses your PC’s USB port.

  1. Physically disconnect the Teensy.
  2. Reboot your computer (complete power off is best)
  3. Make sure the Teensy Loader application is running.
  4. Hold the reset button down, before plugging in the USB cable.
  5. Plug the USB cable in while continuing to hold the button.
  6. After the cable is fully inserted, release the button.

Of course, verify that your USB port and cable are working properly, perhaps with a different USB device.

On Windows systems, “strange” problems are occasionally reported, where Windows will not detect new devices. It does not seem to be unique to Teensy. Creating a new user account sometimes solves the problem. Plugging the cable into different USB ports can also help. Rebooting is always a good idea. The best approach is to try on a Mac or Linux machine, or a different Windows machine.

I have done both on and off board. I attempted off board first. Then after multiple attempts tried everything I could think of.

Sounds like your teensy could be goosed, there’s been a few posts lately which ended up with a bad teensy.
I goosed one which then flashed red and i couldn’t recover it.

Is this due to AOG board problem or issues isolated to teensy board only you think?

I have 2 teensy’s and both did same thing after uploading Autosteer_gps_teensy_v4_1.ino code

I had a voltage malfunction on mine which is quite common and was glad i goosed the teensy not the f9p.
Mine had red light on afterwards and i couldn’t recover it to hold a sketch.
Have you trird uploading a different sketch from an earlier version just to try. Take the teensy off the board connect to usb and try a different sketch

Try uploading the binaries provided in the GitHub.

Also don’t select the serial teensy port their should be another port listed as just a teensy port.

I

And you use 1.8.19 together with teensyduino 1.57 ?

Mine has 2.61 on 3v pin and 5v on first pin by usb. I hope its not a voltage issue I doubled check all test points before plugging anything in.