Skip to content

Add SK32F077xB (SK32F0xx) HAL port with GENERIC_SK32_F077 board, testhal and demos - #452

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

Add SK32F077xB (SK32F0xx) HAL port with GENERIC_SK32_F077 board, testhal and demos#452
dadato wants to merge 3 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 (SK32F0xx family, ARM Cortex-M0, 128KB
flash / 10KB SRAM) to ChibiOS-Contrib.

The port is fully native: it does not reuse any shared STM32 low level
driver. Although register-compatible with the STM32F072 for most of the core
(except the USB IP), the SK32 units use the legacy SR/DR register set for
USART/SPI/I2C and carry 3Think-specific peripherals (KBCU, SLED), so every
driver ships its own RCC/clock, DMA and NVIC handling tuned to the vendor
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-only peripherals:
    • KBCU (Keyboard Control Unit): keyboard matrix scan (independent
      mode) and RGB LED column output over DMA1 ch4
    • SLED (on-die WS2812-style serial LED controller): two groups,
      8/16/32-bit data widths, DMA-driven
    • shared native DMA helper sk32_dma.c and ISR aggregation sk32_isr.c
  • os/common/ext/CMSIS/SK32: vendor CMSIS device headers + system init
  • os/common/startup/ARMCMx: devices/SK32F0xx, startup_SK32F0xx.mk,
    SK32F077xB.ld (2KB flash pages)
  • os/hal/boards/GENERIC_SK32_F077: generic board with the SK32 pin/clock
    definitions
  • testhal/SK32: ADC, EEPROM, GPIO, IIC, KBCU, SERIAL, SLED, SPI, TIM
    bring-up projects (all STM32-independent, SK32_* mcuconf naming only)
  • demos/SK32: GENERIC_SK32_F077 LED blinker demo

Testing

  • Every testhal/SK32 project and the demo build cleanly with their bundled
    Makefiles (arm-none-eabi-gcc, no warnings).
  • Validated on real SK32F077xB silicon through QMK firmware: KBCU matrix
    scanning, USB HID + DFU, VIA dynamic keymaps persisted via the EFL driver,
    and SLED-driven RGB output all run on this port.

Notes

  • SK32 flash is erased/written in 2KB pages (unlike the 1KB pages of the
    register-compatible STM32F072); the EFL LLD and linker script account for
    this.
  • Only 10KB SRAM is available; the port and demos keep RAM usage
    conservative.

Checklist

  • All testhal/demos compile cleanly (no warnings/errors)
  • No dependency on shared STM32 LLDs or STM32 mcuconf naming remains
  • Code layout follows ChibiOS-Contrib conventions

da_das and others added 3 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
…conf and drop the redundant PROBE/SERIAL demo copies
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