Skip to content

CH32V003 / all WCH socs where RCC_PLLMULL is not defined 's build is broken #98110

@VynDragon

Description

@VynDragon

Describe the bug

Recent merges changed how the board RCC is managed.
this causes RCC_PLLMULL to be present in the code despite not being defined for all SOCs, causing a build failure for ch32v003evt and others.
Somehow this was not caught by CI

Regression

  • This is a regression.

Steps to reproduce

west build -p -c ch32v003evt samples/hellow_world

Relevant log output

/home/vdragon/dev/zephyr_upstreaming/zephyr/drivers/clock_control/clock_control_wch_rcc.c: In function 'clock_control_wch_rcc_init':
/home/vdragon/dev/zephyr_upstreaming/zephyr/drivers/clock_control/clock_control_wch_rcc.c:176:32: error: 'RCC_PLLMULL' undeclared (first use in this function)
  176 |                 RCC->CFGR0 &= ~RCC_PLLMULL;
      |                                ^~~~~~~~~~~
/home/vdragon/dev/zephyr_upstreaming/zephyr/drivers/clock_control/clock_control_wch_rcc.c:176:32: note: each undeclared identifier is reported only once for each function it appears in

Impact

Showstopper – Prevents release or major functionality; system unusable.

Environment

latest mainline

Additional Context

fix by adding

#ifndef RCC_PLLMULL
#define RCC_PLLMULL 0xBEEF
#endif

at the top or something better.

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: WinChipHeadWCH

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions