The source code of paper: "Simplifying and Accelerating NOR Flash I/O Stack for RAM-Restricted Microcontrollers". Published on the ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'25), Rotterdam, The Netherlands.
NF2FS is a NOR flash file system that achieves high-performance I/O and long lifespan under extremely RAM restrictions (e.g., 2216 B in our tests), and the source code is in /NF2FS_code.
We deploy NF2FS on Positive Atomic STM32H750 Polaris development board to test its I/O efficiency, and the source code is in /board_environment.
We also construct an emulated NOR flash environment to verify the correctness of NF2FS on PC. Moreover, since the lifespan test is time consuming (even on PC), we accelerate it through storage layout simulation. The source code are in /emulated_environment.
Finally, the design and evaluation details are in the paper /doc/NF2FS.pdf.
1. Clone NF2FS from Github:
git clone https://github.com/HIT-HSSL/NF2FS.git2. Download Keil
Keil uVision5 is available in https://www.keil.com/demo/eval/c51.htm.
3. Open the board environment
Open the file /board_environment/USER/NORENV.uvprojx with Keil uVision5.
4. Configurations
First, click the button Options for Target.
Then, in Device, choose STM32H750XBHx as the target development board.
In Target, set Read/Only and Read/Write Memory Areas to store to be downloaded binary.
In C/C++, choose O0 optimization, One ELF Section per Function, C99 Mode.
In Linker, click the button Use Memory Layout from Target Dialog.
Finally, Click the button OK to save configurations.
5. Build binary
Click the button Rebuild to build the binary.
6. Link development board to PC
We choose Positive Atomic STM32H750 Polaris as the target development board, which uses ST-Link (① in figure) to download binary. Moreover, we use XCOM (② in figure) to receive message from board to PC. Note that ST-Link is a hardware, while XCOM is a software, and they both use USB interface to link with PC.
7. Download binary to development board
Finally, click the button Download, and NF2FS will run on the development board automatically!
To ensure the reproducibility of our experiments, we provide a simple docker environment to run NF2FS on PC. The user can run basic I/O test in the non-docker/docker environment.
1. Clone NF2FS from Github:
git clone https://github.com/HIT-HSSL/NF2FS.git2. Run NF2FS in the emulated environment
2.1 Run NF2FS in the docker environment
First, build the docker image.
docker build . -t nf2fs-artifactThen, run the docker container.
docker run --rm -it nf2fs-artifactInside docker, the code is located in /emulated_environment/normal_test, simply run the following command to test NF2FS.
cd /emulated_environment/normal_test
make test2.2 Run NF2FS in the non-docker environment
cd ./NF2FS/emulated_environment
cd ./normal_test
make test3. Run Lifespan Test
We conduct lifespan test through storage layout simulation, which are stored in /emulated_environment/lifespan_test as jupyter files. The reason is that running lifespan test takes too much time to wear out NOR flash (e.g., 10K P/E cycle), even if in the emulated NOR flash environment.










