Forum: ARM programming with GCC/GNU tools Problem using Insight debugger

Author: Keith Rubow (krubow)
Posted on:

Rate this post
0 useful
not useful
I am brand new to ARM development (but not to embedded programming). I
have installed the WinARM tools on my Windows XP machine. I have an OKI
AME-51 evaluation kit, which has an evaluation board with an OKI
ML67Q4051 processor, and a J-Link USB/JTAG interface box. I have
successfully compiled and linked a small project using WinARM with
Programmers Notebook. Output when doing a Make All is as follows:

> "make.exe" all
arm-elf-gcc -x assembler-with-cpp -c -mcpu=arm7tdmi -g -gdwarf-2
-Wa,-amhls=crt.lst   crt.s -o crt.o
arm-elf-gcc -c -mcpu=arm7tdmi -O0 -gdwarf-2 -mthumb-interwork
-fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm
-Wa,-ahlms=main.lst   -MD -MP -MF .dep/main.o.d -I .
-IC:\WinARM\arm-elf\include main.c -o main.o
arm-elf-gcc -c -mcpu=arm7tdmi -O0 -gdwarf-2 -mthumb-interwork
-fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm
-Wa,-ahlms=kernel.lst   -MD -MP -MF .dep/kernel.o.d -I .
-IC:\WinARM\arm-elf\include kernel.c -o kernel.o
arm-elf-gcc crt.o main.o kernel.o -mcpu=arm7tdmi -nostartfiles
-Tlinkram.ld -Wl,-Map=TestWinarm.map,--cref,--no-warn-mismatch
-LC:\WinARM\arm-elf\lib   -o TestWinarm.elf
arm-elf-objcopy -O ihex  TestWinarm.elf TestWinarm.hex

> Process Exit Code: 0
> Time Taken: 00:01

My problem is in trying to use Insight to download this code into RAM
for debugging. I do the following:

I launch JLinkGDBServer.exe. I launch arm-elf-insight.exe. In
File->Target Settings I set Target to GDBserver/TCP and Port to 2331. I
check Set breakpoint at main and at exit, and check Display Download
Dialog. I use File->Open to open  TestWinarm.elf. Source code for main.c
is displayed. I select Run->Connect to target. I see a Successfully
connected dialog box. I select Run->Download. I do not see a download
dialog box, but I see the following error message in the status bar at
the bottom of Insight:

DOWNLOAD FAILED. Invalid download offset: and.

Help! What am I doing wrong? Will Insight work with the IAR/Segger
J-Link USB/JTAG interface? I have the option switches on my evaluation
board set to map the external RAM (1 MBytes) starting at address 0. I
have tried pressing (or not pressing) the processor hardware reset
pushbutton on the board before downloading. I cannot seem to get my file
loaded into RAM. It works when I use the IAR software tools that came
with my evaluation board, but I really don't want to have to spend lots
of $$$ for the full software tools for my rather large project. Insight
seems to be communicating with the JLinkGDBServer. I can use
View->Memory to view and modify memory starting at 0. But I can't seem
to download my program for debugging. What am I doing wrong?


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.