When I compile lpcxpresso 1769 example code (download from lpcware, nxp_lpcxpresso_1769_freertos_examples), I got a linker error at the end of the build process. The keil (version 5) output is shown below:
Build Project 'freertos_blinky' - Target 'iflash_nxp_lpcxpresso_1769' linking... .\keil_output\freertos_blinky_iflash_nxp_lpcxpresso_1769.axf: error: L6002U: Could not open file ..\..\..\..\..\..\software\lpc_core\lpc_board\boards_17xx\nxp_lpcxpresso_1769\keil_output\board_nxp_lpcxpresso_1769.lib: No such file or directory Finished: 0 information, 0 warning, 0 error and 1 fatal error messages. ".\keil_output\freertos_blinky_iflash_nxp_lpcxpresso_1769.axf" - 1 Error(s), 0 Warning(s). Target not created
I make sure the lib file is at the correct folder. After a repeatedly try, I found the error was cause by folder length limit, the full directory name with lib file name is
F:\WorkSpace\CODE\nxp\lpcopen\lpcopen_keil_iar_nxp_lpcxpresso_1769.git\software\lpc_core\lpc_board\boards_17xx\nxp_lpcxpresso_1769\keil_output\board_nxp_lpcxpresso_1769.lib
It's length is 173. After move the base folder the root disk, the full directory name with lib file name changed to
F:\lpcopen_keil_iar_nxp_lpcxpresso_1769.git\software\lpc_core\lpc_board\boards_17xx\nxp_lpcxpresso_1769\keil_output\board_nxp_lpcxpresso_1769.lib
The full directory length is 146. This time I can success build the project.
Then I found if the full directory length is more than 150 character, it will cause build error. I cannot found this limitation from uVision help, maybe it's a internal limitation?
It doesn't sound like Keil is using any known path length limit.
Few programs I have seen are compiled with less than a 255 character limit.
NTFS can have 255 characters for each directory entry name, and a total path length of 32k characters.
One thing to remember is that networking can quickly result in quite long paths, if a subtree is exported and the other end uses that as a root path.
A more common problem in the Windows world is that the total command line when linking becomes too large, which is the reason why a number of compilers supports reading the command line arguments from a separate file.