LPC1769 Debug Problem

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

LPC1769 Debug Problem

2,090件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 05:50:46 MST 2011
Hi,

This time I encounter a problem when I'm trying to initialize debug,

Error is below:
Error Stopping at main.
Reason: Target request Failed: Function "main" not defined.

I'm creating my project from example projects of "mcb1700.code.bundle.lpc1769.lpcxpresso" and I'm just exchanging source files and header files with my sources and headers.

So, I wonder whether the mistake caused by creating project or writing codes?

Thanks in advance,

Best Regards,
0 件の賞賛
返信
14 返答(返信)

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 07:45:24 MST 2011
Ok ZERO. Thanks for all your help.

Best Regards,

Furkan
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 07:42:06 MST 2011
Debugger can't stop WDT, so just disable it during testing.

If you release your project enable it and use it to reset your LPC:

LPC_WDT->MOD = WDEN | WDRESET;
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 07:34:23 MST 2011
Yes it works :) Thank you Zero :)

I thought that cr_startup is not necessary when I use cmsis, so this shows that I thougth wrong :p

But now I wonder that why do I disable wdt_init? how can I use wdt?
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 07:08:54 MST 2011
Where is your cr_startup_lpc176x.c file :confused:  Deleted :eek::eek:

Adding cr_startup_lpc176x.c,

disabling WDT_Init

//WDTInit();
and changing write / read buffers to real buffers seems to work here 

//uint8_t * write_buf;
//uint8_t * read_buf;

uint8_t write_buf[50];
uint8_t read_buf[50];
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 06:59:26 MST 2011
ok you're rigth :) But I just added these files to a new project that's all.
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 06:43:39 MST 2011
Please export your complete project :)
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 06:37:21 MST 2011
But, I tried this with different example projects and I change nothing except source code files and header files :(

I attached my source codes and header files, can anyone chech if problem is with my codes ?

Edit: My main function is in Akya_I2C_main.c
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 06:26:19 MST 2011
If clean and rebuild doesn't work, you've obviously changed something important :eek:
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 06:23:27 MST 2011
Yes I removed but my file also have main itself, but I think GNU debugger cannot see it :(
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jul 14 06:20:25 MST 2011
Did you remove the source file containing main(). All C programs must have a main().
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 06:13:19 MST 2011
No,  I think I mislead you. Original Example is working well. And I want to use that example as template for my project. So, I'm deleting source files and header files of  that example and replace with my own files. And than I got that error message.
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 06:08:08 MST 2011
And this original example isn't working?
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by furkan.yuksel on Thu Jul 14 06:03:36 MST 2011

Quote: Zero
So you are sure that you are using CMSIS2.0 and semihosting...



I'm importimg both CMSIS project and an example project from same example bundle.

Actually I tried to create my own project but I couldn't succeded :( So, I tried this way because it seemed easier.
0 件の賞賛
返信

2,070件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jul 14 05:55:21 MST 2011

Quote: furkan.yuksel
So, I wonder whether the mistake caused by creating project or writing codes?



It's 'creating project' :eek:

Obviously you are mixing old / new projects / files. It's a good idea to use examples to learn, but I prefer to create a new LPCXpresso project for own projects. So you are sure that you are using CMSIS2.0 and semihosting...
0 件の賞賛
返信