Mbedos support for Teensy4.x?

blazini36

Active member
I've ran across the old thread here but it's over a year since the last reply so I'll leave it dead. Anyhow what I really wanted to do is find a way to use a Teensy 4.1 as the motioncotroller for LinuxCNC. Closest project I found that isn't in danger of dying off is Remora https://github.com/scottalford75/Remora

It's my understanding that the problem using a Teensy 4.x with Remora is that it's based on mbedos and the 4.x is not supported in mbedos. If it doesn't involve copying and pasting I can't program it so porting mbedos to a Teensy isn't something I can do, I do hardware, not code. I'm just curious if there's anyone working on it or is interested in doing so.
 
grblHAL is not comparable to LinuxCNC, they don't work the same way. That said, I did actually post a discussion to grblHAL to see if anyone wanted to port the relevant code to enable some cross compatibility. GrblHAL is pretty much a one man show so that's not gonna happen.

Anyway, back to the original question about mbedOS
 
Anyway, back to the original question about mbedOS...

It's my understanding that the problem using a Teensy 4.x with Remora is that it's based on mbedos and the 4.x is not supported in mbedos.

I'm not sure I'm using all the right terminology, but I think it's unlikely someone will "port" MBED OS to Teensy. From what I can tell, MBED OS goes all the way down to the metal, as opposed to being able to sit on top of the Teensy4 core, like people have done with FreeRTOS and other RTOS. Teensy is Arduino-compatible, and MBED is not. If you want to use LinuxCNC, you have to use a Linux device (possibly R-pi) as the master, so I'm not really sure why you would want to try to use Teensy as the PRU rather than one of the supported MBED boards.
 
I'm not sure I'm using all the right terminology, but I think it's unlikely someone will "port" MBED OS to Teensy. From what I can tell, MBED OS goes all the way down to the metal, as opposed to being able to sit on top of the Teensy4 core, like people have done with FreeRTOS and other RTOS. Teensy is Arduino-compatible, and MBED is not.

Well "port" may not be the right word......like I said I'm not a programmer, "port" is the term used on the MbedOS site. As for the Arduino thing and it being a Teensy rather than just an IMX chip stuck to a piece of fiberglass comes down to some kind of firmware on the board. I can't pretend to know the details of one ARM Cortex chip being compatible with MbedOS and another not, but I suppose that's the point of the thread. I've seen this discussed here before but it died with no conclusion so I figured I'd see if there was some progress made I wasn't aware of.

If you want to use LinuxCNC, you have to use a Linux device (possibly R-pi) as the master, so I'm not really sure why you would want to try to use Teensy as the PRU rather than one of the supported MBED boards.
Well yeah I have built several LinuxCNC machines. Mostly with small x86 PCs and a Mesa FPGA card. I wouldn't refer to the Teensy as the "PRU" since that's a specific processor used mainly in TI MCUs, it's a similar idea to a Beaglbone's PRUs but a better comparison is it replacing the FPGA on a Mesa card. "Why" is simple, it's a 600mhz stick of gum. I make all kinds of custom PCBs with Teensy 4.0s and 4.1s, cuz why not? A 4.1 has 4 hardware encoders that theoretically will run @ 150mhz and I'm sure the step rates are pretty nuts. The fastest Mbed supported board is an ST Nucleo @ 400mhz, it's twice the size and you can't find it anywhere. I can get Teensy's all day. Honestly it's hard to justify an MCU against a Mesa FPGA card period but somehow people do it all the time with these LinuxCNC projects. I find the Teensy's speed and size to be that justification, it's perfect as a base for custom IO boards.

Personally I don't care much about mbedOS, I wouldn't even know what to do with it. I'm just trying to find that missing piece to try to convince someone to support the Teensy 4 in an existing project that won't die in a week. There are a couple of projects that got somewhere with a Teensy 3.x...
https://github.com/SebKuzminsky/linuxcnc-hal-teensy
https://github.com/fdarling/mesa-smartserial-device-template

Someone apparently got pretty far with a 4.1 then just disappeared and didn't share anything..
https://forum.linuxcnc.org/24-hal-components/39813-teensy-4-1-linuxcnc?start=0
 
Remora is a free, opensource LinuxCNC component and Programmable Realtime Unit (PRU) firmware

I was using PRU as in the Remora Github page, above. If the goal is to use the Teensy4 as the PRU, a shorter path might be to figure out what RTOS features (threads, etc.) are used in the existing firmware, choose an RTOS that can sit on top of the existing Teensy4 core and has the necessary features, then implement the SPI interface on the control side and whatever ADC/PWM/GPIO/etc capabilities are required on the machine side.
 
Someone apparently got pretty far with a 4.1 then just disappeared and didn't share anything..
Yes I was watching that, perhaps he caught Covid and did not survive.
 
Back
Top