Edit online

切换存储类型

3 Mar 2025
Read time: 2 minute(s)

Luban-Lite 编译的固件所占内存较小,一般采用 SPI NOR 进行存储,因此 Luban-Lite 默认采用 SPI NOR 存储方案。本节介绍如何将 Luban-Lite 的默认存储方案切换为 SPI NAND 或 eMMC 存储设备。关于详细的存储配置说明和流程,可查看存储配置

如需切换存储设备,需要清理现有的存储配置,并配置所需存储对应的 BootLoader 和 OS 参数。

清理 SPI NOR 配置

  • 清理 BootLoader 配置
    1. 在 SDK 根目录下执行下列命令之一,进入 BootLoader 的配置界面:
      • bm 命令

      • scons –apply-def=dxxx_xxx-nor_baremetal_bootloaderscons –menuconfig

    2. 清理下列 BootLoader 的配置参数:
      Board options  --->
          [ ] SPI0 Devices: SPINOR  ----
      Drivers options  --->
          Peripheral  --->
              [ ] SPINOR Driver SFUD: Serial Flash Universal Driver  ----
          Drivers examples  --->
                      [ ] Enable MTD driver test command
      Bootloader options  --->
          Commands  --->
              [ ] spinor
              [ ] nor boot
          [*] Upgrading  --->
              [ ]   Write to NOR support
          Drivers  --->
              [ ] SPI NOR boot support
  • 清理 OS 配置
    1. 在 SDK 根目录下执行下列命令之一,进入 OS 的配置界面:
      • me 命令

      • scons –apply-def=dxxx_xxx-nor_rt-thread_helloworldscons –menuconfig

    2. 清理下列 OS 的配置参数:
      Board options  --->
          [ ] SPI0 Devices: SPINOR  ----
      Rt-Thread options  --->
          RT-Thread Components  --->
              [ ] FAL: flash abstraction layer  ----
              Device Drivers  --->
                  [ ] Using MTD Nor Flash device drivers
                  [ ]   Using SFUD(Serial Flash Universal Driver)
      Local packages options  --->
          Third-party packages options  --->
              [ ] Littlefs: A high-integrity embedded file system  ----
      Drivers options  --->
          Peripheral  --->
              [ ] SPINOR Driver SFUD: Serial Flash Universal Driver  ----

配置新存储设备

根据所需切换的存储设备类型,配置对应的 BootLoaderOS 参数。