usedbytes / picowota

A bootloader for OTA WiFi code upload to a Raspberry Pi Pico W
BSD 3-Clause "New" or "Revised" License
116 stars 21 forks source link

Unable to build #2

Closed ghubcoder closed 2 years ago

ghubcoder commented 2 years ago

Hello, thanks for this!

When following the instructions I get:

picowota/tcp_comm.c:534:28: error: 'MAX_NARG' undeclared (first use in this function)

Have I missed something simple?

Edit: works if you change the lines referenced above to be:

        for (i = 0; i < n_cmds; i++) {
                assert(cmds[i]->nargs <= COMM_MAX_NARG);
                assert(cmds[i]->resp_nargs <= COMM_MAX_NARG);
        }

I also had to modify line 640 in main.c to be a while loop as my Pico fails to connect sometimes........

    while (cyw43_arch_wifi_connect_timeout_ms(wifi_ssid, wifi_pass, CYW43_AUTH_WPA2_AES_PSK, 30000))
    {
        DBG_PRINTF("failed to connect.\n");
        sleep_ms(500);
    }
usedbytes commented 2 years ago

Hey, thanks for the report!

Not sure how I missed that typo, I'll update later

ghubcoder commented 2 years ago

Great thanks, I will close this.

usedbytes commented 2 years ago

It was building OK for me I guess because I wasn't doing debug builds, and so the assert()s weren't getting evaluated. Were you doing a debug build?

Anyway fixed now - thanks for the report.

ghubcoder commented 2 years ago

Yep was a debug build. Thanks for sorting!