Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi LiangYi,
> cfi_flash.c:343: undefined reference to 'monitor_flash_len' Did you modify cfi_flash.c? My version has no reference to monitor_flash_len at line 343 -- it shows up in the statement at line 348. Just as a sanity check, your code should look like this:#if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
&& (CFG_MONITOR_BASE <= CFG_FLASH_BASE + CFG_FLASH_SIZE)
flash_protect (FLAG_PROTECT_SET,
CFG_MONITOR_BASE,
CFG_MONITOR_BASE + monitor_flash_len - 1,
flash_get_info(CFG_MONITOR_BASE));# endifCheck your config macro definitions. This should not even be compiled, unless you are trying to run u-boot out of flash. > Furthermore, My flash is 16-bit width, should I define FLASH_CFI_16BIT in my board.h. No, it is defined in include/flash.c. The CFI code determines the width automatically. Regards, --Scott