raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.26k stars 838 forks source link

Make it easier to configure default baud rate #1648

Closed peterharperuk closed 2 weeks ago

peterharperuk commented 4 months ago

To make stdio logging quicker it's probably a good idea to set the default uart speed 921600, but it's only configurable by adding this define to your project. Make it configurable from the cmake command line.

lurch commented 1 month ago

should probably add a PICO_CMAKE_CONFIG so it appears in the docs (or ought to!)

PICO_DEFAULT_UART_BAUD_RATE does already appear on page 482 of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf if that's what you were referring to? Or am I confusing "Appendix B: SDK configuration" with "Appendix C: CMake build configuration" ?

peterharperuk commented 1 month ago

I think you can only set PICO_DEFAULT_UART_BAUD_RATE if you add it to your CMake file. I was suggesting you can set it by adding PICO_DEFAULT_UART_BAUD_RATE=xyz to the CMake command line

peterharperuk commented 3 weeks ago

I've added PICO_CMAKE_CONFIG to the CMakeLists.txt file. As @lurch points out - it's already in the header file