This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Debugger fails when I add kernel support


Hi
I have written a small program to clear the memory (at91sam7x512-based board). Actually it works fine, but I can not debug it. The program uses cyg_user_start to initialize as task as follows:


#include <cyg/kernel/kapi.h>            /* All the kernel specific stuff */
#include <cyg/infra/diag.h>		// bring in e. g. cyg_type.h

void cyg_user_start(void)
{
    diag_printf("\nmemset start");
    cyg_thread_create(TASK_PRIO, mytask, (cyg_addrword_t) 0, "mytask",
			(void*) &stack, STACKSIZE, &thread, &thread_obj);
    diag_printf("\ncreate done\n");
    cyg_thread_resume(thread);
    diag_printf("\nresume done\n");	// never
}

I am working with Eclipse Ganymede/CDT conned via LAN to a BDI2000 JTAG device. When setting a breakpoint at diag_printf, the console output (see attachment) tells me it is reached, but no variables are displayed and the system can no longer be debugged (timeout). Having a closer look at the console output, it seams to me that gdb-command 104 looks suspicous. addr 0x000000 is just plain wrong.

I also have a similar program that does not use a task, but instead mytask is replaced by a procedure - and hence kapi.h is not included. But all the rest is the same - especially the same ecos is used to build the program. With this simpler program - the debuggin works fine. I do not understand why.
Robert

Attachment: memset_debug.txt
Description: Text document

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]