Hosting Web Apps on Raspberry Pi Pico W with the HTTP Server

Sysprogs forums Forums VisualGDB Hosting Web Apps on Raspberry Pi Pico W with the HTTP Server

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34144
    richard
    Participant

    I’m running the project ‘Hosting Web Apps on Raspberry Pi Pico W with the HTTP Server’ and everything works just fine.

    However it only works in debug mode and not as a stand alone picoW, or even in Start without debugging mode.  By adding some diagnostic led outputs I can see that the pico itself is running.

    This seems to be a problem with all projects involving the wifi chip.

    I’m sure its something silly on my part, any ideas?

    #34146
    support
    Keymaster

    Hi,

    It worked just fine in our tests, so most likely you are doing something different.

    You can try using the Debug->Attach to Running Embedded Firmware command to attach to it once the problem manifests itself, so that you could see what the device is doing.

    #34153
    richard
    Participant

    Hi,

    I’ve tried that and it works, however I still can’t get the picoW to run in non debug mode. This is the same whether I copy across the uf2 file or run it in Start without debugging mode. As said I added a diagnostic flashing led into the Main loop before the stdio_init_all() and this always flashes whether the pico serves the WEB page or not. So I think that it must be an issue specifically related to the wifi .

    As a possible clue when I use Start emulate I am asked the question:-    Arm semihosting system call detected. Do you want VisualGDB to handle these calls and emulate a base console?

    If I select yes then the project works fine and I can see and use the broadcast web page.

    If I select no then I get the following exception thrown in FastSemihosting.cpp:

    asm volatile(“mov r0, %1; mov r1, %0; bkpt %a2”
    ::”r”(&s_FastSemihostingState), “r”(SysprogsSemihostingReasonBase +
    kInitializeFastSemihosting), “i”(AngelSWI)
    : “r0”, “r1”, “r2”, “r3”, “ip”, “lr”, “memory”, “cc”);
    #endif

    s_FastSemihostingState.ReadOffset = 0;  * Exception Thrown Received a SIGTRAP: trace/breakpoint trap
    s_FastSemihostingState.WriteOffset = 0;

    }

    Could it be that in debug mode the programme is running slower and so avoids a timing issue somewhere?

    Your help would  be appreciated

    #34155
    richard
    Participant

    Just to add if I press Continue at this point the wifi then works.

    #34157
    support
    Keymaster

    Hi,

    Semihosting is a mechanism used by the target to send some data (e.g. printf()-like output) to the debugger.

    Unless you have changed the code in some way, it should not really be triggering. If you are not sure, please try doing a clean checkout of our PicoHTTPServer demo, and build it from scratch (make sure you also re-download and re-patch the Pico SDK). It should work just fine – we have double-checked it with the latest Pico SDK 1.5.0.

    You can also use the Call Stack window in Visual Studio to see why exactly the semihosting gets invoked.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.