2009-02-10 15:17:28     bss initialization when debugging with JTAG debugger

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2009-02-10 15:17:28     bss initialization when debugging with JTAG debugger

Doug Bailey (UNITED STATES)

Message: 69217   

 

I am using a JTAG debugger (ICEBear) to debug u-boot on a bf527-EZ-Kit board.

To debug the program, I load the elf file via the gdb load command.  Since I

load the image using my debugger, I do not take advantage of the blackfin's LDR

boot mechanism that clears out the BSS section.  Therefore when I run my code,

all my static variables are not initialized to 0.

 

I can modify the code in /cpu/blackfin/start.S to always call the BSS

initialization.  I was wondering if there is some other mechanism such as a

#define to get the same results.

 

I am using the 2008R1.5-RC2 tag of u-boot-1.1.6.  I am building the bf527-ezkit

flavor of u-boot with CONFIG_BFIN_BOOT_MODE set to BFIN_BOOT_BYPASS.

 

Regards,

 

Doug Bailey

QuoteReplyEditDelete

 

 

2009-02-10 15:24:51     Re: bss initialization when debugging with JTAG debugger

Mike Frysinger (UNITED STATES)

Message: 69218   

 

please refer to the documentation:

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:debugging#jtag_loading

QuoteReplyEditDelete

 

 

2009-02-10 16:08:37     Re: bss initialization when debugging with JTAG debugger

Doug Bailey (UNITED STATES)

Message: 69219   

 

My apologies.  Next time I will RTFM.

QuoteReplyEditDelete

 

 

2009-02-10 16:14:05     Re: bss initialization when debugging with JTAG debugger

Mike Frysinger (UNITED STATES)

Message: 69220   

 

no need to apologize.  just make sure that page is actually what you need first ;).

QuoteReplyEditDelete

 

 

2009-02-10 18:30:54     Re: bss initialization when debugging with JTAG debugger

Doug Bailey (UNITED STATES)

Message: 69221   

 

It is!  When I first read it I blew through the bss initialization only to have it come back and bite me.

 

Live and learn.  Thanks for the fast response.

QuoteReplyEditDelete

 

 

2009-02-10 18:54:40     Re: bss initialization when debugging with JTAG debugger

Mike Frysinger (UNITED STATES)

Message: 69222   

 

assuming the first bring up test didnt work around, you might want to be aware of the gdb breakpoint issue and jtag ... if you place a breakpoint with gdb (hardware or software), then gdb will attempt to access that memory location when you continue the processor.  so if you put a hardware breakpoint at the u-boot entry point and reset the hardware, gdb itself will trigger a hardware error (IVG5) and pretty much screw the whole thing up.

 

the easiest way to workaround this is to just sprinkle "emuexcpt" instructions at the u-boot entry point ...

Attachments

    Outcomes