-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Description
RT-Thread Version
upstream
Hardware Type/Architectures
riscv
Develop Toolchain
GCC
Describe the bug
Issue: Multiple definition of rt_hw_cpu_shutdown when RT_USING_DM is enabled.
Description:
When the device manager feature is enabled (RT_USING_DM), both rt-thread/libcpu/risc-v/common64/cpuport.c and rt-thread/components/drivers/core/power.c define rt_hw_cpu_shutdown, causing a linker error.
Solution:
Make the rt_hw_cpu_shutdown function in cpuport.c weak using the rt_weak attribute. This allows the power management implementation to override the default cpuport implementation when device manager is enabled.
Other additional context
No response
Copilot
Metadata
Metadata
Assignees
Labels
No labels