need help with Teensy libraries using Teensy 4.1 and native ethernet


New member
I've got a dumb question about using teensy libraries. I'm a fairly experienced embedded developer, but new to Arduinio and Teensy. My project is to use a Teensy 4.1 to receive some low bandwidth incoming UDP/IP data packets and convert to some other types of I/O. I've got Arduino 1.8.19 and Teensyduino 1.56 installed on a Windows 10 computer.

I want to use the NativeEthernet libraries and I've read the messages at and some other posts

I ran the UDPSendReceiveString example that came with Teensyduino and it worked just fine where it was directly connected to another computer without a hub/router using static IPs and I used the windows program PacketSender to exercise it from the other networked computer. I was running the example and had to change the IP address and then couldn't save changes because of where it was installed under c:/Program Files (x86)/Arduino/hardware/teensy/avr/libraries/NativeEthernet/......

I would like to take the UDPSendReceiveString project and copy it over to my sketch folder at ../Documents/Arduino/Projects/EthernetProject01/EthernetProject01.ino and add to that for my new project.

However when I build it from there, it can no longer find the native ethernet or fnet libraries. Apparently the teensy libraries are installed in a different path than the regular Arduino libraries. I go to the library manager and try to install them, but there are not there. So I copied the NativeEthernet and FNET libraries from where they got installed over to my sketch folder at ../Documents/Arduino/libraries/NativeEthernet and ../Documents/Arduino/libraries/FNET.

When I try to compile my newly named UDPSendReceiveString sketch it can apparently now build in the NativeEthernet and FNET libraries, but I'm still getting a bunch of type related errors like this:
C:\Users\Majors\Documents\Arduino\libraries\NativeEthernet\src/NativeEthernet.h:80:12: error: 'DMAMEM' does not name a type; did you mean 'EEMEM'?
static DMAMEM uint8_t** socket_buf_transmit;

Which makes me think there are still more libraries over there in the installed folder structure that I would have to copy over to my sketch folder structure.

So here's the big question....... how do you start your own sketch based on a Teensy example, using Teensy libraries ? How do you tell Arduino how to find the Teensy libraries where are originally located when installed so you don't have play trial and error ?

Thanks for any help. I'm sure this has an easy answer, I just haven't come across it yet and need a nudge in the right direction.

So replying to my own thread here, as it may help somebody else. In the situation I describe above, I double-clicked on my new project's .ino file to open it. I hit the Checkmark icon to build it, and it failed as described above. Then I realized that the Arduinio IDE appeared to have lost any awareness of the Teensyduino installation. The Tools/Board was set back to Arduino Uno instead of Teensy 4.1 and Help/About was no longer showing Teensyduino.

I closed that, and then opened Arduino from its desktop icon and it did have Teensyduino installed. I did a File/Open, went over to my new project which was just a renamed UdpSendReceiveString copied into my sketch folder from the Teensy examples, and it verified ok. I still have NativeEthernet and FNET libraries copied over to my sketch folder under ../Documents/Arduino/libraries.

If I remove the NativeEthernet and FNET libraries from my sketch folder, now it still compiles, so apparently it can find the Teensyduino libraries in their installed locations.

Why does the Arduino IDE not have any knowledge of Teensyduino when doubleclicking on the .ino file in my sketch folder that I copied over ?
Why does the Arduino IDE not have any knowledge of Teensyduino when doubleclicking on the .ino file in my sketch folder that I copied over ?

Double-check to make sure that you don't have Arduino installed in two different locations. From what you describe, it sounds like you do, & the one with TeensyDuino knowledge is the one that runs when you activate the desktop icon, while the one without TD knowledge is set as the "default application" that runs when you double-click on an INO file.

Just a guess for you to check . . .

Hope that helps . . .

Mark J Culross
Mark you are spot on my friend, thank you. When I right click on an .ino file and choose Open With, there are two choices for Arduino. One of them opens a round icon Arduino which is the one installed at c:\program files (x86)\Arduino. The other one opens a square icon Arduino which is installed at C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt. That second one when open has on the title bar "1.8.19 Windows Store" and doesn't have Teensy installed. So apparently I installed one from the store too, although not sure how. I also now remember seeing something in the forum about the windows store version not being supported (by Teensy ?). Anyway, that solves the mystery. Hope it helps others too. Thank you !