| Age | Commit message (Collapse) | Author |
|
Length was stored as a 16-bit number always. Most translations have
a max length far less. For example, US English translation lengths
always fit in just 8 bits. probably all languages fit in 9 bits.
This also has the side effect of reducing the alignment of
compressed_string_t from 2 bytes to 1.
testing performed: ran in german and english on pyruler, printed messages
looked right.
Firmware size, en_US
Before: 3044 bytes free in flash
After: 3408 bytes free in flash
Firmware size, de_DE (with #2967 merged to restore translations)
Before: 1236 bytes free in flash
After: 1600 bytes free in flash
|
|
|
|
Merge and a few final tweaks
|
|
from tannewt/esp32s2_digitalio
|
|
Various doc examples: Fix the "/ 18" copypasta bug
|
|
|
|
|
|
|
|
mimxrt10xx: add one-directional UART
|
|
Added extract_types.py script
|
|
Correct HiiBot BlueFi USB_PID
|
|
|
|
|
|
|
|
|
|
https://github.com/hierophect/circuitpython into mimxrt-uart-oneway
|
|
|
|
Donated a PID set for HiiBot BlueFi.
|
|
|
|
|
|
mimxrt10xx: Change exception type to match other ports
|
|
Run `make translate` to generate strings for `shared-bindings/watchdog`.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This pulls all common functionality into `shared-bindings` and keeps
platform-specific code inside `nrf`. Additionally, this performs most
validation in the `shared-bindings` site.
The only validation that occurs inside platform-specific `common-hal`
code is related to timeout limits that are platform-specific.
Additionally, all documentation is now inside the `shared-bindings`
directory.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
With this patch, the exception can now be caught:
import microcontroller
import watchdog
import time
wdt = microcontroller.watchdog
wdt.timeout = 5
while True:
wdt.mode = watchdog.WatchDogMode.RAISE
print("Starting loop -- should exit after five seconds")
try:
while True:
time.sleep(10)
# pass # This also works for a spinloop
except watchdog.WatchDogTimeout as e:
print("Watchdog Expired (PASS)")
except Exception as e:
print("Other exception (FAIL)")
print("Exited loop")
This prints:
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Starting loop -- should exit after five seconds
Watchdog Expired (PASS)
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
The previous setting of `1` meant that the bluetooth system couldn't be
used when the watchdog timer was enabled.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This removes some features that are largely unused in order to get the
image to fit.
Recommended in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632859678
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
The watchdog timer has increased the amount of code and text that's
required.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
As part of the reset process, save the current tick count to an
uninitialized memory location. That way, the current tick value will be
preserved across reboots.
A reboot will cause us to lose a certain number of ticks, depending on
how long a reboot takes, however if reboots are infrequent then this
will not be a large amount of time lost.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
For `microcontroller.reset()`, don't manually call NVIC_SystemReset().
Instead, call the `port_reset()` in case the port wants to do any
cleanup.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Make this exception globally available to all platforms that have
enabled the watchdog timer.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This finishes the rework of the exception handler, which is once
again stored inside the watchdog timer module.
This also implements a `watchdog_reset()` that is used to disable the
RAISE watchdog, if one is enabled.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Check to see if the current exception is a Watchdog exception, if it's
enabled. This ensures we break out of the current sleep() if a watchdog
timeout hits.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This reverts commit 561e7e619095869f58fc728d428f3ff20e8bfc40.
|
|
Instead of directly poking registers, use `nrfx_wdt`.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
If the watchdog resets the system and we're plugged into USB, boot into
safe mode.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This mode will be used if the board is reset due to the watchdog
expiring.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This refactors the WatchDogTimer API to use the format proposed in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This adds an exception to be raised when the WatchDogTimer times out.
Note that this currently causes a HardFault, and it's not clear why it's
not behaving properly.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Since these exceptions are unused, don't include them in the output
binary.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This adds a software WatchDogTimer implementation that can be used for
testing.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This also places it under the `microcontroller` object.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This enables WDT support for Simmel. Other platforms cannot yet use
WDT because it overflows their flash storage.
Enable CIRCUITPY_WDT support for the nrf target.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add common-hal bindings to allow the watchdog module to be used
on nrf platforms.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This adds shared bindings for a watchdog timer, based on the API
provided by micropython.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
With the WDT changes, building Circuit Python results in the following error:
/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx LMA [00000000000621c8,00000000000621cf] overlaps section .data LMA [00000000000621c8,0000000000062383]
This is because unwinding data is getting generated, but has nowhere to go.
Re-enable this data in the linker script so it is saved.
Signed-off-by: Sean Cross <sean@xobs.io>
|