**** BEGIN LOGGING AT Tue Feb 20 02:59:57 2007 Feb 20 06:29:09 good morning Feb 20 06:29:18 vmaster_: need your help again Feb 20 08:00:17 hey aproemel Feb 20 08:00:58 hi :-) Feb 20 08:01:09 my problem is, how to debug my code ^^ Feb 20 08:01:19 i tried to use eclipse but it failed :-( Feb 20 08:02:28 the main problem is, i think that a interrupt won't be serviced Feb 20 08:03:04 I used the ATMEL XModem and Tempo Service, the code seemes to be OK Feb 20 08:03:38 but if i start the code, the Xmodem Service opens the pipe and then don't print the "C" to DBGU Feb 20 08:04:26 if i "halt" the programm with the telnet feature of openocd Feb 20 08:04:33 and make step by step debugging Feb 20 08:05:41 my programm hangs in the while(1) and should wait there till finish the file transfer Feb 20 08:11:16 aproemel: i'll have breakfast and look into your problem in about 20 minutes Feb 20 08:11:22 ok, thanks Feb 20 08:44:39 aproemel: ok, i've never debugged anything with Eclipse myself - I find it too cumbersome to debug with an IDE Feb 20 08:44:58 with which program do you debug ? Feb 20 08:45:06 aproemel: I use the plain GDB Feb 20 08:45:21 ok Feb 20 08:45:45 aproemel: run your arm-xxx-gdb with your application as the only argument Feb 20 08:46:04 on my pc? Feb 20 08:46:05 aproemel: on the GDB prompt connect to the OpenOCD: target remote localhost:3333 Feb 20 08:46:08 aproemel: yeah Feb 20 08:46:20 ok Feb 20 08:46:34 with the debug informations, i have to build c code with -d or ? Feb 20 08:46:46 with -g Feb 20 08:48:22 should i upload the file first? Feb 20 08:48:28 or first start gdb ? Feb 20 08:48:42 you can use the GDB to upload your file, too Feb 20 08:49:11 after attaching, just issue the "load" command Feb 20 08:49:32 ok, i test it right now Feb 20 08:50:35 mhh, do I need the .out or the .bin file for debuggig ? Feb 20 08:50:46 the .out Feb 20 08:50:53 but i have to upload the bin Feb 20 08:51:00 because the .out is too large Feb 20 08:51:16 GDB understands the ELF format, and uploads only the sections containing code and data Feb 20 08:52:28 Invalid download offset Feb 20 08:52:46 maybe my whitespace in my folder name ? Feb 20 08:53:00 could you paste the line you entered and the reply? Feb 20 08:54:16 works now Feb 20 08:54:25 my folder was named "Loader v1" Feb 20 08:54:37 and it fails, I renamed it to "Loader_v1" and it works Feb 20 08:55:02 lol, ok Feb 20 08:55:18 do you have a good howto for plain gdb ? Feb 20 08:55:45 i'm sure there are howtos, but i don't know any Feb 20 08:55:56 ok, i'll take a look Feb 20 08:56:10 thanks a lot :-) Feb 20 08:56:16 you have to enter "monitor arm7_9 sw_bkpts enable" to tell the OpenOCD to use software breakpoints Feb 20 08:56:48 these are off by default as they occupy one of only two breakpoint units which could be needed for hardware breakpoints Feb 20 08:58:41 when using the GDB for remote debugging you have to know that you can't "run" your application like you would when using the GDB for a local application Feb 20 08:59:45 mhh, how do i do it then? Feb 20 08:59:55 instead you "load" it, which also sets the PC to the application's entry point, and then just "continue" or "step", or "stepi" (single asm instruction) or "next" or "nexti" Feb 20 09:00:36 ok Feb 20 09:10:57 if i type "continue" the target should run till braikpoint, right ? Feb 20 09:13:14 yes Feb 20 09:13:34 you can abbreviate almost every command - a single 'c' works, too Feb 20 09:14:27 i typed continue and no halt appears Feb 20 09:14:30 i set 2 points Feb 20 09:14:33 break main Feb 20 09:14:49 break AT91F_ST_DBGU_Handler Feb 20 09:15:14 type "monitor arm7_9 sw_bkpts" Feb 20 09:15:18 what does it say? Feb 20 09:15:19 i typed Feb 20 09:15:20 load Feb 20 09:15:24 monitor ... Feb 20 09:15:29 break ... Feb 20 09:15:31 break ... Feb 20 09:15:32 continue Feb 20 09:16:10 now gdb hangs :-( Feb 20 09:16:28 uhm, no, it doesn't hang, it's just waiting for something to happen Feb 20 09:16:34 you can interrupt it with Feb 20 09:16:40 ok Feb 20 09:16:54 you only get a GDB prompt when the application is halted Feb 20 09:17:15 any warnings or errors in the OpenOCD output? Feb 20 09:18:26 Error: arm7_9_common.c:1748 arm7_9_read_memory(): memory read caused data abort Feb 20 09:19:50 ok, that one isn't necessarily a problem - when the GDB tries to unwind stack information and reaches the top-level frame it will try to read from bogus addresses Feb 20 09:21:10 step Feb 20 09:21:20 cannot find bounds of current function Feb 20 09:21:41 I'm currently in my startup.s Feb 20 09:22:29 "step" and "next" operate on source lines - when you're in an assembly function you can only use "stepi" and "nexti" to single-step single instructions Feb 20 09:22:35 step steps into, next steps over Feb 20 09:23:10 next works and goes to the nex label Feb 20 09:25:08 maybe i know why the continue fails Feb 20 09:25:20 on which speed does the target run? Feb 20 09:25:28 hum? Feb 20 09:25:48 does the prozessor run with 180Mhz like in normal operation mode? Feb 20 09:26:32 it operates at whatever it operated before Feb 20 09:26:36 GDB doesn't touch any of this Feb 20 09:27:04 i though it could be my waitstates in my while() Feb 20 11:34:01 vmaster: do you have 5min agein ? Feb 20 11:34:06 again Feb 20 11:35:52 sure Feb 20 11:36:32 i know why my code wouldn't work if i upload it with jtag Feb 20 11:36:55 i use the feature of automatically remap at upload with DBGU Feb 20 11:37:12 ah, yeah, i remember that Feb 20 11:37:24 now i'm searching for the failure of not serviced AIC Routine Feb 20 11:38:03 did you use the ATMEL API for your loader? Feb 20 11:39:55 I having an interrupt for the "System Timer" and the DBGU Feb 20 11:40:11 but this wouldn't serviced :-( Feb 20 11:40:20 no, the u-boot does all of this itself (and basic at91rm9200 support was already there) Feb 20 11:40:40 aproemel__: the ARM9 has a "vector catch register" Feb 20 11:40:51 but you have to upload uboot to the AT for the first time Feb 20 11:41:33 aproemel__: i simply used the OpenOCD's flash feature to write the image to the NOR flash my board had Feb 20 11:41:49 aproemel__: you can use the vector catch to trap IRQ and FIQ Feb 20 11:42:01 aproemel__: enter "monitor reg" to get a list of registers Feb 20 11:42:25 aproemel__: i believe i called the vector catch reg "vec_catch" or something like that Feb 20 11:42:43 aproemel__: ah, it's "vector catch" Feb 20 11:42:47 vmaster: the flash feature i want to use too, but I'm forced to write a DBGU loader :-( Feb 20 11:43:23 aproemel__: you can set that registers with "reg #number 0xvalue" Feb 20 11:43:37 i'll try Feb 20 11:44:51 aproemel__: setting it to 0xc0 should catch IRQ and FIQ Feb 20 11:50:48 vmaster: mhh, i'm looking for the right reg Feb 20 11:52:06 because i opend the AIC and tell it the service routine for the interrupt Feb 20 11:56:38 oh, in gdb mode i'll get a Prefetch Abort Feb 20 12:02:12 without gdb the error wont occure Feb 20 12:04:41 vmaster: if i wont get the loader working, i'll upload the uboot image with Jtag **** ENDING LOGGING AT Wed Feb 21 02:59:57 2007