Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] problem: error on compiling _ LPC1768+CMSIS+ RIT Unit

Status
Not open for further replies.

enekas

Newbie level 6
Newbie level 6
Joined
Aug 8, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Visit site
Activity points
1,368
Hello

I wanna use RIT by CMSIS for LPC1768 ( Compiler : Keil )
my code:

Code:
#include "LPC17xx.H"  

#include "system_LPC17xx.h"  
#include "lpc17xx_clkpwr.h"
#include "lpc17xx_rit.h"

unsigned int i=0;

void RIT_IRQHandler(void)
{	i++;
	if(i%2==0)
	LPC_GPIO2->FIOSET=0X01;
	else
	LPC_GPIO2->FIOCLR=0X01;
	RIT_GetIntStatus(LPC_RIT);
}

int main(void)
{
//	NVIC_SetVTOR(0X2000);
	LPC_GPIO2->FIODIR=0X03;
	RIT_Init(LPC_RIT);
	RIT_TimerConfig(LPC_RIT,100);
	RIT_Cmd(LPC_RIT,ENABLE);
	NVIC_EnableIRQ(RIT_IRQn);

 	while(1);
}


Compiler error:
Build target 'Target 1'
assembling startup_LPC17xx.s...
compiling main.c...
compiling core_cm3.c...
compiling system_LPC17xx.c...
compiling lpc17xx_clkpwr.c...
compiling lpc17xx_rit.c...
linking...
rit.axf: Error: L6218E: Undefined symbol check_failed (referred from lpc17xx_rit.o).
Target not created

I solve some errors by changing some headers , but I can't settle this one
any suggestion?

Tanx.
 

Is your header files in the include folders or project folder? i.e., where the header files are present or is it in a different directory? If the library files arenot in project directory then you have to use #include <...> instead of #include "..."
 

Tanx , because of your quick reply ...
yes, all header files are in project folder. then i used #include" ... "
 

Attachments

  • RIT.rar
    164.9 KB · Views: 65

It is telling L6218E is undefined. What is L6218E in LPC terminology? I don't use LPC controllers. L6218E definition is missing in some file. I see that the file lpc17xx_rit.c is not included anywhere in the project. I think this file is needed to generate lpc17xx_rit.o object file properly. Include this file and compile. See if that works.

Also put the below files in the project folder

lpc17xx_libcfg.h
lpc17xx_libcfg_default.h
 
Last edited:
  • Like
Reactions: enekas

    enekas

    Points: 2
    Helpful Answer Positive Rating
Tanx jayanth.devarayanadurga ...
Some headers (... .c) included by IDE , it's a different method & will be done without use #include"..."
It seems that's because of " lpc17xx_libcfg_default.c "
We don't have any error on " lpc17xx_rit.o " now ! :D , Tanx ..., you're right
But then some error occurred, i solved and everything is fine now.

Thank you very much
Good luck my friend
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top