c7404a3ff8
This allows calls to `allocate_memory()` while the VM is running, it will then allocate from the GC heap (unless there is a suitable hole among the supervisor allocations), and when the VM exits and the GC heap is freed, the allocation will be moved to the bottom of the former GC heap and transformed into a proper supervisor allocation. Existing movable allocations will also be moved to defragment the supervisor heap and ensure that the next VM run gets as much memory as possible for the GC heap. By itself this breaks terminalio because it violates the assumption that supervisor_display_move_memory() still has access to an undisturbed heap to copy the tilegrid from. It will work in many cases, but if you're unlucky you will get garbled terminal contents after exiting from the vm run that created the display. This will be fixed in the following commit, which is separate to simplify review. |
||
---|---|---|
.. | ||
bluetooth | ||
boards | ||
common-hal | ||
device/nrf52 | ||
examples | ||
freeze | ||
nrfx@3f55e49eb1 | ||
peripherals/nrf | ||
supervisor | ||
.gitignore | ||
background.c | ||
background.h | ||
fatfs_port.c | ||
gccollect.c | ||
ld_defines.c | ||
Makefile | ||
mpconfigport.h | ||
mpconfigport.mk | ||
mphalport.h | ||
nrfx_config.h | ||
nrfx_glue.h | ||
nrfx_log.h | ||
qstrdefsport.h | ||
README.md | ||
sd_mutex.c | ||
sd_mutex.h |
CircuitPython Port To The Nordic Semiconductor nRF52 Series
This is a port of CircuitPython to the Nordic Semiconductor nRF52 series of chips.
Note
: There are board-specific READMEs that may be more up to date than the generic board-neutral documentation below.
Flash
Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying firmware.uf2 to the BOOT drive.
For some boards, you can use the flash
target:
make BOARD=pca10056 flash
Segger Targets
Install the necessary tools to flash and debug using Segger:
note: On Linux it might be required to link SEGGER's libjlinkarm.so
inside nrfjprog's folder.
DFU Targets
run follow command to install adafruit-nrfutil from PyPi
$ pip3 install --user adafruit-nrfutil
make flash and make sd will not work with DFU targets. Hence, dfu-gen and dfu-flash must be used instead.
- dfu-gen: Generates a Firmware zip to be used by the DFU flash application.
- dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file.
When enabled you have different options to test it:
- NUS Console for Linux (recommended)
- WebBluetooth REPL (experimental)