Sysprogs forums › Forums › VisualGDB › Hosting Web Apps on Raspberry Pi Pico W with the HTTP Server
- This topic has 4 replies, 2 voices, and was last updated 1 year, 7 months ago by support.
-
AuthorPosts
-
April 21, 2023 at 06:05 #34144richardParticipant
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?
April 21, 2023 at 08:34 #34146supportKeymasterHi,
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.
April 24, 2023 at 04:04 #34153richardParticipantHi,
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”);
#endifs_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
April 24, 2023 at 04:31 #34155richardParticipantJust to add if I press Continue at this point the wifi then works.
April 24, 2023 at 11:17 #34157supportKeymasterHi,
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.
-
AuthorPosts
- You must be logged in to reply to this topic.