← index #6194PR #5472
Likely Duplicate · high · value 0.756
QUERY · ISSUE

nrf: internal flash filesystem/storage not implemented with VFS

openby someusername-123456opened 2020-06-26updated 2020-10-27
port-nrf

I'm having trouble loading the VFS onto my custom board using a nrf52832. The board is not using an SD card and the only connections are UART lines (Rx and Tx) and 2 LEDs.

Within a Virtual Machine on windows I'm running Linux and have completed the following steps:

  • I've altered the UART and LED pins in the micropython/ports/nrf/boards/pca10040/mpconfigboard.h to match my configuration
  • I've set MICROPY_VFS in mpconfigport.h
  • I've compiled using make BOARD=pca10040 MICROPY_VFS_FAT=1, this compiles successfully and generates the following hex
    image

On windows

  • On command line I can run the command "ampy -p COM9 run blink.py" which just blinks the on board LEDs
    However when I run the command
    "ampy -p COM9 ls"
    It just returns with nothing and the command line prompt appears. This leads me to believe that the VFS has not been installed correctly on the nrf chip.

I am able to open a python terminal via PuTTY and when I type the command "os.listdir()" it returns empty
image

Have I missed a step when compiling perhaps?
Any help would be greatly appreciated

CANDIDATE · PULL REQUEST

nrf: Add flash block device for VFS filesystems.

closedby glennrubopened 2019-12-28updated 2021-08-08
port-nrf

Follow up on @aykevl's work on providing a block device for the
nRF device's internal flash.

Updating the pca10056 target to use the block device for
VFS/FATFS.

Enabling MICROPY_PY_ARRAY_SLICE_ASSIGN, MICROPY_PY_SYS_STDFILES
and MICROPY_PY_UBINASCII to work with rshell.

Also updated the flash.c driver and ble_drv.c to support flash
access from the flash block device when SoftDevice is active.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied