EmbDev.net

Forum: ARM programming with GCC/GNU tools Cannot download code to OKI ML67Q4051 processor


von Keith R. (krubow)


Rate this post
useful
not useful
HELP! I am at the end of my rope. I have been trying for over a week to
use the WinARM tools to develop and debug a simple LED-blinking
application for the OKI ML67Q4051 ARM7 processor. I have an OKI AME-51
evaluation board. I have installed all the WinARM tools, including
programmers notepad, arm-elf-gcc, arm-elf-gdb and arm-elf-insight. I can
create a project, compile, link, and get an elf file. Everything looks
good. The map file says everything is at the correct addresses. Then I
try to debug using insight, and nothing works.

I built my own wiggler clone. It works. I can actually load and debug my
application using the IAR Embedded Workbench evaluation software that
came with my evaluation board (using my wiggler). But when I try to
debug using insight, I have trouble. I can launch openocd-pp. I can
launch insight, and connect to the target at localhost:3333. I can even
use file->open to open my elf file, and insight shown me the source
file(s). But any attempt to download the file to the processor, or to
run the program, is met with total failure. I cannot seem to get the
code to download into the RAM on the demo board. I have mapped the
external 1 MByte RAM to address 0 and linked the program to address 0. I
have also tried linking to address 0x10000000 and loading the
application into the 16 KBytes of on-chip RAM. No luck either way. When
I Run->Download, insight gives me the error message "DOWNLOAD FAILED:
Invalid download offset: and." in the status bar. I am about ready to
shell out $5000 for the full blown IAR Embedded Workbench software.

I cannot even find any documentation for insight. Clicking on Help->Help
Topics gives me a dialog box that says "Error: invalid command name
"ide_shell_execute"". With no documentation or help, what can I do? I
would appreciate a response from ANYONE who knows how to use insight.

von Patrick D. (patrick-deflandre)


Rate this post
useful
not useful
> HELP! I am at the end of my rope.
Wait a few days that sky goes blue again...

> I can create a project, compile, link, and get an elf file. Everything looks
> good. The map file says everything is at the correct addresses.
So you have made a big step...

> Then I try to debug using insight, and nothing works.
Hum...

> I built my own wiggler clone. It works.
Great.

> When I Run->Download, insight gives me the error message "DOWNLOAD FAILED:
> Invalid download offset: and." in the status bar.
Do you use a config file for openocd ? If not, have a look here :
http://openfacts.berlios.de/index-en.phtml?title=OpenOCD_configuration

> I am about ready to shell out $5000 for the full blown IAR Embedded
> Workbench software.
Not worth it...

von Keith R. (krubow)


Rate this post
useful
not useful
I have made some progress on this problem. See my comments below.

Patrick Deflandre wrote:
>> HELP! I am at the end of my rope.
> Wait a few days that sky goes blue again...
>
>> I can create a project, compile, link, and get an elf file. Everything looks
>> good. The map file says everything is at the correct addresses.
> So you have made a big step...
>
>> Then I try to debug using insight, and nothing works.
> Hum...
>
>> I built my own wiggler clone. It works.
> Great.
>
>> When I Run->Download, insight gives me the error message "DOWNLOAD FAILED:
>> Invalid download offset: and." in the status bar.
> Do you use a config file for openocd ? If not, have a look here :
> http://openfacts.berlios.de/index-en.phtml?title=OpenOCD_configuration
>
>> I am about ready to shell out $5000 for the full blown IAR Embedded
>> Workbench software.
> Not worth it...

After banging my head against the wall a few days I discovered
something. I had to open a console window in insight and give it the
following commands:
file myproject.elf
mem 0 0xfffff rw
target remote localhost:3333
load

The key seemed to be the "mem" command to tell GDB that I had read/write
memory available from 0 to 0xfffff. Without the "mem" command the "load"
would fail. I am now trying to automate the process with a startup
command script file for insight.

I can also use the jlinkgdbserver (instead of openocd) and use the Jlink
USB JTAG adapter (at port 2331) instead of the wiggler. This is good,
since one of my computers has no LPT port.

Keith Rubow

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.