How grblhal/imxrt1062 works
This is an embedded grblHAL hardware driver for Teensy 4.x/i.MXRT1062 CNC controllers. The principal workflow is host commands entering through a serial or network stream, grblHAL interpreting them, and the driver translating motion and spindle control into board-specific signals for the machine. Board maps select pin assignments and capabilities; optional networking, SD-card, and peripheral/plugin features extend the controller. The startup call and selected driver paths are sampled; several feature directories are represented from the README and tree, so their internal wiring is not shown.
Main entry points: driver.c Hardware driver · grbl grblHAL core · uart.c UART streams · usb_serial_pjrc.c USB serial
Components 21
Firmware runtime
- Startup
grblHAL_Teensy4/src/main.c - grblHAL core
grblHAL_Teensy4/src/grbl
Motion hardware
- Hardware driver
grblHAL_Teensy4/src/driver.c - Board maps
grblHAL_Teensy4/src/boards - Spindle control
grblHAL_Teensy4/src/driver.c
Connectivity
- UART streams
grblHAL_Teensy4/src/uart.c - USB serial
grblHAL_Teensy4/src/usb_serial_pjrc.c - Ethernet glue
grblHAL_Teensy4/src/enet.c - Network services
grblHAL_Teensy4/src/networking
Storage and peripherals
- SD-card plugin
grblHAL_Teensy4/src/sdcard - EEPROM support
grblHAL_Teensy4/src/eeprom - I2C keypad
grblHAL_Teensy4/src/keypad - I2C driver
grblHAL_Teensy4/src/i2c.c - Encoder plugin
grblHAL_Teensy4/src/encoder - Digital and analog I/O
grblHAL_Teensy4/src/ioports.c - Littlefs
grblHAL_Teensy4/src/littlefs/lfs.c - Filesystem HAL
grblHAL_Teensy4/src/littlefs_hal.c
Other components
- CNC host
- CNC machine
- Network peer
- SD card
Connections 20
- Startup → grblHAL core: enters
- CNC host → UART streams: sends commands
- CNC host → USB serial: sends commands
- UART streams → grblHAL core: streams input
- USB serial → grblHAL core: streams input
- Network peer → Network services: sends commands
- Network services → Ethernet glue: uses glue
- Ethernet glue → grblHAL core: provides network interface
- grblHAL core → Hardware driver: uses hardware HAL
- Board maps → Hardware driver: defines pin mapping
- Hardware driver → CNC machine: drives motion signals
- Spindle control → CNC machine: controls spindle
- grblHAL core → SD-card plugin: optional file access
- SD-card plugin → SD card: reads and writes
- Hardware driver → EEPROM support: optional settings storage
- Hardware driver → I2C driver: uses bus
- I2C keypad → I2C driver: uses bus
- Hardware driver → Encoder plugin: optional feedback
- Hardware driver → Digital and analog I/O: registers I/O
- Filesystem HAL → Littlefs: adapts filesystem