Marlin HAL
Hardware Abstraction Layer
A Hardware Abstraction Layer allows applications to discover and use the hardware of the host system through a simple, portable and abstract API, regardless of the type of the underlying hardware. (Pennington H., 2003)
Marlin 1.0 was originally derived from Sprinter and GRBL which could only run on 8-bit AVR boards. With the proliferation of new boards based on a variety of processor architectures, for Marlin 2.0 we decided to keep the existing code, but add architecture-specific HALs (AVR, SAM, STM, ESP) as a bridge between Marlin’s high-level code and the low-level functions that control the microcontroller’s pins, ports, timers, etc.
This way all the existing high-level Marlin code can work on any platform without needing to be concerned about the details. Retaining AVR compatibility and a single codebase is important to us, because we want to make sure that features and patches get as much testing and attention as possible, and that all platforms always benefit from the latest improvements.
Current Marlin HALs
AVR (8-bit)
board | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Arduino AVR | ATmega, ATTiny, etc. | 16-20MHz | 64-256k | 2-16k | 5V | no |
DUE
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Arduino Due, RAMPS-FD, etc. | SAM3X8E ARM-Cortex M3 | 84MHz | 512k | 64+32k | 3.3V | no |
ESP32
board | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
ESP32 | Tensilica Xtensa LX6 | 240MHz | — | — | 3.3V | — |
LPC1768 / LPC1769
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Re-ARM | LPC1768 ARM-Cortex M3 | 100MHz | 512k | 32+16+16k | 3.3-5V | no |
MKS SBASE | LPC1768 ARM-Cortex M3 | 100MHz | 512k | 32+16+16k | 3.3-5V | no |
Selena Compact | LPC1768 ARM-Cortex M3 | 100MHz | 512k | 32+16+16k | 3.3-5V | no |
Azteeg X5 GT | LPC1769 ARM-Cortex M3 | 120MHz | 512k | 32+16+16k | 3.3-5V | no |
Smoothieboard | LPC1769 ARM-Cortex M3 | 120MHz | 512k | 64k | 3.3-5V | no |
SAMD51
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Adafruit Grand Central M4 | SAMD51P20A ARM-Cortex M4 | 120MHz | 1M | 256k | 3.3V | yes |
STM32F1
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Arduino STM32 | STM32F1 ARM-Cortex M3 | 72MHz | 256-512k | 48-64k | 3.3V | no |
Geetech GTM32 | STM32F1 ARM-Cortex M3 | 72MHz | 256-512k | 48-64k | 3.3V | no |
STM32F4
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
STEVAL-3DP001V1 | STM32F401VE Arm-Cortex M4 | 84MHz | 512k | 64+32k | 3.3-5V | yes |
Teensy++ 2.0
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Teensy++ 2.0 | AT90USB1286 | 16MHz | 128k | 8k | 5V | no |
Teensy 3.1 / 3.2
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Teensy 3.2 | MK20DX256VLH7 ARM-Cortex M4 | 72MHz | 256k | 32k | 3.3V-5V | yes |
Teensy 3.5 / 3.6
boards | processor | speed | flash | sram | logic | fpu |
---|---|---|---|---|---|---|
Teensy 3.5 | MK64FX512VMD12 ARM-Cortex M4 | 120MHz | 512k | 192k | 3.3-5V | yes |
Teensy 3.6 | MK66FX1M0VMD18 ARM-Cortex M4 | 180MHz | 1M | 256k | 3.3V | yes |