pico-sdk
                                
                                
                                
                                    pico-sdk copied to clipboard
                            
                            
                            
                        Script to build all_headers
Inspired by my comment here: https://github.com/raspberrypi/pico-sdk/pull/316/files#r608219018
I dunno how to plumb this into the CMake infrastructure, but hopefully @kilograham can sort out that part :wink: (I wrote it in Python instead of a shell-script, so that it should work on Windows as well)
I used it to (locally) create test/kitchen_sink/all_pico_headers.h and then changed test/kitchen_sink/kitchen_sink.c to just:
#include <stdio.h>
// Include all headers to check for compiler warnings
#include "all_pico_headers.h"
and kitchen_sink builds fine :grin:
I dunno why I had to exclude pico_mem_ops though? If I don't exclude it, the compiler tells me
[ 45%] Building C object test/kitchen_sink/CMakeFiles/kitchen_sink.dir/kitchen_sink.c.obj
In file included from /home/andrew/github/raspberrypi/databooks/pico-sdk/test/kitchen_sink/kitchen_sink.c:9:0:
/home/andrew/github/raspberrypi/databooks/pico-sdk/test/kitchen_sink/all_pico_headers.h:210:26: fatal error: pico/mem_ops.h: No such file or directory
 #include "pico/mem_ops.h"
                          ^
compilation terminated.
which is weird, as https://github.com/raspberrypi/pico-sdk/blob/master/test/kitchen_sink/CMakeLists.txt does seem to be pulling in pico_mem_ops ?
kitchen_sink also still builds cleanly if I change test/kitchen_sink/kitchen_sink.c to do:
#include <stdio.h>
// Include all headers to check for compiler warnings
#include "all_pico_headers.h"
// Include a second time to check that include-guards are working
#include "all_pico_headers.h"
:slightly_smiling_face:
oldest PR, so i thought i'd merge!