Skip to content

drivers: ppt: add sync source and configurable log level - #12

Merged
ZhiyuanTang17 merged 5 commits into
rtkconnectivity:hal_realtek_v3.5_v3.7from
darielzhang:pr/ppt-sync-source
Aug 14, 2026
Merged

ZhiyuanTang17 merged 5 commits into
rtkconnectivity:hal_realtek_v3.5_v3.7from
darielzhang:pr/ppt-sync-source

Conversation

@darielzhang

Copy link
Copy Markdown

Add ppt sync source files for rtl87x2g alongside the existing prebuilt libs. Source builds let CONFIG_PPT_DRIVER_LOG_LEVEL take effect at compile time, which is impossible with a .a.

  • Add src/ tree: ppt_driver, ppt_simple, ppt_sync (master+slave)
  • Add libppt_sync_slave.a as prebuilt fallback
  • Add REALTEK_USING_PPT_SYNC_SLAVE Kconfig option
  • Add PPT_DRIVER_LOG_LEVEL Kconfig (0=none..4=dbg, default 0)
  • Use zephyr_library_named(ppt_sync) to keep CMake object paths within Windows MAX_PATH limits
  • Compile master and slave objects unconditionally to satisfy ppt_sync.c references regardless of SYNC_ROLE_*_SUPPORT flags

Add ppt sync source files for rtl87x2g alongside the existing
prebuilt libs. Source builds let CONFIG_PPT_DRIVER_LOG_LEVEL
take effect at compile time, which is impossible with a .a.

- Add src/ tree: ppt_driver, ppt_simple, ppt_sync (master+slave)
- Add libppt_sync_slave.a as prebuilt fallback
- Add REALTEK_USING_PPT_SYNC_SLAVE Kconfig option
- Add PPT_DRIVER_LOG_LEVEL Kconfig (0=none..4=dbg, default 0)
- Use zephyr_library_named(ppt_sync) to keep CMake object
  paths within Windows MAX_PATH limits
- Compile master and slave objects unconditionally to satisfy
  ppt_sync.c references regardless of SYNC_ROLE_*_SUPPORT flags
Replace hardcoded SYNC_ROLE_MASTER_SUPPORT/SLAVE_SUPPORT with
CONFIG_REALTEK_USING_PPT_SYNC_MASTER/SLAVE so role switching
requires only prj.conf changes, not source edits.
Move driver/ out of sync/src/ to ppt/driver/ so it sits at the same
level as sync/, making it accessible to future transports without
going through the sync subtree.

Flatten sync/src/sync/src/ to sync/src/ and remove the duplicate
sync/src/sync/inc/ copies (headers already live in sync/inc/).

Update sync/CMakeLists.txt: introduce PPT_DRV_SRC pointing to
../driver and adjust all source/include paths accordingly.
Platform headers (power_manager_*.h, platform_rtc.h, debug_port.h)
were duplicated under ppt/driver/common/rtl87x2g/. Remove the copies
and update sync/CMakeLists.txt to add rtl8752h/boot/inc to the include
search path so the canonical versions are found at build time.
Move power_manager_slave.h, debug_port.h, and platform_rtc.h into
bee/rtl87x2g/boot/inc/ so they are provided alongside the other
RTL87X2G platform headers already in that directory.

Remove the erroneous rtl8752h/boot/inc include path from
ppt/sync/CMakeLists.txt, which caused CMSIS double-include conflicts
when building for RTL87X2G targets.
@ZhiyuanTang17
ZhiyuanTang17 merged commit 1e5d5c8 into rtkconnectivity:hal_realtek_v3.5_v3.7 Aug 14, 2026
1 of 2 checks passed
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.

3 participants