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

pico-examples pico_w httpd build fails on Windows -- makefsdata.py is generating invalid variable name

Open ndabas opened this issue 6 months ago • 4 comments

When trying to do a full build of pico-examples on Windows, it fails on the httpd example with:

In file included from C:/Program Files/Raspberry Pi/Pico SDK v2.0.0/pico-sdk/lib/lwip/src/apps/http/fs.c:39:
P:/pico-examples/build/pico_w/wifi/httpd/generated/pico_fsdata.inc:199:36: error: stray '\' in program
  199 | static const unsigned char data_img\rpi_png[] = {
      |                                    ^

So there's a \ in the variable name.

The Python script that's generating this file is assuming UNIX-style path separators.

The fix would be to simply use os.sep instead of "/". Let me know if this sounds reasonable and I can open a PR for it.

ndabas avatar Aug 10 '24 13:08 ndabas