Hi!
I have problem with including UART library API header file in my project. When I include it at the beginning of my header file (#include<uart.h>) the compiler shows, that it cannot find the file. I set the paths in the build configuration and added lib_uart module in the makefile. What could be the reason of my problem?
Library API file not found
I've had similar problems. It doesn't appear to interfere with the build process, but I'd like an explanation too.
- infiniteimprobability
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
- Contact:
Would you be able to give more info? I have used uart a few times recently and not seen this issue. Is it a warning/error, compiler version etc?
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
Hi Krzemo,
I am curious and thought of two things.
1. Case of the file name, assuming you are on linux, do they match? (added for completeness)
2. The use of <uart.h> instead of "uart.h"
The #2 requires me to go and look up the subtitles but I think '<>' involves the -isystem include paths whilst "" the -I include paths (first).
The following link elucidates a little more https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
As for the detail...
(I would be interested to know if changing to "" fixes the issues - I may be barking up the wrong tree)
I am curious and thought of two things.
1. Case of the file name, assuming you are on linux, do they match? (added for completeness)
2. The use of <uart.h> instead of "uart.h"
The #2 requires me to go and look up the subtitles but I think '<>' involves the -isystem include paths whilst "" the -I include paths (first).
The following link elucidates a little more https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
As for the detail...
(I would be interested to know if changing to "" fixes the issues - I may be barking up the wrong tree)
Hi!
I dealed with the uart.h inclusion - the project cleaning solved the problem - but I have another one. I created a new module named "module_xyz" with header file "xyz.h" inside of it. I would like to use my header file in the main application so I includer xyz.h in it and made changes in the makefile. But the problem with the inclusion continues - it says exactly the same that it cannot find xyz.h, but now cleaning the project does not help at all. What may be the other reason of the problem?
I dealed with the uart.h inclusion - the project cleaning solved the problem - but I have another one. I created a new module named "module_xyz" with header file "xyz.h" inside of it. I would like to use my header file in the main application so I includer xyz.h in it and made changes in the makefile. But the problem with the inclusion continues - it says exactly the same that it cannot find xyz.h, but now cleaning the project does not help at all. What may be the other reason of the problem?
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
Could you add the flag '-v' to the makefile (makes it verbose) and post the failing commandline command (the last few lines).
I would like to see what '-I' flags have been added to the failing command.
Also could you post the directory path of your "xyz.h" file.
There should be a "-I <path>" the same as <path>/xyz.h
I would like to see what '-I' flags have been added to the failing command.
Also could you post the directory path of your "xyz.h" file.
There should be a "-I <path>" the same as <path>/xyz.h
Thank you for your help - I've already solved the problem. It was the matter of the bad path in xTimeComposer.
The topic is off.
The topic is off.
Have problem including lib_i2c (4.0.0) to app_usb_aud_xk_216_mc. (Im trying to add i2c slave mode to the usb ref. design)
xTIMEcomposer: Community_14.3.2 (build 25550, Sep-30-2017)
I'm trying to include i2c.h in module_usb_audio/main.xs After Project/Clean... I get the following problems with building (2i10o10xxxxxx):
- Unresolved inclusion of "i2c.h". But I can see lib_i2c and subfolders in app_usb_aud_xk_216_mc/Includes.
- "parse error before i2c" for void i2c_slave_register_file(server i2c_slave_callback_if i2c, server register_if app). This is one of the functions from AN00157 i2c slave application note. For me it seems that xTIMEcomposer cant find i2c_slave_callback_if in lib_i2c/api/i2c.h - I also get failure for Open declaration.
(I have run the code in AN00157 as a separate project without any problems)
xTIMEcomposer: Community_14.3.2 (build 25550, Sep-30-2017)
I'm trying to include i2c.h in module_usb_audio/main.xs After Project/Clean... I get the following problems with building (2i10o10xxxxxx):
- Unresolved inclusion of "i2c.h". But I can see lib_i2c and subfolders in app_usb_aud_xk_216_mc/Includes.
- "parse error before i2c" for void i2c_slave_register_file(server i2c_slave_callback_if i2c, server register_if app). This is one of the functions from AN00157 i2c slave application note. For me it seems that xTIMEcomposer cant find i2c_slave_callback_if in lib_i2c/api/i2c.h - I also get failure for Open declaration.
(I have run the code in AN00157 as a separate project without any problems)
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
Hi alexjaw,
Could you add '-v' (verbose) to your makefile's XCC_FLAGS.
Could you then post the (last) failing command-line (try building twice to reduce the amount of output).
In the command-line you should see "@_iflag.rsp", please also post the contents of this file viz: .build/_iflag.rsp
robert
Could you add '-v' (verbose) to your makefile's XCC_FLAGS.
Could you then post the (last) failing command-line (try building twice to reduce the amount of output).
In the command-line you should see "@_iflag.rsp", please also post the contents of this file viz: .build/_iflag.rsp
robert
Attached:
- the build log with --verbose flag.
- the diff for main.xc showing the additions related to the i2c slave stuff, original code from AN00157
Most are warnings from the app_usb, but there are also the warnings for lib_i2c and errors related to void i2c_slave_register_file(server i2c_slave_callback_if i2c, server register_if app) {...} which I have in main.xc
- the build log with --verbose flag.
- the diff for main.xc showing the additions related to the i2c slave stuff, original code from AN00157
Most are warnings from the app_usb, but there are also the warnings for lib_i2c and errors related to void i2c_slave_register_file(server i2c_slave_callback_if i2c, server register_if app) {...} which I have in main.xc
- Attachments
-
- main-diff.txt
- (4.41 KiB) Downloaded 214 times
- main-diff.txt
- (4.41 KiB) Downloaded 214 times
-
- build-log.txt
- (11.86 KiB) Downloaded 207 times
- build-log.txt
- (11.86 KiB) Downloaded 207 times