**** BEGIN LOGGING AT Wed Jun 08 23:59:56 2005 Jun 09 04:53:32 [g2] I am now ready to load data into the I-cache. Hold_Reset works. Jun 09 04:54:04 <[g2]> EXCELLENT Jun 09 04:54:08 <[g2]> congrats Jun 09 04:54:15 thx Jun 09 04:54:23 <[g2]> I'm going to look at that right now Jun 09 04:54:56 <[g2]> it should only be some simple instructions to load immediate the values and then store them Jun 09 04:55:43 No need to setup an MMU ? Jun 09 04:57:50 <[g2]> nope not to start with from my simple understanding Jun 09 04:58:22 right, most likely disabled after reset Jun 09 04:59:18 <[g2]> ep1220, I'm going to look APEX led blinking now Jun 09 04:59:32 <[g2]> rwhitby, welcome Jun 09 05:00:29 [g2] If Your time is tight: a hint at which source file to look might be enough help Jun 09 05:02:28 <[g2]> ep1220, we can look at it together Jun 09 05:02:41 <[g2]> your got the latest APEX 1.2.11 iirc ? Jun 09 05:03:15 I do have 1.2.9. Jun 09 05:03:32 <[g2]> the LED code is probably the same Jun 09 05:03:51 <[g2]> you'll want to pickup 1.2.11 when you want to run APEX Jun 09 05:05:00 just looking at the ftp Jun 09 05:07:12 1.2.12 is the latest version there Jun 09 05:07:35 <[g2]> I'd go with 1.2.11 Jun 09 05:07:46 <[g2]> 1.2.12 probably has test code for jffs2 Jun 09 05:08:11 <[g2]> I haven't checked the readme but beewoolie was working on that last night Jun 09 05:08:25 the server says: max users already logged in Jun 09 05:08:41 let us see how far we get with 1.2.9 (?) Jun 09 05:08:50 <[g2]> next he'll be trying to load the kernel from within the jffs fs Jun 09 05:08:58 <[g2]> sure Jun 09 05:09:18 <[g2]> I'm looking at 1.2.11 I'm sure the ftp server will be free in a few minutes Jun 09 05:09:41 I am in, downloading now Jun 09 05:10:44 have 1.2.11 and 1.2.12 Jun 09 05:10:51 we stick to 1.2.11 ? Jun 09 05:10:52 <[g2]> in 1.2.11 Jun 09 05:10:55 <[g2]> nod Jun 09 05:11:20 i am rdy Jun 09 05:11:54 <[g2]> In src/mach-ixp42x/nslu2.h I think that where the LED macro is Jun 09 05:12:29 see this Jun 09 05:13:58 <[g2]> #define GPIO_PHYS (0xc8004000) Jun 09 05:13:59 <[g2]> #define GPIO_OUTR __REG(GPIO_PHYS + 0x00) Jun 09 05:15:03 <[g2]> I haven't coded ARM assembler yet, but I've coded lost of other assembers Jun 09 05:16:48 I think I have a starting point now. I'l grep for these consts and see how they are used. Jun 09 05:17:08 In case i get stuck I check if You only here :-) Jun 09 05:17:51 s/only/on-line/ Jun 09 05:18:43 <[g2]> ok... I'll be looking up the instructions or seeing if an ARM assember guru jacques mentioned is in #oe Jun 09 05:19:45 <[g2]> ep1220, sorry I didn't have this ready Jun 09 05:19:54 nP Jun 09 05:22:53 [g2], RP also knows arm assembler quite well I think Jun 09 05:29:41 <[g2]> jacques, THX Jun 09 05:30:07 <[g2]> I just whipped up the C function and I was going to dump the object Jun 09 05:31:17 Coming out of reset: is the ixp420 little or big endian ? Jun 09 05:31:56 <[g2]> ep1220, It reads the pull ups/down on the extention bus Jun 09 05:32:06 <[g2]> iirc there's a bit in there Jun 09 05:32:16 <[g2]> In our case I think that's set for BE Jun 09 05:32:41 <[g2]> Ok I think I've got the machine code Jun 09 05:32:51 <[g2]> but I'd need to verify the instructions Jun 09 05:33:19 You can look at the intermediary assembly file. Jun 09 05:33:57 <[g2]> nod.. I just need to change the compile options Jun 09 05:36:37 i will be back in 20 minutes Jun 09 05:36:45 <[g2]> ok Jun 09 05:57:39 <[g2]> here's the C code: Jun 09 05:57:42 <[g2]> void __section (.bootstrap) led_flash (void) { Jun 09 05:57:42 <[g2]> _L(LED1); Jun 09 05:57:42 <[g2]> _L(LED2); Jun 09 05:57:42 <[g2]> _L(LED3); Jun 09 05:57:42 <[g2]> _L(LED4); Jun 09 05:57:43 <[g2]> _L(LED6); Jun 09 05:57:45 <[g2]> while (1) { ; } Jun 09 05:57:49 <[g2]> } Jun 09 05:58:18 <[g2]> The assembler looks like Jun 09 05:58:22 <[g2]> .align 2 Jun 09 05:58:22 <[g2]> .global led_flash Jun 09 05:58:22 <[g2]> .type led_flash, %function Jun 09 05:58:22 <[g2]> led_flash: Jun 09 05:58:22 <[g2]> .LFB3: Jun 09 05:58:23 <[g2]> .loc 1 103 0 Jun 09 05:58:25 <[g2]> @ args = 0, pretend = 0, frame = 0 Jun 09 05:58:27 <[g2]> @ frame_needed = 0, uses_anonymous_args = 0 Jun 09 05:58:29 <[g2]> @ link register save eliminated. Jun 09 05:58:31 <[g2]> .LBB2: Jun 09 05:58:33 <[g2]> .loc 1 104 0 Jun 09 05:58:35 <[g2]> ldr r2, .L7 Jun 09 05:58:37 <[g2]> .LBE2: Jun 09 05:58:39 <[g2]> .loc 1 103 0 Jun 09 05:58:41 <[g2]> @ lr needed for prologue Jun 09 05:58:43 <[g2]> .LBB3: Jun 09 05:58:45 <[g2]> .loc 1 104 0 Jun 09 05:58:49 <[g2]> ldr r3, [r2, #0] Jun 09 05:58:51 <[g2]> bic r3, r3, #15 Jun 09 05:58:53 <[g2]> orr r3, r3, #14 Jun 09 05:58:55 <[g2]> str r3, [r2, #0] Jun 09 05:58:57 <[g2]> .LBE3: Jun 09 05:58:59 <[g2]> where L7 is Jun 09 05:59:01 <[g2]> .align 2 Jun 09 05:59:03 <[g2]> .L7: Jun 09 05:59:05 <[g2]> .word -939507712 Jun 09 05:59:13 <[g2]> or Jun 09 05:59:20 <[g2]> 0xC8004000 Jun 09 05:59:54 <[g2]> there are some other LED changes and then Jun 09 06:00:11 <[g2]> .LBB7: Jun 09 06:00:11 <[g2]> .loc 1 108 0 Jun 09 06:00:11 <[g2]> ldr r3, [r2, #0] Jun 09 06:00:11 <[g2]> bic r3, r3, #15 Jun 09 06:00:11 <[g2]> orr r3, r3, #9 Jun 09 06:00:12 <[g2]> str r3, [r2, #0] Jun 09 06:00:14 <[g2]> .L5: Jun 09 06:00:16 <[g2]> .LBE7: Jun 09 06:00:20 <[g2]> .loc 1 109 0 Jun 09 06:00:22 <[g2]> b .L5 Jun 09 06:00:26 <[g2]> The "classic" loop forever :) Jun 09 06:01:51 just back. Jun 09 06:01:54 Thx. Jun 09 06:02:25 <[g2]> I think the ldr should be changed to an immediate load Jun 09 06:02:30 I beleive this code does not setup in/out directions of the GPIO pins (?) Jun 09 06:03:24 <[g2]> It may not, or it may be implicit in the register by the value that's getting written Jun 09 06:03:37 <[g2]> I haven't looked closely enough yet Jun 09 06:03:53 ixp has a separate reg for the direction. Jun 09 06:04:48 but i believe i can sort this out myself. Jun 09 06:05:00 do not want to distract You from regular work Jun 09 06:05:32 <[g2]> I'm trying to make this my "regular work" :) Jun 09 06:06:15 good idea :-) Jun 09 06:06:47 <[g2]> after I make it my "regular work" I'll try and do the same for others Jun 09 06:07:45 <[g2]> I'm very close to havin a development kit all ready Jun 09 06:12:55 <[g2]> GPIO_ER &= ~0xf; /* Enable LEDs as outputs */ Jun 09 06:13:33 <[g2]> ixp42x.h:#define GPIO_ER __REG(GPIO_PHYS + 0x04) Jun 09 06:15:30 now only missing the inital value of GPIO_ER Jun 09 06:15:46 or i make all other pins inputs (?) Jun 09 06:15:54 <[g2]> &= just and it with 0xf Jun 09 06:16:43 i know, but the line does not tell me the value of the other bits. Jun 09 06:17:20 <[g2]> that's ~0xf Jun 09 06:17:33 <[g2]> so it's FFFFFFF0 Jun 09 06:18:12 IMO: this clears the 4 LSBs and leaves the others unchanged. Jun 09 06:18:22 <[g2]> right Jun 09 06:18:32 so must haev been inited before. Jun 09 06:18:58 <[g2]> or the default value is output for our LEDs from the processor reset Jun 09 06:20:07 resetvalue of GPOER is 0x7FFF - all 15 are input Jun 09 06:20:39 <[g2]> and we are clearing the bottom 4 right ? Jun 09 06:20:53 <[g2]> GPIO 0 through 3 right Jun 09 06:21:03 right, GPIO15 is an output (driving a clock) Jun 09 06:21:19 <[g2]> well not yet :) Jun 09 06:21:39 It is an output rigth after reset Jun 09 06:22:24 http://www.nslu2-linux.org/wiki/Info/GPIOConnections tells all we need to know Jun 09 06:23:24 <[g2]> nod. Jun 09 06:23:41 <[g2]> I was looking in the kernel patches, but that tells the same story Jun 09 06:23:42 <[g2]> :) Jun 09 06:23:59 GPIO8 is interesting. Jun 09 06:24:07 <[g2]> that's the power off Jun 09 06:24:17 so better set to 0 .. Jun 09 06:24:44 else the test will not run long :-) Jun 09 06:26:03 good: GPOUTR is 0 at reset Jun 09 06:26:28 <[g2]> for the slug BitBanger we could grap GPIOs 0-4 it seems Jun 09 06:29:56 sorry, another IRQ; back in approx. 30 min Jun 09 06:30:49 <[g2]> np Jun 09 07:11:39 g2: ping Jun 09 07:22:14 <[g2]> ep1220, pong Jun 09 07:26:32 any progress ? Jun 09 07:27:00 <[g2]> on the code ? Jun 09 07:27:07 yes. Jun 09 07:27:24 I wrote something, but have no ARM5Te/THUMB asm installed yet Jun 09 07:27:48 <[g2]> Ah... Jun 09 07:28:27 Do You know were I can download a precompiled gas ? Jun 09 07:28:44 it's included with gcc Jun 09 07:29:02 <[g2]> ep1220, is it just one or two files ? Jun 09 07:29:29 1 Jun 09 07:29:48 <[g2]> can you post it or e-mail it to me ? Jun 09 07:31:49 <[g2]> I've got the cross-tool armv5 built and can just assemble it Jun 09 08:18:03 <[g2]> ep1220, I'll send an e-mail to beewoolie to double check that output Jun 09 08:18:24 <[g2]> I'll also probably try loading via redboot Jun 09 08:18:29 <[g2]> and executing it Jun 09 08:40:55 <[g2]-away> off to lunch Jun 09 11:25:59 ~seen beewoolie Jun 09 11:25:59 beewoolie <~beewoolie@florence.buici.com> was last seen on IRC in channel #openjtag, 4d 1h 41m 55s ago, saying: 'jacques: ping.'. Jun 09 11:26:25 add Jun 09 11:26:26 odd Jun 09 11:26:32 beewoolie was here yesterday Jun 09 11:43:49 ~seen beewoolie-afk Jun 09 11:43:50 beewoolie-afk <~beewoolie@florence.buici.com> was last seen on IRC in channel #openjtag, 14d 26m 46s ago, saying: 'prpplague: hey man'. Jun 09 11:43:54 ~seen beewoolie-away Jun 09 11:43:55 beewoolie-away <~beewoolie@florence.buici.com> was last seen on IRC in channel #openjtag, 42d 13h 6m 12s ago, saying: 'ka6sox-away: what you guys got cookin?'. Jun 09 13:04:27 <[g2]-away> ep1220, I ran the program from Redboot Jun 09 13:04:36 and ? Jun 09 13:04:40 <[g2]-away> it didn't have the proper response Jun 09 13:04:59 it also did not work in the cache :-( Jun 09 13:05:00 <[g2]-away> I seems to run, but the all the LEDS go off Jun 09 13:05:37 <[g2]-away> then we are in a hard loop Jun 09 13:06:04 <[g2]-away> did the LEDs go off for you also ? Jun 09 13:06:25 Yes , but they also go off when I just assert reset Jun 09 13:06:43 <[g2]-away> ahh... Jun 09 13:06:52 <[g2]-away> we need to get them to come back on :) Jun 09 13:07:03 yea Jun 09 13:07:57 I just see: GPIO2 and 3 should be set to 0 for LEDs on !! Jun 09 13:08:18 GPIO0 and 1 are 1 for LED on Jun 09 13:09:03 <[g2]-away> So are mov could be a 0x0003 instead of 0x00c0 ? Jun 09 13:09:11 <[g2]-away> s/could/should Jun 09 13:09:37 this should turn on all 4 LEDs Jun 09 13:10:44 <[g2]-away> make that 0x1F03 Jun 09 13:11:34 1F sets GPIO8 to 1 -> means power off Jun 09 13:11:38 <[g2]-away> no I take that back Jun 09 13:12:17 <[g2]-away> it should be 0x1E0F and 0x0003 Jun 09 13:12:20 <[g2]-away> correct ? Jun 09 13:13:22 looks better; do we have to set the inputs to 1 ? I think just 0x3 should suffice. Jun 09 13:26:11 <[g2]-away> ep1220, I'll have to look at it some more tonight Jun 09 13:26:28 OK. Jun 09 13:26:34 <[g2]-away> I'll be doing that later (5-6 hours from now) Jun 09 13:26:48 <[g2]-away> I'll send you an email with status Jun 09 13:26:55 <[g2]-away> after I finish Jun 09 13:26:57 <[g2]-away> Ok ? Jun 09 13:27:09 Very good. maybe also verify if the CPU starts at bigEndian. Jun 09 13:27:20 <[g2]-away> :) Jun 09 13:28:00 I saw in APEX entry.c a Switch to Big Endian (conditionally). Maybe we some instructions .. Jun 09 17:00:16 <[g2]> FYI on the IXP420 this code runs from redboot Jun 09 17:00:21 <[g2]> as -al icache.S -o icache.o Jun 09 17:00:21 <[g2]> ARM GAS icache.S page 1 Jun 09 17:00:21 <[g2]> 1 .section text Jun 09 17:00:21 <[g2]> 2 .align 0 Jun 09 17:00:21 <[g2]> 3 Jun 09 17:00:22 <[g2]> 4 init: Jun 09 17:00:24 <[g2]> 5 0000 E3A01332 mov r1, #0xC8000000 @ Setup the GPIO address in R1 0xC8004000 Jun 09 17:00:26 <[g2]> 6 0004 E3A02901 mov r2, #0x4000 @ Load 0x40.. Jun 09 17:00:28 <[g2]> 7 0008 E1822001 orr r2, r2, r1 @ R2 should now contain 0xC8004000 Jun 09 17:00:34 <[g2]> 8 000c E3A00CFF mov r0, #0xff00 @ We forgot to invert last time :) Jun 09 17:00:36 <[g2]> 9 0010 E38000F0 orr r0, r0, #0xf0 Jun 09 17:00:38 <[g2]> 10 0014 E5820004 str r0, [r2,#4] @ Store it a GPIO_ER Jun 09 17:00:40 <[g2]> 11 0018 E3A00003 mov r0, #0x0003 @ Light up GPIOs 2-3 (DISK 1 and 2) Jun 09 17:00:44 <[g2]> 12 001c E5820000 str r0, [r2,#0] @ Set them Jun 09 17:00:46 <[g2]> 13 loop: Jun 09 17:00:48 <[g2]> 14 0020 EA000006 b loop @ Loop forever **** ENDING LOGGING AT Thu Jun 09 23:59:57 2005