Skip to content

Add SK32F077x (SK32F0xx) HAL port, GENERIC_SK32_F077 board and demos - #451

Closed
dadato wants to merge 2 commits into
ChibiOS:chibios-21.11.xfrom
dadato:sk32f0xx-support
Closed

dadato wants to merge 2 commits into
ChibiOS:chibios-21.11.xfrom
dadato:sk32f0xx-support

Conversation

@dadato

@dadato dadato commented Sep 9, 2026

Copy link
Copy Markdown

Summary

Add support for the SK32F077xB MCU (SK32F0xx family, ARM Cortex-M0, 128KB
flash / 10KB SRAM) to ChibiOS-Contrib.

This is a self-contained, STM32-independent port: it does not reuse any
shared STM32 LLD and ships its own DMA, RCC and ISR handling, matching the
SK32's register layout.

What is included

  • os/hal/ports/SK32/SK32F0xx: full HAL port with native LLDs for
    ADC, EFL (embedded-flash EEPROM emulation), GPT, I2C, PAL, SERIAL, SPI,
    ST, USB, plus the SK32-specific peripherals:
    • KBCU (Keyboard Control Unit): matrix scan + independent LED/RGB
      channels, optional DMA
    • SLED (on-die WS2812-style LED controller): 8/16/32-bit data widths,
      driven over DMA
    • shared DMA (sk32_dma.c) and ISR (sk32_isr.c) support
  • os/common/ext/CMSIS/SK32: CMSIS device headers and system init
  • os/common/startup/ARMCMx: devices/SK32F0xx, startup_SK32F0xx.mk,
    SK32F077xB.ld (2KB flash pages)
  • os/hal/boards/GENERIC_SK32_F077: generic board for the SK32F077xB
  • testhal/SK32: ADC, EEPROM, GPIO, IIC, KBCU, SERIAL, SLED, SPI, TIM
    bring-up projects
  • demos/SK32: GENERIC_SK32_F077 (+ PROBE / SERIAL variants)

Testing

  • All testhal/SK32 and demos/SK32 projects build cleanly with the
    bundled Makefiles.
  • The port is validated on real hardware: the SK32F077xB runs QMK firmware
    (keyboard matrix scanning via KBCU, USB HID, VIA dynamic keymaps backed by
    the EFL driver, SLED-driven RGB) and the USB DFU bootloader.

Notes for reviewers

  • SK32 flash is erased/written in 2KB pages (not 1KB as on similar
    STM32F0 devices) — the EFL LLD and linker script account for this.
  • Only 10KB SRAM; the board/port configuration keeps RAM usage conservative.

Checklist

  • Testhal/demo projects build without warnings/errors
  • Code follows the ChibiOS-Contrib style (GPL headers, os/hal layout)
  • No STM32/shared LLD dependency left in the SK32 port

da_das and others added 2 commits September 9, 2026 23:29
Add support for the SK (SK32F077xB) MCU to ChibiOS-Contrib:

* os/common/ext/CMSIS/SK32: CMSIS device headers and system files
* os/common/startup/ARMCMx/devices/SK32F0xx + GCC ld/mk: startup support
* os/hal/ports/SK32: HAL port with PAL, GPT, I2C, SPI, ST, USB, EFL,
  serial and native KBCU/SLED/DMA drivers (STM32-free implementation)
* os/hal/boards/GENERIC_SK32_F077: generic board for SK32F077xB
* testhal/SK32 and demos/SK32: bring-up test projects
add build logs for multiple SK32 demo and test programs, as well as Eclipse project configuration files and firmware binary files
@dadato dadato closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant