N9H30 FMI NAND controller driver for RTT

N9H30 FMI NAND controller driver for RT-Thread已實作完成,初步測試ok。
因目前整體 FMI NAND controller + YAFFS + rt_mtd_nand HAL,我有打些patch,這些patch未來會更新在核心版本上,Rt-thread studio的核心版本選項只有4.1.0,所以不特別釋出sdk-bsp-nk-n9h30開發包。
(CI會因編譯不過,不能被合入。)

所以,我另開了一個Branch GitHub - wosayttn/sdk-bsp-nk-n9h30 at fminand
透過下載zip,在RT-Thread SDK Manager介面上,選擇安裝離線包的方式,也可使用到rt-thread studio進行開發編譯。

Step1: 下載zip檔案 Download ZIP

Step2: RT-Thread SDK Manager安裝離線包
 

Step3: Create NK-N9H30 demo template project。

Step4: 更新rt_mtd_nand_device 結構,儲存file system context。

You need modify rt_mtd_nand_device structure as below for passing the source building using this v1.0.1.

struct rt_mtd_nand_device
{
    struct rt_device parent;

    rt_uint16_t page_size;          /* The Page size in the flash */
    rt_uint16_t oob_size;           /* Out of bank size */
    rt_uint16_t oob_free;           /* the free area in oob that flash driver not use */
    rt_uint16_t plane_num;          /* the number of plane in the NAND Flash */

    rt_uint32_t pages_per_block;    /* The number of page a block */
    rt_uint16_t block_total;

    /* Only be touched by driver */
    rt_uint32_t block_start;        /* The start of available block*/
    rt_uint32_t block_end;          /* The end of available block */

    /* operations interface */
    const struct rt_mtd_nand_driver_ops *ops;

+    void* priv;
};
+ typedef struct rt_mtd_nand_device* rt_mtd_nand_t;

測試截圖:(測試檔也已附上)
 


版权声明:本文为weixin_41180822原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。