This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Redboot-GDB


Hi Nick/Mark,

Let me summarize my understanding about Redboot?s application invocation through GDB.

Psuedo code (with reference to ecos 2.0 ? flow as per my code path):

cyg_start()
{
	if( ?$? == char on the gdb serial port)
	{
		breakpoint() /* causes a Undefined instruction exception */


Undefined exception vector handler { push registers into stack == _hal_registers

eventually calls __handle_exception()

return_from_exception:
	pop registers from stack /* so that it jumps to the app. */
}

__handle_exception()
{
	copy the _hal_registers into the GDB register at __cleanup_vec()

__process_exception_vec()

/* (my case) by this time we should have received the ?c? command packet to start the loaded App */
Copy the GDB registers that has the modified PC <app. Start address> into _hal_registers (or in other word into the exception return stack) at __init_vec()
}



__process_exception_vec()
{
loop till __process_packet() returns ?1 /* in my case until we see ?c? command packet */
{
__process_packet()
}
}


__process_packet()
{
switch(gdb_command)
{
case ?P?:
(in my case) store the app start address in R15?s position in GDB registers
return 0;


		case ?c?:
			return ?1;
	}
}


If the above is (more or less) correct, then the possibilities for the application code not to run after continue is issues at the gdb prompt are:
1. ARM9 var issue: Since, I used an older version of ecos source, the cache macros could have issues. I have synched up to the current ecos CVS repository & will test it on Monday.
2. The other possibly: improper SDRAM configuration, screwing the stack space and/or code. Which may not be the case, since the same code is running in a product without any issues at the same CPU speed.
3. MMU page table inconsistency.


Let me think over this. And mean while please share with me your thoughts on this.

Thanks a lot for the patience & support.
Cheers,
-Mike.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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


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