Many examples require that LED_BUILTIN be defined as a constant, so we
can't use a ternary operator to swap between Pico and PicoW LED pins.
Instead, do the check in the digitalWrite/digitalRead/pinMode calls
to cover most of the uses.
Still need it on the command line in platform.txt for upload/etc., but make the
debug script in lib/picoprobe_cmsis_dap.tcl include the adapter speed setting.
The PWMAudio lib is expecting an int16_t value but the example passes a sample cast to uint16_t
So any values from the lookup table that are negative are recast to 0 i think.
So half the sine wave in the case of the example is lost.
Use GNU LD MAX() to ensure the uninitialized RAM portions are after the
OTA region. For most apps this already happens, so there will be no
overhead added.
The uninitted RAM macro would fail because the OTA code would clear out the
first 50KB or so of RAM to copy its code and global values.
Move all global values to the end of RAM in OTA, and then align any uninitted
vars to a 16KB unit to ensure it won't appear in the 1st part of RAM that is
still needed to copy the OTA executable.
In the normal case, without any uninit_ram vars, no additional space is used.
When uninit_ram is used, up to 16KB of space may be lost to get that alignment,
but it will work properly.
Fixes#1188
The stdin/stdout FILEs have an internal mutex which needs to be initted
to a FreeRTOS one, or any sketch with ::printf will hang. Automatically
create and acquire/release the shadowed mutex.
Requires new build of pico-quick-toolchain to function properly. Tested
on preliminary local build.
Without flushing STDOUT, the upload script's output aften are buffered
and not displayed until it completes. Add in flush commands to allow
the IDE to display status as it changes.
USB changes caused FreeRTOS to not be able to swap tasks when the Serial port
was connected. Clear the "stop PendSV" flag after checking for reset signal.
Stop the IDE from reporting large "Serial port not fount"-type errors after
every upload by delaying a bit before the uploader exits to give the OS/Pico
time to renegotiate.
Fixes flashing problems on certain Linux distros by checking all possible mount
locations instead of only the first one to be found.
Make 1200bps reset tickle more robust
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
The USB VID was always being set to the Raspberry Pi foundation code,
causing other brand boards to show up incorrectly.
Remove redundant values from the boards.txt and define a consistent
USB VID/PID and use it in the setup code.
See #1129 for more info
Fixes#1140
````
Converting to uf2, output size: 134144, start address: 0x2000
ERROR: Unable to execute powershell or wmic commands, can't continue.
ERROR: Please make sure either PowerShell or WMIC is installed and in
your %PATH%.
````
Implement the method used in the ESP8266 Web Server to allow user apps to hook into
the HTTP server (to support hooked WebSockets, etc._)
Add example of hook usage
Instead of listing each board three times (normal upload, picoprobe,
and pico-debug uploads), list each board once and use a menu to select
the actual upload method.
Also add in picotool as an upload method for those folks who have trouble
with automounting.
Fix#1111