← index #5163Issue #6194
Related · high · value 0.380
QUERY · ISSUE

[nRF port] Unable to Activate the FAT File System

openby sebi5361opened 2019-09-30updated 2019-12-06
port-nrf

I noticed that FAT file system couldn't be enabled on a nRF board as open("code.py", "wb") would fail making it impossible to create files onto the board.

Indeed, after building and flashing the firmware with the FAT file system enabled
(#define MICROPY_VFS (1) in mpconfigport.h and make SD=s132 MICROPY_FATFS=1 sd) the following error occurs:

>>> open("code.py", "wb")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 1] EPERM
CANDIDATE · 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

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