This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos 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]

S3c2410x (ARM920T) HAL port -- please help me --


Hi,

<Please look at the previous email (appended below) 1st, forgive me for the long detailed email>

I did further debugging using a JTAG probe & the following is about that:

1. Redboot_ROMRAM was burnt in the Flash & was made to run.
2. I invoked gdb to download hello (elf image of hello.c from /examples): $ arm-elf-gdb hello
3. At the gdb prompt (for gdb alone I am using a Win2K+cygwin setup): (gdb) target remote com1
4. Load the image: (gdb) l
5. Continue (After continue gdb becomes speechless): (gdb) c


At this point gdb send the following packet to the S3c2410x target:
$C0a#d4

Since I have setup a breakpoint (Through JTAG probe & AXD) at __process_packet() case ?S?, ?s?,?C?,?c?, it broke there. As I single stepped through the code, I noted the following:

1. __hexToInt() converted the string to sigval = 0x0a
2. cyg_hal_process_signal() of hal_stub.c got called with sigval = 0x0a. And it returned 0, so sigval got zeroed out.
3. cyg_hal_gdb_break_is_set() of hal_stub.c got called. break_buffer.targetAddr == NULL, so it returned 0.
4. lock_thread_scheduler() got called with 1. _gdb_cont_thread == 0, so it returned at the very beginning
5. Caches were flushed, hal_flush_output() got called & __process_packet() returned control with ?1


I follwed still further & fould that the controller returned to return_from_exception: in Vector.S & when to the background process in the Redoot, where it got interrupted.

I am sure something here is wrong. If you have a clue on this, please let me know.

Questions:
1. I guess the (exception) return stack must have got swapped with the new applications (prepared) stack, upon processing ?$C0a#d4?. So that Control could jump to the loaded application. Am I right? If I am wrong correct me, as how this should happen & if possible point me to relevant documents.
2. If that?s the case then, why I didn?t happen that way? Why didn?t stack swap happen?


Mean while, I will go thought the source & try to figure it out.

Thanks a lot,
-Mike.




-------------------- previous email --------------------------




  From: "Michael Anburaj" <embeddedeng@hotmail.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] S3c2410x (ARM920T) HAL port
Date: Tue, 17 Jun 2003 23:58:51 +0000

Hi,

Thanks everybody for helping me out. My port for the S3c2410x (ARM920T) is kind of working. I got Redboot running & I am able to download code linked for RAM through gdb. But after I issue the continue command, it gets stuck somewhere without a clue. Same is the case even when I set-up a break point at main. This is in reference to the hello.c sample ecos application under /examples.

I tried building a separate code as follows:

ldr r0,=0x56000054
mov r1,#0x0f
str r1,[r0]

b .

Where 0x56000054 is the address of GPFDAT SFR & this GPIO port F is configured as output in Redboot itself & has LEDs connected to pins from GPF:4 through GPF:7. Writing 0x0f to GPFDAT should light all the 4 LEDs.

I compiled & linked in this code for 0x40000. The binary got generated with 0x14 bytes

0xE59F0008 0xE3A0100F 0xE5801000 0xEAFFFFFE
0x56000054

I loaded this at 0x40000 & issued go command. The LEDs did not turn ON.

Redboot debug window:
----------------------------

+
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 20:25:32, Jun 16 2003

Platform: SMDK2410 system (ARM9)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x00fd0000, 0x00027a48-0x00fc4000 available
RedBoot> load -r -m xmodem -b 0x40000
CCCCCCCC Raw file loaded 0x00040000-0x00040013, assumed entry at 0x00040000
xyzModem - CRC mode, 2(SOH)/0(STX)/0(CAN) packets, 10 retries
RedBoot> go 0x40000

Instead of go 0x40000, I tried just the go, still did not work.

So, I guess control never got passed to address 0x40000.
If you have a clue regarding this, please let me know.

I have to get down to more debugging!!


If there is no port available for the S3c2410x (ARM920T) & if Redhat_ecos team is interested in it, I am willing contribution this.


Thanks & Cheers,
-Mike

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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