This repository contains a modified version of FreeRTOS-HIFI4-DSP adapted for the OpenCentauri project, specifically for the r528 SoC.
- OpenCentauri v0.0.4 or later.
- Serial UART connection at 115200 baud.
- Install the compiler to
tools/xtensa-hifi4-gcc/.
- Compile the firmware:
make
- Copy the compiled firmware to your printer's USB stick:
scp build/dsp.elf carbon:/boot/exUDISK/
- Set a boot delay in uBoot (via SSH on the mainboard):
fw_setenv bootdelay 10
- Add a uBoot command to start the new DSP firmware from the USB stick:
fw_setenv dsp_oc 'usb start;usb dev 0;fatload usb 0:1 43000000 dsp.elf;bootr 43000000 0 0' - Reboot your Centauri, interrupt the boot process when prompted, and enter:
run dsp_oc - To boot into Linux afterward, enter:
run setargs_mmc boot_normal
This method sets the custom DSP firmware as the default, booting from the external USB drive.
- Build
dsp.elfusing the instructions above and copy it to/mnt/exUDISK. - Ensure
/mnt/exUDISKis avfatpartition mounted from/dev/sda1. You can verify with:mount | grep sda1 # Expected output: # /dev/sda1 on /mnt/exUDISK type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)
- Backup your current uBoot settings!
fw_printenv > uboot_backup.txt - Run these commands to change the default boot process:
fw_setenv bootdelay 4 fw_setenv dsp_oc 'usb start;usb dev 0;fatload usb 0:1 43000000 dsp.elf;bootr 43000000 0 0;sleep 2' fw_setenv bootcmd "run setargs_mmc dsp_oc boot_normal"
- Reboot. The device should now boot using
dsp.elffrom the USB drive.
- If the device doesn't boot, you can copy a stock
dsp.elfto the USB drive and reboot. - To restore the default boot from eMMC, run:
fw_setenv bootcmd "run setargs_mmc boot_dsp0 boot_normal"
- Port Klipper MCU firmware to this FreeRTOS environment.
- Enable GPIO drivers if they don't already exist/work (examples in upstream Allwinner sources).
- Establish communication between the DSP and the Linux Processing System, possibly via the MsgBox API.
⚠ NOTE: This is not an official RTOS SDK or Compiler and does NOT support all DSP features.
This is FreeRTOS for the Cadence Tensilica HIFI 4 DSP, using the GCC Compiler.
The Cadence Tensilica HIFI 4 typically uses Xtensa Xplorer and XCC for development. This project uses GCC instead.
- Clone the repository:
git clone https://github.com/YuzukiHD/FreeRTOS-HIFI4-DSP.git
- Download the Compiler and unzip it into the
toolsdirectory. - Run the make command:
make
SyterKit provides a hifi4 loader: https://github.com/YuzukiHD/SyterKit/tree/main/board/100ask-d1-h/load_hifi4
A U-Boot driver is available to load firmware to the HIFI4 DSP: uboot-driver/dsp