Hi everyone! . I try to use EFS(Embedde File System) with Keil 5.24 for AT45DB642D. I read manual www.keil.com/.../fs_create_app.html And config my project as described. For SPI flash. Initial current drive = F0.
But i got a lot error after compilation. Like this:
C:\Keil_v5\ARM\PACK\Keil\STM32H7xx_DFP\2.2.0\Drivers\BSP\STM32H743I_EVAL\stm32h743i_eval_nor.c(416): error: #20: identifier "NOR_HandleTypeDef" is undefined
C:\Keil_v5\ARM\PACK\Keil\STM32H7xx_DFP\2.2.0\Drivers\BSP\STM32H743I_EVAL\stm32h743i_eval_nor.h(124): error: #20: identifier "NOR_IDTypeDef" is undefined
Could anyone give me advice how to use EFS for spi flash?
P.S. I used Keil 4.54 before. And it was not so hard to use AT45DB642D. There were few files : ARM-RL library,FILE_CONFIG.C, FS_SPI_FLASHPRG.C.
Best regards, Vladimir
error: #20: identifier "NOR_HandleTypeDef" is undefined
and
error: #20: identifier "NOR_IDTypeDef" is undefined
it sounds like you have omitted to #include a required header file or files ...
I decided to build new project. And after that i got next error:
Error: L6218E: Undefined symbol Driver_SPI0 (referred from at45db641e.o).
I have next RTE Configuration:
CMSIS -> Core CMSIS -> RTOS2(API)->Keil RTX5 CMSIS Driver -> Flash -> AT45DB642D CMSIS Driver -> SPI(API) -> SPI Compiler -> Event Recorder Compiler -> I/O -> File Device -> Startup Device -> STM32Cube Framework (API) -> STM32CubeMX ( SPI #1 activated Full Duplex Mode) Device -> STM32Cube HAL -> Common Device -> STM32Cube HAL -> Cortex Device -> STM32Cube HAL -> DMA Device -> STM32Cube HAL -> GPIO Device -> STM32Cube HAL -> MDMA Device -> STM32Cube HAL -> PWR Device -> STM32Cube HAL -> RCC Device -> STM32Cube HAL -> SPI File System -> CORE File System -> Drive ->NOR ( 1 pcs)
All drivers installed. How could i fix my error?
Best regards, Vladimir.
That's a Linker error.
So you've used a function without providing any definition (aka implementation) of it.
Most often, this is because you've #included a header, but have not provided the corresponding source or binary library file.
www.keil.com/.../armclang_err_dom1365073159742.htm
Hi everyone! I found solution for this problem. It's necessarry set DRIVER_SPI_NUM=1 for Spi_drive 1 in Target - > C++ define.
But after that i have problem with SPI interchange. There is no try to send or receive bytes.
fcheck ("F0:") return: fsAccessDenied.
functions: static int32_t ReadData (uint32_t addr, void *data, uint32_t cnt) static ARM_FLASH_STATUS GetStatus (void) Not calling.
How it is possible to see what is inside fcheck() functions.
P.S. finit("F0:") return fsOK.
Does anyone have Project example for Keil 5(EFS) + AT45xxx ?
Hi everyone! The problem is solved. For build AT45DB161D.c it's better to use AT45DB642D.c Because it's correct to use : /* buf[4..7]: don't care */ But in AT45DB641E.c use inappropriate: /* buf[4...5]: don't care */
static int32_t ReadData (uint32_t addr, void *data, uint32_t cnt) { uint32_t page_addr; uint32_t page_offs; uint8_t buf[8]; int32_t result; if (data == NULL) { return ARM_DRIVER_ERROR_PARAMETER; } page_addr = addr / PAGE_SIZE; page_offs = addr % PAGE_SIZE; addr = (page_addr << 11) | page_offs; /* Prepare Command with address */ buf[0] = CMD_READ_DATA; buf[1] = (uint8_t)(addr >> 16); buf[2] = (uint8_t)(addr >> 8); buf[3] = (uint8_t)(addr >> 0); /* buf[4..7]: don't care */ /* Select Slave */ result = ptrSPI->Control(ARM_SPI_CONTROL_SS, ARM_SPI_SS_ACTIVE); if (result != ARM_DRIVER_OK) { return ARM_DRIVER_ERROR; } /* Send Command with Address */ result = ptrSPI->Send(buf, 8); if (result != ARM_DRIVER_OK) { goto transfer_error; } while (ptrSPI->GetDataCount() != 8);