This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compiler not able to source input file

Hello,

I'm trying to compile a program that has header files within 2 folders of the current path.

Something like this,

#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_sysctl.h"
#include "inc/hw_types.h"
#include "inc/hw_uart.h"
#include "driverlib/debug.h"
#include "driverlib/interrupt.h"
#include "driverlib/uart.h"

I have header files within inc folder and driverlib folder. Each file within these folders were added to the Source group.

After going through a few threads on the forum I also tried adding my include paths at, Projects- Options for Target-c/c++ tab-Include paths {.\driverlib;.\inc}

Despite all this I'm still receiving compiler errors, such as

driverlib\lcd.c(50): error:  #5: cannot open source input file "inc/hw_memmap.h": No such file or directory

What is the best course of action?

Thank you

Parents
  • Thank you Westermark and Broeker.

    You were right. Along with .\driverlib;.\inc, I added ./ as well, and now it compiles successfully. :-)

    Though, there are a few more compile errors. If you gett any idea to get past them, kindly let me know.

    I'm basically trying to interface the MPU-6050 inertial measurement unit to my Tiva launchpad using the tivaware api.

    This is some of the compiler errors I'm facing,

    
    i2cm_drv.h(458): error:  #20: identifier "inline" is undefined
      inline uint_fast8_t
    i2cm_drv.h(458): error:  #101: "uint_fast8_t" has already been declared in the current scope
      inline uint_fast8_t
    mpu6050.h(131): error:  #757: variable "uint_fast8_t" is not a type name
      extern uint_fast8_t MPU6050Init(tMPU6050 *psInst, tI2CMInstance *psI2CInst,
    mpu6050.h(131): error:  #20: identifier "tMPU6050" is undefined
      extern uint_fast8_t MPU6050Init(tMPU6050 *psInst, tI2CMInstance *psI2CInst,
    mpu6050.h(132): error:  #757: variable "uint_fast8_t" is not a type name
                                      uint_fast8_t ui8I2CAddr,
    

    I have already included all the driver files for the tivaware (driverlib) and the relevant sensor library files. Do you think this is a case of missing header files or something to do with my keil configuration?

Reply
  • Thank you Westermark and Broeker.

    You were right. Along with .\driverlib;.\inc, I added ./ as well, and now it compiles successfully. :-)

    Though, there are a few more compile errors. If you gett any idea to get past them, kindly let me know.

    I'm basically trying to interface the MPU-6050 inertial measurement unit to my Tiva launchpad using the tivaware api.

    This is some of the compiler errors I'm facing,

    
    i2cm_drv.h(458): error:  #20: identifier "inline" is undefined
      inline uint_fast8_t
    i2cm_drv.h(458): error:  #101: "uint_fast8_t" has already been declared in the current scope
      inline uint_fast8_t
    mpu6050.h(131): error:  #757: variable "uint_fast8_t" is not a type name
      extern uint_fast8_t MPU6050Init(tMPU6050 *psInst, tI2CMInstance *psI2CInst,
    mpu6050.h(131): error:  #20: identifier "tMPU6050" is undefined
      extern uint_fast8_t MPU6050Init(tMPU6050 *psInst, tI2CMInstance *psI2CInst,
    mpu6050.h(132): error:  #757: variable "uint_fast8_t" is not a type name
                                      uint_fast8_t ui8I2CAddr,
    

    I have already included all the driver files for the tivaware (driverlib) and the relevant sensor library files. Do you think this is a case of missing header files or something to do with my keil configuration?

Children
No data