* Add package.json
To make package easily integratable with PlatformIO
* Correct name back to original one
* Format package.json
* Add first shot at builder script
* Add USB stack flags, fix compile flags
* Formatting
* Add more link & USB flags
* Build Boot2 bootloader
* Formatting
* Generate linkerscript, linker fixes
* Fix linkflags, make firmware runnable
* Update USB flags and RAM size
* Correct USB flags, add dynamic sketch partitioning
* Restructure filesystem size and flash size logic into platform code
* Move C++ only flags to CXXFLAGS
* Add PlatformIO documentation
* Link to new platform.io document in the docs TOC
* Fix typos in platformio docs
* Fix one additional typo in platformio.rst
* Update docs
* Remove wrongly commited build folder
Per #276, #277, #274 there seems to be an issue with interrupts and some
other low-level ARM operations when using the distributed libstdc++.
Use the default libstdc++ built with the toolchain, instead.
Fixes#277Fixes#276Fixes#274
* Adds support for Challenger RP2040 WiFi boards
* Added Challenger board to makeboards build script
* Adds new challenger board with LTE modem.
* Updated after getting approved PID from Raspberry Pi
When LittleFS.begin() or SDFS.begin() is called after the filesystem is
already mounted, don't unmount/remount. When an unmount happens, all old
Files become invalid (but the core doesn't know this), so you would end
up with random crashes in FS code.
Now, check for _mounted, and if so just return immediately from begin().
Wire::requestFrom() returns the number of bytes read from the slave. In
the case of error, the slave can end up returning a very large integer
for PICO_GENERIC_ERROR which would then be used as the # of bytes read
causing crashes and errors.
Running TalkingToMyself without connecting the I2C ports would show
this behavior.
Now, when PICO_GENERIC_ERROR is returned, set the read-back buffer len
to 0 explicitly.
When a Python MSI/etc. is installed under Windows, it sets a global
PYTHONHOME and other variables. Our shipped Python can end up using
these variables and attempt to load the wrong PYC files and fail
to run.
Avoid by using -I isolated mode in Python calls
Fixes#252
The PWM HW can only divide 125MHZ sysclk by 1...256. That's only down to
about 500khz. If the max count of the PWM (analogWriteScale) is too low
then the actual PWM period will be much less than desired (and PWM frequency
of course much higher).
For example, at analogWriteFreq(100); analogWriteScale(256); the true
PWM period would be 125M / 256 (pwmdiv) / 256 (scale) = ~2khz.
Conversely, at high frequencies and large scales it is impossible to achieve
the requested frequency and a much lower one would be generated. For
example: freq(60K), scale(32768). PWM period = 125M / 1 (pwmdiv) / 32768 =
~4kHz.
Avoid this by adjusting the analogWrite scale in the core to either increase
the PWM count for low frequencies, or decrease it for high frequencies.
This is done behind the scenes and code is not required to be changed.
The PWM frequency will still not be perfcetly exact due to the divider HW
and clocks involved, but it will be very close across the whole range.
Fixes#234
The Pico SDK has some magic with const pointers that generates lots of
"ignored qualifer" warnings on the more pedantic modes. To clean the
normal builds up, disable this warning for now. At some point a PR to
the PICO-SDK may be indicated.
Fixes#236
Compiler warning flags were completely ignored/missed in platform.txt.
Add them, as normal, and include -Werror=return-type because GCC will
produce crashing apps when a function return value is missing.
* update included tinyusb to 1.2.0
move tusb_config.h from core to library for more portability
* pump tinyusb
* update tinyusb to 1.3.0
* try to fix ci warning
Use the 24-bit SYSTICK peripheral, wrapped in logic to extend it to a
full 32 or 64bits. W/o the wrapper, SYSTICK will wrap around in ~100ms.
Adds rp2040.getCycleCount() and rp2040.getCycleCount64()
Clean up the libpico build process as crt0.S from the pico-sdk should
be directly used.
Clean up the keywords file.
Fixes#222
The HW needs to have the TXC_ABRT flag cleared when a slave transmission is
cut short by the master, or else it will effectively break the I2C bus and
never recover.
The O_CREAT/etc. flags on the Pico are a full 32-bits in size, but the
core was generating a flag for SdFat using an 8-bit type, so all the
O_CREAT, O_TRUNC, O_APPEND, etc. flags got cut off.
Fix the flag size.
Fixes#214
Fixes a hang when reading from the Serial UART ports because before the
core would pause indefinitely for the next character.
Now, wait up to Serial.setTimeout() milliseconds and if it times out
return -1 to the app.
Fixes#210
The PIO programs that generate tone() and Servo() use the TX FIFO to
receive updates to the period/duty cycle.
The original code would push into the FIFO (potentially blocking the
app if the FIFO was full) and generate at least one cycle of every
value written into the control. Basically, the output would
lag the changes by 1 cycle or more (which could be 20ms+ on Servo).
Fix this by clearing any old, ungrabbed values from the FIFO before
sending a new one to the program. Instead of a FIFO, there is
effectively now just a control register and updates will be immediate.
Update the Siren.ino example with delays because now the tone() calls
will not block and run 10x+ faster.
Many functions are defined inside the api/Common.h, so remove them from
the Arduino.h header to have them appear only once.
Fix up the abs() macro to avoid macro problems, add round()