2011-01-09 16:50:46     [newbie] gdb/run problem

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

2011-01-09 16:50:46     [newbie] gdb/run problem

Slawek Balon (POLAND)

Message: 97283   

 

Hi,

 

Some time ago i decided to move from 21xx series of ADI dsp's to nice looking blackfin family. I made simple board with blackfin 532 mounted and gnice connected to JTAG of this dsp. I recently installed toolchain for windows: 2010R1 and run bfin-gdbproxy.exe, my dsp was detected (gdbproxy detected my 532 as BF533, 0x27A5 stepping 2).

 

I created simply empty project for bare metal application on bf532, then in main i added simply asm("nop"); I added a breakpoint on this asm line, and when i try to debug this, debugger shows me that execution is stopped at this line (as it should), so i press F5 to go one step further and pc goes to ffa08120 - the endless loop:   _unknown_exception_occurred, also i have something like this in left window of debugger coloured red:

 

Can't find a source file at "/usr/src/packages/BUILD/blackfin-toolchain-2010R1/gcc-4.3/libgloss/bfin/basiccrt.S"

Locate the file or edit the source lookup path to include its location.

 

 

There is no such file in my toolchain directory... My question is: how can i make it run correctly? (this path looks like linux style not windows...) Is this way of creating bare metal application correct?

 

regards

 

 

Sławek

 

ps. sorry for my english...

QuoteReplyEditDelete

 

 

2011-01-09 20:00:13     Re: [newbie] gdb/run problem

Mike Frysinger (UNITED STATES)

Message: 97284   

 

the path doesnt matter.  the source file it is looking for is from the basic crt code and is written in all assembly anyways.  if your code has gotten that far, it is already too late.

 

when the main() function is done, it simply calls _exit which triggers EXCPT 0 forever.  this is normal behavior.

QuoteReplyEditDelete

 

 

2011-01-10 03:17:05     Re: [newbie] gdb/run problem

Slawek Balon (POLAND)

Message: 97288   

 

thanks for answer, i understand that i should don't care about error with .S file. My main function has endless loop at it's end - just while(1), i see it in disasembly in debugger window but in step mode (when i press F5) it never goes to that point, also if i add more asm lines (for example nops) it goes to exeption on any of the instruction where the breakpoint was asserted, i see correct code in disassembly window in eclipse, but every step causes exception. Its the first test of making code on this dsp - i have led with driver connected do one of PF pins and when i try to do some init of PFIO it crashes on every instruction : could this be a problem with my chip? I have serial eeprom on my board and it is empty - no startup code, i was thinking that i shout make it runs trough jtag and then from external serial memory.

 

regards, Slawek

QuoteReplyEditDelete

 

 

2011-01-10 03:37:22     Re: [newbie] gdb/run problem

Mike Frysinger (UNITED STATES)

Message: 97294   

 

how exactly are you compiling & linking & loading & executing your code ?

 

keep in mind that gdbproxy/gdb does absolutely nothing in initializing hardware.  it is completely up to you to do so.  e.g. if you dont initialize external memory, you wont have access to it.  this is by design -- VDSP provides an "easy-to-use" experience from the start, but often can get in the way when trying to do more complicated things.  the GNU tools provide very little so as to not get in the way of anything.

 

when you connect via JTAG and have gdb load a program into on-chip memory, the external flashes are irrelevant.  the JTAG process breaks in before the on-chip ROM can read/load anything from them.

QuoteReplyEditDelete

 

 

2011-01-10 04:05:00     Re: [newbie] gdb/run problem

Slawek Balon (POLAND)

Message: 97295   

 

i made new project=> bare metal elf blackfin=> hello world application, i then added few asm("nop"); set breakpoint on one of the lines with nop and i pressed build (result is ok), then debug (with started gdbproxy earlier, connected and dsp detected via gnice ) i understand that there is no init of any peripherials/sdram etc.. but why it doesn't execute simple nops?

QuoteReplyEditDelete

 

 

2011-01-11 02:23:36     Re: [newbie] gdb/run problem

Slawek Balon (POLAND)

Message: 97316   

 

hello again, I wrote some code before breakpoint and it works (led state on PF0), everything is crasching when i press F5 in debugger, for now I will try vdsp and use it's default init routines maybe this is the problem - like you said Mike... Thanks for patience and time

 

regards, Slawek

Attachments

    Outcomes