pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Cleanup host mode some more

Open kilograham opened this issue 5 months ago • 1 comments

  • add obvious missing libraries
  • add ktichen_sink now it generates includes
  • fix compiler warnings

kilograham avatar Jul 29 '25 00:07 kilograham

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?

rhulme avatar Dec 02 '25 16:12 rhulme