If you simply copy the header file to your project, you basically will have two files with the same name under the include path of the project. That's why it doesn't work.
A quick fix is to just modify the header file in the SDK. You can make a copy of the original file in case you lost the changes you made. It's not ideal but can help you quickly verify the functionality of those changes.
The ideal fix is to create another header file for the extension board. You have to un-define EXT_BOARD_8029A in the project settings (Properties->C/C++ Build->Settings->GNU ARM C Complier->Symbols) first. After that, board.h file won't include the original header file of the extension board. You can then include the new header file you created.
I do as what you said the ideal fix . Here is my step :
1. Un-define EXT_BOARD_8029A in the project settings (Properties->C/C++ Build->Settings->GNU ARM C Complier->Symbols) first.
2. Copy board.h and extension_board_8029a.h to external_copied_files.
3. Modify the board.h . add define EXT_BOARD_8029A in this file .
/*************************************************************************/
/* Extension Board Definitions */
/***************************
解决重复头文件问题
本文介绍了一种解决项目中因包含相同名称头文件而导致的问题的方法。通过修改SDK中的头文件或者创建新的头文件来避免冲突,并详细说明了具体步骤。
2476

被折叠的 条评论
为什么被折叠?



