The function NANDInfoInit shows up in two files:
AM335X_StarterWare_02_00_00_06\bootloader\src\bl_nandgpmc.c
and
AM335X_StarterWare_02_00_00_06\examples\evmAM335x\nand\nandReadWrite.c
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The function NANDInfoInit shows up in two files:
AM335X_StarterWare_02_00_00_06\bootloader\src\bl_nandgpmc.c
and
AM335X_StarterWare_02_00_00_06\examples\evmAM335x\nand\nandReadWrite.c
So do the following functions:
GPMCNANDTimingInfoInit
NANDCtrlInfoInit
NANDDevInfoInit
Is is not a building/linking problem. It just seems to me you should not have the exact same function residing in multiple files. Seems like a maintenance problem. If you find a bug or want to modify, then it needs to get fixed in two places.
Brad,
Thanks for the suggestion. In StarterWare we build DAL, platform and System config as libraries, so that it can be linked to the final application. Any other logic other than these libs are part of application. So there are cases where the code is duplicated.
We will relook at this to have a common code..
Regards
Baskaran
Brad,
NandInfo_t is the structure which contains members like waitpin, chipselect, opmode, timing params, controller specific function pointers for the read ,write and ecc functionality .
An application which uses NANDLIB need to initialize this structure. Applications may have different values for members of NANDInfo_t. Fortunately our bootloader and example application uses same values. That is the reason we have similar functions in bootloader and example application. If we need to configure bootloader for different set of parameters, we can modify the bootloader NANDInfoInit function.
Regards,
Vishwanath K