Cleanup host mode some more #2606

Open
opened 2025-07-28 19:32:03 -05:00 by kilograham · 1 comment
kilograham commented 2025-07-28 19:32:03 -05:00 (Migrated from github.com)
  • add obvious missing libraries
  • add ktichen_sink now it generates includes
  • fix compiler warnings
* add obvious missing libraries * add `ktichen_sink` now it generates includes * fix compiler warnings
rhulme commented 2025-12-02 10:38:34 -06:00 (Migrated from github.com)

Are there any clear ideas regarding overall goals and intended changes for host mode? It would be nice to get it to a state where it could be used for unit testing application code.

How to "simulate" hardware is not simple but if the libraries exist with empty implementations and weak linkage, the application code can at least be compiled, and the SDK functions can be easily and individually overwritten by the user where more complicated functionality is required.

There are probably more, but I see at least a couple of architectural issues that would need be addressed:

  • Many enums and/or #defines in src/rp2_common could be moved to src/common to avoid having to redefine them in src/host.
  • How to pull in hardware-specific constants like those defined in hardware_regs/platform_defs.h so that, for example, GPIO code targeting an RP2040 can be checked with NUM_BANK0_GPIOS set to 30, whereas code for an RP2350B has it set to 48?
Are there any clear ideas regarding overall goals and intended changes for host mode? It would be nice to get it to a state where it could be used for unit testing application code. How to "simulate" hardware is not simple but if the libraries exist with empty implementations and weak linkage, the application code can at least be compiled, and the SDK functions can be easily and individually overwritten by the user where more complicated functionality is required. There are probably more, but I see at least a couple of architectural issues that would need be addressed: * Many `enums` and/or `#defines` in `src/rp2_common` could be moved to `src/common` to avoid having to redefine them in `src/host`. * How to pull in hardware-specific constants like those defined in `hardware_regs/platform_defs.h` so that, for example, GPIO code targeting an RP2040 can be checked with NUM_BANK0_GPIOS set to 30, whereas code for an RP2350B has it set to 48?
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2606
No description provided.