This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compile errors after adding driverlib.lib to project. (keil)

I'm trying to interface my Tm4c123 with the mpu-6050.

I started off creating a project in keil and added both driverlib.lib and sensorlib.lib to source group 1. They are in the root directory of the project (no inc or driverlib folder). With this I tried to compile a project which has the following include statements;

#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_ints.h"
#include "driverlib/debug.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
#include "sensorlib/hw_mpu9150.h"
#include "sensorlib/hw_ak8975.h"
#include "sensorlib/i2cm_drv.h"
#include "sensorlib/ak8975.h"
#include "sensorlib/mpu9150.h"
#include "sensorlib/comp_dcm.h"

Upon compiling I receive the error;

Build target 'Target 1'
compiling mpu.c...
mpu.c(27): error:  #5: cannot open source input file "inc/hw_memmap.h": No such file or directory
  #include "inc/hw_memmap.h"
mpu.c: 0 warnings, 1 error
".\imu.axf" - 1 Error(s), 0 Warning(s).
Target not created

Is this because, 1. I have not added the driverlib and sensorlib into folders named inc and driverlib respectively, in the root directory?

2. Or is there some other configuration issue with the keil ide?

Kindly please post a solution to this issue.

  • 2. Or is there some other configuration issue with the keil ide?

    Almost - this is a configuration issue within your project.

    You need to add all the folders/directories with your includes to a "list" in your project settings. I'm no Keil uVision user, check the IDE help/manual, or ask at the Keil forum.