Commit Graph

177 Commits

Author SHA1 Message Date
Dan Halbert fb33c4e1c0 -ftree-vrp better diagnostics on -Os builds; -fno-inline-functions for -O2; fix struct init in HCI bleio 2020-12-15 12:23:56 -05:00
Jeff Epler 06f6cd067d nrf: Improve commenting about disabled warnings 2020-08-12 12:59:48 -05:00
Jeff Epler 760a171903 nrf: Make port build with -Werror=undef
.. build-tested on particle_xenon
2020-08-12 07:32:18 -05:00
root ce37a442e8 format fix 2020-07-23 19:35:04 -05:00
root 778e8bfda9 Changes to optimization option 2020-07-23 19:27:02 -05:00
root d83a4ac72d Changes to add compiler optimization option 2020-07-22 12:44:41 -05:00
root 49decf90c9 Add option for higher optimization levels 2020-07-21 10:11:08 -05:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Scott Shawcroft 2fd7a43f2f
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-05-29 10:16:24 -07:00
Scott Shawcroft 796373b8be
A number of small ESP32S2 fixes:
* Fix flash writes that don't end on a sector boundary. Fixes #2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.
2020-05-28 15:43:55 -07:00
Sean Cross 589cb1af6d nrf: watchdog: use nrfx_wdt driver
Instead of directly poking registers, use `nrfx_wdt`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Scott Shawcroft 1ca90572f1
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-30 13:25:31 -07:00
Sean Cross 1d0781bf12 nrf: add simmel board
This adds support for Simmel, an nRF52833-based bluetooth tracking
board designed to aid in pandemic tracing.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-29 11:40:00 +08:00
Scott Shawcroft 755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
Sean Cross 3ed5b87b8f nrf: add support for nrf52833
This adds preliminary support for the nRF52833, which is a variant of
the nRF52840 with half the RAM, half the flash, and fewer peripherals.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 12:29:56 +08:00
Scott Shawcroft 6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Jeff Epler eef742bf45 oofatfs: Remove _FS_DISK_READ_ALIGNED
This workaround is no longer needed, so it can be removed.

Closes: #2332
2020-02-28 10:04:28 -06:00
Wojtek Siudzinski df5e58fc6e Add support for the Particle Ethernet FeatherWing 2020-01-28 10:53:50 +01:00
Dan Halbert 2a75196aa3 merge from adafruit/circuitpython 2020-01-13 18:15:32 -05:00
Dan Halbert 390337b9a5 wip; compiles 2020-01-05 23:33:42 -05:00
hathach 894cad2e17 upgrade nrfx API to v2 2019-12-17 21:39:52 +07:00
Dan Halbert 1e11f2708b remove debugging leftovers 2019-12-11 09:34:56 -05:00
Dan Halbert 68ae47907c merge from upstream 2019-12-10 21:04:46 -05:00
Dan Halbert 013c840862 working on all ports 2019-12-10 20:27:30 -05:00
Jeff Epler a484a93b29 nRF: disk_read must be 4-byte aligned
.. a requirement that oofatfs needs to be taught to respect.

This problem can be demonstrated with the following snippet, except
that the related file ("test.bin") must also be contiguous on the
filesystem.  You can ensure this by reformatting your device's filesystem
before testing, then copying any single file bigger than 4kB to test.bin.

    f = open("test.bin", "rb")
    f.seek(2048)
    b = bytearray(2048)
    v = memoryview(b)
    f.readinto(v[909:])

Closes: #2332
2019-12-10 14:03:06 -06:00
Dan Halbert 40434d6919 wip 2019-12-05 22:45:53 -05:00
jepler e890bc8efe nrf: Makefile: sensible flags for debugging
This enables the highest level of debug symbols, and all optimizations
except lto that do NOT interfere with debugging, in the view of the gcc
maintainers.
2019-09-08 21:07:00 -05:00
Scott Shawcroft 36a23e0fe3
Rework refresh API and factor common display stuff out
NOT TESTED! Just compiles

Fixes #1691
2019-08-22 14:23:27 -07:00
Dan Halbert 44b28d1187 update tinyusb to 00c440cb 2019-08-19 19:42:45 -04:00
Jeff Epler 4bae29b925 nrf: enable link-time optimization
Testing performed: installed freshly built .uf2 on a Particle Xenon.
Checked that circuitpython still starts.
Checked that the size of all .uf2 files for nrf builds are plausible.

Aside from memory savings, the performance of Python code (pystone)
increased by about +14%.

However, this adds about 12-16 seconds to each nrf build.

Timings & Sizes (build system: i5-3320M, -j5 parallelism on 4 threads):

Before:
$ make -j5 BOARD=particle_xenon
765004 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232076 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).
68.54user 11.83system 0:34.34elapsed 234%CPU
pystones before: 570

After:
$ make -j5 BOARD=particle_xenon
804284 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232072 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).
71.06user 11.77system 0:46.91elapsed 176%CPU
pystones after: 650

Timings on travis:

Before:
Build feather_nrf52840_express for pl took 55.79s and succeeded
Build feather_nrf52840_express for zh_Latn_pinyin took 3.18s and succeeded

After:
Build feather_nrf52840_express for pl took 62.72s and succeeded
Build feather_nrf52840_express for zh_Latn_pinyin took 19.10s

Closes: #1396
2019-08-02 20:59:47 -05:00
hathach c921f6637f update tinyusb lib to 0.5.x 2019-07-24 16:46:31 +07:00
Dan Halbert 6ea01ea9b0 Central is connecting; characteristics can be read and written 2019-06-29 00:20:06 -04:00
Dan Halbert a1b5d800f3 Update copyrights; get ready for Central 2019-06-19 10:42:36 -04:00
Dan Halbert 1356819de1 Handle None for BLE name; fix ScanEntry bug; compile issue 2019-06-17 23:16:40 -04:00
Scott Shawcroft 713a38d1a2
Merge pull request #1754 from dmazzella/dmazzella-patch-1
add support for USER_C_MODULES
2019-04-17 09:41:20 -07:00
Nick Moore fd83cf2048 Add a peripherals/nrf/nvm.c to wrap flash page writes safely 2019-04-16 14:53:44 +10:00
Scott Shawcroft 254d0a53ac
Revert "nrf nvm: touchups to nickzoic PR #1768" 2019-04-15 18:50:33 -07:00
Nick Moore cd69db7770 Add a peripherals/nrf/nvm.c to wrap flash page writes safely 2019-04-09 10:55:39 +10:00
Damiano Mazzella 8428fa0f64
Update Makefile 2019-04-05 21:42:29 +02:00
Nick Moore f846fa109e enable NRFX RTC adafruit/circuitpython#1046 2019-04-02 13:27:28 +11:00
Dan Halbert 0653bca323
Revert "Circuitpython nickzoic 1046 nrf rtc" 2019-03-29 16:41:29 -04:00
Nick Moore b09d2c3c62 enable NRFX RTC adafruit/circuitpython#1046 2019-03-28 09:50:09 +11:00
Dan Halbert 7b3f7605b8 address @tannewt changes: move and rename common files; remove PORT_HEAP_SIZE 2019-02-15 20:32:32 -05:00
Dan Halbert a345ef28f2 finish Makefile refactoring; nrf builds work 2019-02-15 18:55:10 -05:00
Dan Halbert 5154e0581e WIP: atmel-samd trinket build works 2019-02-15 00:28:20 -05:00
Scott Shawcroft c17f147be9
A variety of displayio improvements
This changes a number of things in displayio:
* Introduces BuiltinFont and Glyph so the built in font can be used by libraries. For boards with
  a font it is available as board.TERMINAL_FONT. Fixes #1172
* Remove _load_row from Bitmap in favor of bitmap[] access. Index can be x/y tuple or overall index. Fixes #1191
* Add width and height properties to Bitmap.
* Add insert and [] access to Group. Fixes #1518
* Add index param to pop on Group.
* Terminal no longer takes unicode character info. It takes a BuiltinFont instead.
* Fix Terminal's handling of [###D vt100 commands used when up arrowing into repl history.
* Add x and y positions to Group plus scale as well.
* Add bitmap accessor for BuiltinFont
2019-02-11 20:55:05 -08:00
Scott Shawcroft 37b9cd5974
Merge pull request #1521 from nickzoic/circuitpython-nickzoic-1045-nrf-rotaryio
Circuitpython nickzoic 1045 nrf rotaryio
2019-02-07 10:38:20 -08:00
Nick Moore ee21cc163f Start on rotaryio.IncrementalEncoder adafruit/circuitpython#1045 (does nothing yet!) 2019-02-05 14:15:03 +11:00
Scott Shawcroft ec03887040
Fix hallowing and nrf builds 2019-01-31 11:42:15 -08:00
Scott Shawcroft 765d877dfa
Merge pull request #1499 from nickzoic/nickzoic/circuitpython-nrf-touchin-1048
Nickzoic/circuitpython nrf touchin 1048
2019-01-28 00:22:34 -08:00