Makefile not updating with project include settings

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Makefile not updating with project include settings

ソリューションへジャンプ
3,095件の閲覧回数
mrs9107
Contributor II

Hello,

I am working on a project in which I am using a FDRM KL25z development board to drive an HID keyboard device. In order to create this device, I am adapting the KL25z SDK HID example code to my own project.

I started out by reading over and understanding the code, then I copied over all the components from the example that was needed in as similar of a directory hierarchy as I could. In the project settings, I made sure to add the USB source includes in the same manner as the example project. When I try to build, it fails on undefined references to several functions in the USB source.

In trying to debug, I found that the generated makefile lacks the USB directories I specified in the include, in the same method I used for other source files that needed to be located. In the image below, the left hand side is my new project, and the right hand side is the example project.

makefiles.png

I have tried to configure the MCU C compiler includes in the same manner as the example as well, with these two screenshots from the MCU C compiler includes settings in the same order as above. Note I originally tried with the workspace referenced include similar to the CMSIS, osa, and sources include, but then tried the direct path similar to the example.

typewriterinclude.pngexampleinclude.png

The "/#includes" in the source are correct, with the only difference being that the "main" entrypoint is in source/typewriterKeyboard.c rather that /sources/composite.c like in the example. I'm not sure what difference that would make as the Makefile is not including the usb directories regardless.

This problem has been confusing me for several hours. I usually write C in plain text editors so I'm not used to these automatic build and configuration tools, and I only think I'm doing this correct.

Any help would be greatly appreciated.

--Matt

ラベル(1)
0 件の賞賛
1 解決策
2,919件の閲覧回数
converse
Senior Contributor V

I would guess that you have created your USB directories a a 'folder' rather than 'source folder' - the IDE will ignore anything placed in 'folders'. You can check this by looking at the icon for the folder if it has a small 'c' overplayed on the picture, it is a source folder - if not, it is s folder. You can convert it to a source folder by right-clicking on the project, selecting New->Source Folder and type the name of the folder that you want to change.

元の投稿で解決策を見る

3 返答(返信)
2,635件の閲覧回数
mail8
Contributor II

That did it for me. Thanks a lot!

 

0 件の賞賛
2,920件の閲覧回数
converse
Senior Contributor V

I would guess that you have created your USB directories a a 'folder' rather than 'source folder' - the IDE will ignore anything placed in 'folders'. You can check this by looking at the icon for the folder if it has a small 'c' overplayed on the picture, it is a source folder - if not, it is s folder. You can convert it to a source folder by right-clicking on the project, selecting New->Source Folder and type the name of the folder that you want to change.

2,919件の閲覧回数
mrs9107
Contributor II

That seemed to do the trick, but now it's just getting hung up on a file in a sub-directory, it should be recursive correct? I wonder what could be going wrong.  Could it be a build order? It cannot find usb_device_khci.h but then builds the source file for usb_device_khci.c
khci3.png