This is the mail archive of the insight@sourceware.org mailing list for the Insight 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: DOWNLOAD FAILED error


Keith Rubow wrote:
I am running arm-elf-insight from the WinARM toolchain. I am having a problem trying to download my application to my target board. I am using an OKI ML67Q4051 processor on an OKI AME-51 evaluation board. I am connecting my Windows XP development computer to the target board using a known good wiggler clone (JTAG interface) plugged into the LPT1 port. (I know it is good because I can connect to the target, and I can use this wiggler with the IAR Embedded Workbench debugger). Here is what I do.

Okay, now I have to ask... Did you build insight yourself or did someone supply it to you? If the latter, then pretty soon, you're going to have to seek help from that party, since I haven't any idea about what they gave you.


Having said that, I don't recall that gdb officially supports any type of wiggler interface. I know that there are third parties out there that supply hacks to use their hardware with gdb/insight, but I've not played with one in a very long time (OCD wiggler almost a decade ago).

To repeat myself... Having said that:

I run openocd-pp. I launch arm-elf-insight, set target settings to Remote/TCP, localhost, port 3333. I connect to target, and get a "successfully connected" response. I select File->Open, and open my "elf" file (insight shows the source file). I select Run->Download to attempt to download the application to the target board. Insight displays the following message in the status bar at the bottom of the window:

DOWNLOAD FAILED: Invalid download offset: and.

First things first. Do not attach to a target before you've loaded an executable into insight. Insight/gdb _must_ have the executable file in memory before the attach. If you attach first, gdb will clear the target when you load a "new" executable into the debugger. Quirky, but that's the way gdb works.


There are two other things to try. First and foremost: either run arm-elf-gdb (or arm-elf-insight --i=console) and try to do this all manually. Use the "file" command to load your executable. Then "set remotebaud RATE", "target remote localhost:PORT", and "load". Then set a break ("break main", e.g.) and "continue". If you hit the breakpoint, all is well. If not, there's another problem underneath insight (in gdb, perhaps).

The other thing is to let insight do what it thinks needs doing to get this going. Try File->Open... your executable, File->Target Settings... to double-check your settings (hit "More options" -- is "Download" selected? By default, it should be). Set a breakpoint. Then simply click "Run". Insight will automatically connect to the target, download, and "run" the target (in this context, it actually does the equivalent of gdb's "continue" command, but that's an involved story which insight tries to isolate the user from).

So I guess the first thing is try reversing this procedure and seeing if it helps any. If not, try the other two things I suggest. With any luck, it'll just be something trivial. [We all hope, at least.]

Keith


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