**** BEGIN LOGGING AT Wed Jan 31 02:59:59 2007 Jan 31 06:23:26 morning Jan 31 06:23:46 does anybody know how to create absolute code with gnu assambler for ARM9TDMI ? Jan 31 06:26:30 not done that... Jan 31 07:11:06 mhh, well but it have to work Jan 31 08:38:19 you mean 'absolute' as opposed to 'position independent'? Jan 31 09:12:34 vmaster: my problem is, my arm9tdmi won't work correctly Jan 31 09:12:50 i toglle a IO pin until I enter a infinite loop Jan 31 09:13:10 and get every 7us a trigger signal on this IO pin Jan 31 09:13:24 i thought, that it could be a false branch Jan 31 09:13:43 but now, i checked the opcode of the branch an it seems to be correct Jan 31 09:19:34 can you show me the code? Jan 31 09:21:16 sure Jan 31 09:21:27 i'll send you the listing Jan 31 09:23:29 http://rafb.net/p/b7n2vo59.html Jan 31 09:23:55 but a few comments are in german, sorry Jan 31 09:24:33 heh, no problem for me, look at my ip ;) Jan 31 09:26:05 ok, but that's just the assembled object file, right? Jan 31 09:26:48 yes Jan 31 09:27:45 i'm currently build my adapter circuit for jtagkeytiny Jan 31 09:27:48 and how do you process it before you put it on the target? Jan 31 09:28:37 arm-9tdmi-linux-gnu-as -mcpu=arm920t -march=armv4t -EL start.s -o start.o Jan 31 09:28:48 and then i put the start.o to my device via Xmodem Jan 31 09:30:05 using the AT91's built-in bootloader? Jan 31 09:30:13 yes Jan 31 09:30:44 are you sure your file gets run? that's an ELF object file, with a header and all kinds of stuff definitely not suited for execution Jan 31 09:31:32 normally, the next step would be to link that object file, resulting in an ELF executable, which you then run through objcopy to get a "binary", i.e. a memory image Jan 31 09:32:32 the file runs, it toggles the leds Jan 31 09:32:46 but, i think it "restarts" after 7uS Jan 31 09:33:16 vmaster: how does the linking work? Jan 31 09:33:27 maybe thats my fault Jan 31 09:34:29 you're right a file of led.o gets ELF 32-bit LSB relocatable, ARM, version 1 (ARM, not stripped Jan 31 09:38:08 you have to a write a linker script, then run arm-xxx-ld -t Jan 31 09:38:33 ok, thanks Jan 31 10:12:17 vmaster: it seems that it doesn't work Jan 31 10:13:27 http://rafb.net/p/6HXD4M27.html Jan 31 10:16:12 vmaster: i'm such an Idiot Jan 31 10:16:14 it works fine Jan 31 10:16:15 THANKS Jan 31 10:19:53 just a note: you're currently linking at 0x0, but the internal SRAM is located at 0x200000 after a reset Jan 31 10:21:12 you can remap the SRAM to 0x0, but I didn't see that in your code Jan 31 10:21:20 also, the PC is going to be in the 0x20xxxx range Jan 31 10:44:27 so i have to remap or link to 200000 ? Jan 31 10:59:16 well, actually both Jan 31 10:59:47 you have to remap to get RAM at 0x0, were the exception vectors are, otherwise you can't have exception handlers Jan 31 11:01:11 you /could/ link to 0x0, and add a branch instruction that branches from the 0x200000 area to 0x0 (i think it should be -0x200008 as the PC is read as +8) Jan 31 11:01:50 vmaster: atm i wont get exeptions Jan 31 11:02:14 but imho it would be better to have your code run at 0x20000, remap the ram to 0x0 (it's still going to be at 0x200000, too), and copy the exception vectors to 0x0 Jan 31 11:02:32 i linked it to 20000 right now Jan 31 11:02:52 aproemel: even if you have no interrupts you could raise an abort or undef exception Jan 31 11:04:03 so i have to remap, ok Jan 31 11:05:15 at which point on my code you would prefer to remap ? Jan 31 11:06:35 i only have internal memory and external SDRAM Jan 31 11:10:42 you usually set up the exception vectors early during startup Jan 31 11:11:46 if you change your startup code a bit, the remapping gets a lot easier Jan 31 11:12:11 vmaster: i thinkt after download completion the memory is remapped Jan 31 11:13:19 or do i have to remap then manually? Jan 31 11:13:34 ah, ok, just checked the manual, you're right Jan 31 11:13:43 your code is executing from 0x0, and remap already occured Jan 31 11:14:03 but already located at 0x20000 too Jan 31 11:14:43 yeah, the internal SRAM is always at 0x200000, but additionally remapped to 0x0 to hold the exception vectors, and the on-chip bootloader, lets you execute from 0x0 Jan 31 11:15:00 ok, then its correct :-) Jan 31 11:16:09 I'm very confused today :-( Jan 31 11:17:13 heh, yeah, sorry I added to that confusion Jan 31 11:17:26 no problem, you helped me a lot Jan 31 11:18:17 Question for Jtagkey tiny: Amontec gives a windows IDE, GAT and OCD Jan 31 11:18:22 is there a linux one too ? Jan 31 11:22:15 Eclipse is available on linux, i have no idea what "GAT" is, and the OpenOCD works on Linux just fine (I developed it on Linux) Jan 31 11:23:04 ok :-) Jan 31 11:23:59 well im stupod gat = gnu arm toolchain Jan 31 11:24:20 ah, hehe, ok Jan 31 11:24:33 well, as you probably already know that one is available on linux, too Jan 31 11:24:47 :-P yes ^^ **** ENDING LOGGING AT Thu Feb 01 02:59:57 2007