[fpc-pascal] fpc 2.6.0-rc1 for arm-embedded
Koenraad Lelong
koen1 at de-brouwerij.be
Mon Dec 26 11:55:55 CET 2011
On 12-12-11 09:53, Koenraad Lelong wrote:
> On 09-12-11 00:09, Den Jean wrote:
>> On Thursday 08 December 2011 13:49:16 Koenraad Lelong wrote:
>>
>> > /usr/lib/fpc/2.6.0/units/arm-embedded/rtl/system.o does not support
>>
>> > interworking, whereas test-1.elf does
>>
>> does this thread help ?
>>
>> http://lists.freepascal.org/lists/fpc-devel/2011-August/025615.html
>>
> Hi,
>
> Thanks,
>
> I tried the commands of John Clymer after downloading and installing
> Codesourcery. The compiler and my test-application compiled fine. I
> flashed my device but there I don't see anything.
> At the moment I can't debug with JTAG, so I'll have to fix that first
> before I can say more.
>
> Regards,
>
> Koenraad Lelong.
Hi,
I got SWD running so I can debug.
Unfortunately, I still can't go on.
When I start the program with the remote gdb I get an error :
(gdb) target extend localhost:4242
Remote debugging using localhost:4242
0x0800085c in ?? ()
(gdb) x/20i 0x800085c
=> 0x800085c: ldr r1, [pc, #60] ; 0x80008a0
0x8000860: ldr r2, [pc, #60] ; 0x80008a4
0x8000864: ldr r3, [pc, #60] ; 0x80008a8
0x8000868: cmp r2, r3
0x800086c: ldrls r0, [r1], #4
0x8000870: strls r0, [r2], #4
0x8000874: bls 0x8000868
0x8000878: ldr r1, [pc, #24] ; 0x8000898
0x800087c: ldr r2, [pc, #24] ; 0x800089c
0x8000880: mov r0, #0
0x8000884: cmp r1, r2
0x8000888: strls r0, [r1], #4
0x800088c: bls 0x8000884
0x8000890: b 0x8001870
0x8000894: b 0x8000854
0x8000898: andcs r0, r0, r12, rrx
0x800089c: strhcs r0, [r0], -r4
0x80008a0: stmdaeq r0, {r3, r4, r5, r6, r11, r12}
0x80008a4: andcs r0, r0, r0
0x80008a8: andcs r0, r0, r12, rrx
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
Cannot access memory at address 0x2000ff98
0x0800085c in ?? ()
The first lines are the disassembly of the code, which is the same as my
disassembled elf-file.
Then the run stops with an error-message about the memory-access. The
message is right, the chip only has 8K of RAM. I was looking if the
stackpointer is maybe mis-configured, but I can't find where this happens.
I don't know what the last line means, is that the procedure where the
error happened ?
Any suggestions ?
Thanks in advance,
Koenraad Lelong.
More information about the fpc-pascal
mailing list