Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread一般讨论
[求助]关于nand flash 驱动的问题
发布于 2013-03-14 15:31:12 浏览:4017
订阅该版
本人在做rt-thread的nand flash驱动的时候遇到了问题。我用的flash芯片是K9f1g08,在关于mtd, nand flash driver和文件系统的问题上很疑惑,参考realtouch上的nand flash驱动完成驱动后,编译没有问题,可是文件系统初始化的时候就出现了错误。追查代码也没有查到具体的问题在哪。希望做为这部分的同道帮个忙。
查看更多
8
个回答
默认排序
按发布时间排序
prife
2013-03-14
这家伙很懒,什么也没写!
把错误信息具体说说,你说的太笼统了。
ericwong
2013-03-15
这家伙很懒,什么也没写!
搭车求K9f1g08的驱动 网上找到一个k9f2g08u0b.c的文件,但是编译总是出问题 ``` /* * File : k9f2g08u0b.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2009 RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rt-thread.org/license/LICENSE * * Change Logs: * Date Author Notes * 2012-11-24 heyuanjie87 first implementation * 2013-02-28 heyuanjie87 use dma transfer */ #include
#include "board.h" #include "k9f2g08u0b.h" #define NAND_DEBUG rt_kprintf //#define NAND_DEBUG(...) #define DMA_CHANNEL DMA_Channel_0 #define DMA_STREAM DMA2_Stream0 #define DMA_TCIF DMA_FLAG_TCIF0 #define DMA_IRQN DMA2_Stream0_IRQn #define DMA_IRQ_HANDLER DMA2_Stream0_IRQHandler #define DMA_CLK RCC_AHB1Periph_DMA2 #define NAND_BANK ((rt_uint32_t)0x80000000) static struct stm32f4_nand _device; #define ECC_SIZE 4 rt_inline void nand_cmd(rt_uint8_t cmd) { /* write to CMD area */ *(volatile rt_uint8_t*)(NAND_BANK | CMD_AREA) = cmd; } rt_inline void nand_addr(rt_uint8_t addr) { /* write to address area */ *(volatile rt_uint8_t*)(NAND_BANK | ADDR_AREA) = addr; } rt_inline rt_uint8_t nand_read8(void) { /* read 1Byte */ return (*(volatile rt_uint8_t*)(NAND_BANK | DATA_AREA)); } rt_inline void nand_write8(rt_uint8_t data) { /* write 1Byte */ *(volatile rt_uint8_t*)(NAND_BANK | DATA_AREA) = data; } rt_inline void nand_waitready(void) { while (GPIO_ReadInputDataBit(GPIOG, GPIO_Pin_6) == 0); } static rt_uint8_t nand_readstatus(void) { nand_cmd(NAND_CMD_STATUS); return (nand_read8()); } static void dmaRead(rt_uint8_t *dst, rt_size_t size) { DMA_InitTypeDef DMA_InitStructure; DMA_InitStructure.DMA_Channel = DMA_CHANNEL; DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)(NAND_BANK | DATA_AREA); DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)dst; DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToMemory; DMA_InitStructure.DMA_BufferSize = size; /* assert_param(0~64K) */ DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable; DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte; DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte; DMA_InitStructure.DMA_Mode = DMA_Mode_Normal; DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh; DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable; DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full; DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single; DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; DMA_Init(DMA_STREAM, &DMA_InitStructure); DMA_ITConfig(DMA_STREAM, DMA_IT_TC, ENABLE); DMA_ClearFlag(DMA_STREAM, DMA_TCIF); rt_completion_init(&_device.comp); DMA_Cmd(DMA_STREAM, ENABLE); if (rt_completion_wait(&_device.comp, 100) != RT_EOK) { NAND_DEBUG("nand read timeout "); } } static void dmaWrite(const rt_uint8_t *src, rt_size_t size) { DMA_InitTypeDef DMA_InitStructure; DMA_InitStructure.DMA_Channel = DMA_CHANNEL; DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)src; DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)(NAND_BANK | DATA_AREA); DMA_InitStructure.DMA_DIR = DMA_DIR_MemoryToMemory; DMA_InitStructure.DMA_BufferSize = size; /* assert_param(0~64K) */ DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Enable; DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable; DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte; DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte; DMA_InitStructure.DMA_Mode = DMA_Mode_Normal; DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh; DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable; DMA_InitStructure.DMA_FIFOThreshold = DMA_FIFOThreshold_Full; DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single; DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; DMA_Init(DMA_STREAM, &DMA_InitStructure); DMA_ITConfig(DMA_STREAM, DMA_IT_TC, ENABLE); DMA_ClearFlag(DMA_STREAM, DMA_TCIF); rt_completion_init(&_device.comp); DMA_Cmd(DMA_STREAM, ENABLE); if (rt_completion_wait(&_device.comp, 100) != RT_EOK) { NAND_DEBUG("nand write timeout "); } } void DMA_IRQ_HANDLER(void) { DMA_ClearFlag(DMA_STREAM, DMA_TCIF); rt_completion_done(&_device.comp); } static rt_err_t nand_datacorrect(uint32_t generatedEcc, uint32_t readEcc, uint8_t *data) { #define ECC_MASK28 0x0FFFFFFF /* 28 valid ECC parity bits. */ #define ECC_MASK 0x05555555 /* 14 ECC parity bits. */ rt_uint32_t count, bitNum, byteAddr; rt_uint32_t mask; rt_uint32_t syndrome; rt_uint32_t eccP; /* 14 even ECC parity bits. */ rt_uint32_t eccPn; /* 14 odd ECC parity bits. */ syndrome = (generatedEcc ^ readEcc) & ECC_MASK28; if (syndrome == 0) return (RT_MTD_EOK); /* No errors in data. */ eccPn = syndrome & ECC_MASK; /* Get 14 odd parity bits. */ eccP = (syndrome >> 1) & ECC_MASK; /* Get 14 even parity bits. */ if ((eccPn ^ eccP) == ECC_MASK) /* 1-bit correctable error ? */ { bitNum = (eccP & 0x01) | ((eccP >> 1) & 0x02) | ((eccP >> 2) & 0x04); NAND_DEBUG("ECC bit %d ",bitNum); byteAddr = ((eccP >> 6) & 0x001) | ((eccP >> 7) & 0x002) | ((eccP >> 8) & 0x004) | ((eccP >> 9) & 0x008) | ((eccP >> 10) & 0x010) | ((eccP >> 11) & 0x020) | ((eccP >> 12) & 0x040) | ((eccP >> 13) & 0x080) | ((eccP >> 14) & 0x100) | ((eccP >> 15) & 0x200) | ((eccP >> 16) & 0x400) ; data[ byteAddr ] ^= 1 << bitNum; return RT_MTD_EOK; } /* Count number of one's in the syndrome. */ count = 0; mask = 0x00800000; while (mask) { if (syndrome & mask) count++; mask >>= 1; } if (count == 1) /* Error in the ECC itself. */ return RT_MTD_EECC; return -RT_MTD_EECC; /* Unable to correct data. */ #undef ECC_MASK #undef ECC_MASK24 } static void gpio_nandflash_init(void) { GPIO_InitTypeDef GPIO_InitStructure; RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE); /* FSMC GPIO config in board.c */ /* NAND_R/B: PG6 */ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6; GPIO_Init(GPIOG, &GPIO_InitStructure); } static void fsmc_nandflash_init(void) { FSMC_NANDInitTypeDef FSMC_NANDInitStructure; FSMC_NAND_PCCARDTimingInitTypeDef p; RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE); p.FSMC_SetupTime = 0x1; p.FSMC_WaitSetupTime = 0x3; p.FSMC_HoldSetupTime = 0x2; p.FSMC_HiZSetupTime = 0x1; FSMC_NANDInitStructure.FSMC_Bank = FSMC_Bank3_NAND; FSMC_NANDInitStructure.FSMC_Waitfeature = FSMC_Waitfeature_Disable; FSMC_NANDInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_8b; FSMC_NANDInitStructure.FSMC_ECC = FSMC_ECC_Disable;/* ??????????ECC???? */ FSMC_NANDInitStructure.FSMC_ECCPageSize = FSMC_ECCPageSize_2048Bytes; FSMC_NANDInitStructure.FSMC_TCLRSetupTime = 0x00; FSMC_NANDInitStructure.FSMC_TARSetupTime = 0x00; FSMC_NANDInitStructure.FSMC_CommonSpaceTimingStruct = &p; FSMC_NANDInitStructure.FSMC_AttributeSpaceTimingStruct = &p; FSMC_NANDInit(&FSMC_NANDInitStructure); /* FSMC NAND Bank Cmd Test */ FSMC_NANDCmd(FSMC_Bank3_NAND, ENABLE); } static rt_err_t nandflash_readid(struct rt_mtd_nand_device *mtd) { nand_cmd(NAND_CMD_READID); nand_addr(0); _device.id[0] = nand_read8(); _device.id[1] = nand_read8(); _device.id[2] = nand_read8(); _device.id[3] = nand_read8(); NAND_DEBUG("ID[%X,%X] ",_device.id[0], _device.id[1]); if (_device.id[0] == 0xEC && _device.id[1] == 0xDA) { return (RT_EOK); } return (RT_ERROR); } static rt_err_t nandflash_readpage(struct rt_mtd_nand_device* device, rt_off_t page, rt_uint8_t *data, rt_uint32_t data_len, rt_uint8_t *spare, rt_uint32_t spare_len) { rt_uint32_t index; rt_uint32_t gecc, recc; rt_uint8_t tmp[4]; rt_err_t result; page = page + device->block_start * device->pages_per_block; if (page/device->pages_per_block > device->block_end) { return -RT_MTD_EIO; } result = RT_MTD_EOK; rt_mutex_take(&_device.lock, RT_WAITING_FOREVER); if (data && data_len) { nand_cmd(NAND_CMD_READ_1); nand_addr(0); nand_addr(0); nand_addr(page); nand_addr(page >> 8); nand_addr(page >> 16); nand_cmd(NAND_CMD_READ_TRUE); nand_waitready(); FSMC_NANDECCCmd(FSMC_Bank3_NAND,ENABLE); dmaRead(data, data_len); gecc = FSMC_GetECC(FSMC_Bank3_NAND); FSMC_NANDECCCmd(FSMC_Bank3_NAND,DISABLE); if (data_len == PAGE_DATA_SIZE) { for (index = 0; index < ECC_SIZE; index ++) tmp[index] = nand_read8(); if (spare && spare_len) { dmaRead(&spare[ECC_SIZE], spare_len - ECC_SIZE); rt_memcpy(spare, tmp , ECC_SIZE); } recc = (tmp[3] << 24) | (tmp[2] << 16) | (tmp[1] << 8) | tmp[0]; if (recc != 0xFFFFFFFF && gecc != 0) result = nand_datacorrect(gecc, recc, data); if (result != RT_MTD_EOK) NAND_DEBUG("page: %d, gecc %X, recc %X>",page, gecc, recc); goto _exit; } } if (spare && spare_len) { nand_cmd(NAND_CMD_READ_1); nand_addr(0); nand_addr(8); nand_addr(page); nand_addr(page >> 8); nand_addr(page >> 16); nand_cmd(NAND_CMD_READ_TRUE); nand_waitready(); dmaRead(spare, spare_len); } _exit: rt_mutex_release(&_device.lock); return (result); } static rt_err_t nandflash_writepage(struct rt_mtd_nand_device* device, rt_off_t page, const rt_uint8_t *data, rt_uint32_t data_len, const rt_uint8_t *spare, rt_uint32_t spare_len) { rt_err_t result; rt_uint32_t gecc; page = page + device->block_start * device->pages_per_block; if (page/device->pages_per_block > device->block_end) { return -RT_MTD_EIO; } result = RT_MTD_EOK; rt_mutex_take(&_device.lock, RT_WAITING_FOREVER); if (data && data_len) { nand_cmd(NAND_CMD_PAGEPROGRAM); nand_addr(0); nand_addr(0); nand_addr(page); nand_addr(page >> 8); nand_addr(page >> 16); FSMC_NANDECCCmd(FSMC_Bank3_NAND,ENABLE); dmaWrite(data, data_len); gecc = FSMC_GetECC(FSMC_Bank3_NAND); FSMC_NANDECCCmd(FSMC_Bank3_NAND,DISABLE); if (data_len == PAGE_DATA_SIZE) { nand_write8((uint8_t)gecc); nand_write8((uint8_t)(gecc >> 8)); nand_write8((uint8_t)(gecc >> 16)); nand_write8((uint8_t)(gecc >> 24)); if (spare && spare_len) dmaWrite(&spare[ECC_SIZE], spare_len - ECC_SIZE); } nand_cmd(NAND_CMD_PAGEPROGRAM_TRUE); nand_waitready(); if (nand_readstatus() & 0x01 == 1) result = -RT_MTD_EIO; goto _exit; } if (spare && spare_len) { nand_cmd(NAND_CMD_PAGEPROGRAM); nand_addr(ECC_SIZE); nand_addr(0x08); nand_addr(page); nand_addr(page >> 8); nand_addr(page >> 16); dmaWrite(&spare[ECC_SIZE], spare_len - ECC_SIZE); nand_cmd(NAND_CMD_PAGEPROGRAM_TRUE); nand_waitready(); if (nand_readstatus() & 0x01 == 1) result = -RT_MTD_EIO; } _exit: rt_mutex_release(&_device.lock); return (result); } rt_err_t nandflash_eraseblock(struct rt_mtd_nand_device* device, rt_uint32_t block) { rt_uint32_t page; rt_err_t result; block = block + device->block_start; result = RT_MTD_EOK; page = block * 64; rt_mutex_take(&_device.lock, RT_WAITING_FOREVER); nand_cmd(NAND_CMD_ERASE0); nand_addr(page); nand_addr(page >> 8); nand_addr(page >> 16); nand_cmd(NAND_CMD_ERASE1); nand_waitready(); if (nand_readstatus() & 0x01 == 1) result = -RT_MTD_EIO; rt_mutex_release(&_device.lock); return (result); } static rt_err_t nandflash_pagecopy(struct rt_mtd_nand_device *device, rt_off_t src_page, rt_off_t dst_page) { rt_err_t result; src_page = src_page + device->block_start * device->pages_per_block; dst_page = dst_page + device->block_start * device->pages_per_block; result = RT_MTD_EOK; rt_mutex_take(&_device.lock, RT_WAITING_FOREVER); nand_cmd(NAND_CMD_RDCOPYBACK); nand_addr(0); nand_addr(0); nand_addr(src_page); nand_addr(src_page >> 8); nand_addr(src_page >> 16); nand_cmd(NAND_CMD_RDCOPYBACK_TRUE); nand_waitready(); nand_cmd(NAND_CMD_COPYBACKPGM); nand_addr(0); nand_addr(0); nand_addr(dst_page); nand_addr(dst_page >> 8); nand_addr(dst_page >> 16); nand_cmd(NAND_CMD_COPYBACKPGM_TRUE); nand_waitready(); if ((nand_readstatus() & 0x01) == 0x01) result = -RT_MTD_EIO; rt_mutex_release(&_device.lock); return (result); } static rt_err_t nandflash_checkblock(struct rt_mtd_nand_device* device, rt_uint32_t block) { return (RT_MTD_EOK); } static rt_err_t nandflash_markbad(struct rt_mtd_nand_device* device, rt_uint32_t block) { return (RT_MTD_EOK); } static struct rt_mtd_nand_driver_ops ops = { nandflash_readid, nandflash_readpage, nandflash_writepage, nandflash_pagecopy, nandflash_eraseblock, #if defined(RT_USING_DFS_UFFS) && !defined(RT_UFFS_USE_CHECK_MARK_FUNCITON) RT_NULL, RT_NULL, #else nandflash_checkblock, nandflash_markbad #endif }; static struct rt_mtd_nand_device _partition[2]; void rt_hw_mtd_nand_init(void) { NVIC_InitTypeDef NVIC_InitStructure; NVIC_InitStructure.NVIC_IRQChannel = DMA_IRQN; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; gpio_nandflash_init(); fsmc_nandflash_init(); RCC_AHB1PeriphClockCmd(DMA_CLK, ENABLE); NVIC_Init(&NVIC_InitStructure); rt_mutex_init(&_device.lock, "nand", RT_IPC_FLAG_FIFO); _partition[0].page_size = 2048; _partition[0].pages_per_block = 64; _partition[0].block_total = 256; _partition[0].oob_size = 64; _partition[0].oob_free = 60; _partition[0].block_start = 0; _partition[0].block_end = 255; _partition[0].ops = &ops; rt_mtd_nand_register_device("nand0", &_partition[0]); _partition[1].page_size = NAND_PAGE_SIZE; _partition[1].pages_per_block = 64; _partition[1].block_total = 2048 - _partition[0].block_total; _partition[1].oob_size = 64; _partition[1].oob_free = 60; _partition[1].block_start = _partition[0].block_end + 1; _partition[1].block_end = 2047; _partition[1].ops = &ops; rt_mtd_nand_register_device("nand1", &_partition[1]); } #include
void nread(rt_uint32_t partion, rt_uint32_t page) { int i; rt_uint8_t spare[64]; rt_uint8_t *data_ptr; struct rt_mtd_nand_device *device; if (partion >= 3) return; device = &_partition[partion]; data_ptr = (rt_uint8_t*) rt_malloc(PAGE_DATA_SIZE); if (data_ptr == RT_NULL) { rt_kprintf("no memory "); return; } rt_memset(spare, 0, sizeof(spare)); rt_memset(data_ptr, 0, PAGE_DATA_SIZE); nandflash_readpage(device, page, data_ptr, PAGE_DATA_SIZE, spare, sizeof(spare)); for (i = 0; i < 512; i ++) { rt_kprintf("0x%X,",data_ptr[i]); } rt_kprintf(" spare "); for (i = 0; i < sizeof(spare); i ++) { rt_kprintf("0x%X,",spare[i]); } rt_kprintf(" "); /* release memory */ rt_free(data_ptr); } void nwrite(rt_uint32_t partion, int page) { int i; rt_uint8_t spare[64]; rt_uint8_t *data_ptr; struct rt_mtd_nand_device *device; if (partion >= 3) return; device = &_partition[partion]; data_ptr = (rt_uint8_t*) rt_malloc (PAGE_DATA_SIZE); if (data_ptr == RT_NULL) { rt_kprintf("no memory. "); return; } /* Need random data to test ECC */ for (i = 0; i < PAGE_DATA_SIZE; i ++) data_ptr[i] = i/5 -i; rt_memset(spare, 0xdd, sizeof(spare)); nandflash_writepage(device, page, data_ptr, PAGE_DATA_SIZE, spare, sizeof(spare)); rt_free(data_ptr); } void ncopy(rt_uint32_t partion, int src, int dst) { struct rt_mtd_nand_device *device; if (partion >= 3) return; device = &_partition[partion]; nandflash_pagecopy(device, src, dst); } void nerase(int partion, int block) { struct rt_mtd_nand_device *device; if (partion >= 3) return; device = &_partition[partion]; nandflash_eraseblock(device, block); } void nerase_all(rt_uint32_t partion) { rt_uint32_t index; struct rt_mtd_nand_device *device; if (partion >= 3) return; device = &_partition[partion]; for (index = 0; index < device->block_total; index ++) { nandflash_eraseblock(device, index); } } void nid(void) { nandflash_readid(0); } FINSH_FUNCTION_EXPORT(nid, nand id); FINSH_FUNCTION_EXPORT(ncopy, nand copy page); FINSH_FUNCTION_EXPORT(nerase, nand erase a block of one partiton); FINSH_FUNCTION_EXPORT(nerase_all, erase all blocks of a partition); FINSH_FUNCTION_EXPORT(nwrite, nand write page); FINSH_FUNCTION_EXPORT(nread, nand read page); ```
prife
2013-03-15
这家伙很懒,什么也没写!
用这个版本 [https://github.com/RT-Thread/realtouch-stm32f4/blob/7e4e2ccb69aaca08d7dddfa107e16c8dc28911cb/software/examples/drivers/k9f2g08u0b.c](https://github.com/RT-Thread/realtouch- ... f2g08u0b.c) 配合上面这个例子。 [https://github.com/RT-Thread/realtouch-stm32f4/tree/master/software/examples/examples/2_filesystem_nandflash](https://github.com/RT-Thread/realtouch- ... _nandflash)
ericwong
2013-03-15
这家伙很懒,什么也没写!
我刚才贴出的代码用的确实就是你给的链接下载的,注意到有做细微的调整,但是编译仍然通不过 k9f2g08u0b.c(1): error: #169: expected a declaration k9f2g08u0b.c(1): warning: #1331-D: null (zero) character in input line ignored ... k9f2g08u0b.c(29): error: #11-D: unrecognized preprocessing directive ... k9f2g08u0b.c(233): error: #169: expected a declaration Target not created 另外,我用的是stm32f103ze,rt-thread1.1.0,k9f1g08u0B elmfat在SD卡上加载没有问题,希望在nandflash上加载uffs文件系统,目前没有找到合适的驱动,由于个人菜鸟,能有大神赐个例程最好~~
aozima
2013-03-15
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
是先让代码在原来的工程中(realtouch_stm32f4)中编译过了,甚至调试过了,再移植到新的平台中呢? 还是先让复制到新的平台中让其编译不过,再去移植代码?
prife
2013-03-16
这家伙很懒,什么也没写!
>我刚才贴出的代码用的确实就是你给的链接下载的,注意到有做细微的调整,但是编译仍然通不过 > >k9f2g08u0b.c(1): error: #169: expected a declaration >k9f2g08u0b.c(1): warning: #1331-D: null (zero) character in input line ignored >... >k9f2g08u0b.c(29): error: #11-D: unrecognized preprocessing directive >... >k9f2g08u0b.c(233): error: #169: expected a declaration >Target not created > >另外,我用的是stm32f103ze,rt-thread1.1.0,k9f1g08u0B >elmfat在SD卡上加载没有问题,希望在nandflash上加载uffs文件系统,目前没有找到合适的驱动,由于个人菜鸟,能有大神赐个例程最好~~ --- 这个程序是用在stm32f40x的,10x需要自己参考10x的nand命令移植。不能直接用。目前时间有限,过些日子可以提供一个红牛v3板子的nand flash驱动。楼主先自己调试下。
ericwong
2013-03-16
这家伙很懒,什么也没写!
>>我刚才贴出的代码用的确实就是你给的链接下载的,注意到有做细微的调整,但是编译仍然通不过 >> >>k9f2g08u0b.c(1): error: #169: expected a declaration >>k9f2g08u0b.c(1): warning: #1331-D: null (zero) character in input line ignored >>... >>k9f2g08u0b.c(29): error: #11-D: unrecognized preprocessing directive >>... >>k9f2g08u0b.c(233): error: #169: expected a declaration >>Target not created >> >>另外,我用的是stm32f103ze,rt-thread1.1.0,k9f1g08u0B >>elmfat在SD卡上加载没有问题,希望在nandflash上加载uffs文件系统,目前没有找到合适的驱动,由于个人菜鸟,能有大神赐个例程最好~~ > >--- > > > >这个程序是用在stm32f40x的,10x需要自己参考10x的nand命令移植。不能直接用。目前时间有限,过些日子可以提供一个红牛v3板子的nand flash驱动。楼主先自己调试下。 --- 多谢大神提点,期待一下红牛v3板子的nand flash驱动~~~
撰写答案
登录
注册新账号
关注者
0
被浏览
4k
关于作者
hzzhou
这家伙很懒,什么也没写!
提问
2
回答
1
被采纳
0
关注TA
发私信
相关问题
1
有关动态模块加载的一篇论文
2
最近的调程序总结
3
晕掉了,这么久都不见layer2的踪影啊
4
继续K9ii的历程
5
[GUI相关] FreeType 2
6
[GUI相关]嵌入式系统中文输入法的设计
7
20081101 RT-Thread开发者聚会总结
8
嵌入式系统基础
9
linux2.4.19在at91rm9200 上的寄存器设置
10
[转]基于嵌入式Linux的通用触摸屏校准程序
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
在RT-Thread Studio中构建前执行python命令
2
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
3
CherryUSB开发笔记(一):FSDEV USB IP核的 HID Remote WakeUp (USB HID 远程唤醒) 2025-01-18 V1.1
4
RT-thread 缩写字典
5
RT Thread 源码分析笔记 :线程和调度器
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
PWM
cubemx
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
813
个答案
177
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
聚散无由
2
篇文章
14
次点赞
catcatbing
2
篇文章
4
次点赞
Wade
2
篇文章
2
次点赞
Ghost_Girls
1
篇文章
4
次点赞
xiaorui
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部