01:57.44 | *** join/#openjtag nm__ (n=nm@203.210.156.91) |
01:57.51 | nm__ | join #oe |
02:20.23 | *** join/#openjtag nm_ (n=nm@203.210.156.91) |
02:20.35 | *** join/#openjtag nm__ (n=nm@203.210.156.91) |
02:57.49 | *** join/#openjtag nm_ (n=nm@222.252.42.172) |
04:32.03 | *** join/#openjtag ubm (n=D1N@cpe-70-114-207-206.houston.res.rr.com) |
06:16.41 | *** join/#openjtag D1N_ (n=D1N@cpe-70-114-207-206.houston.res.rr.com) |
06:22.52 | *** join/#openjtag ubm (n=D1N@cpe-70-114-207-206.houston.res.rr.com) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag AchiestDragon (n=david@whipy.demon.co.uk) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag wookey_ (n=wookey@courthouse.aleph1.co.uk) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag nm (n=hongtd@58.187.131.188) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag LostThePlot (n=david@whipy.demon.co.uk) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag toi_ (n=pleemans@d5152D3B4.access.telenet.be) |
06:22.52 | *** join/#openjtag ka6sox-office (n=ka6sox@nslu2-linux/ka6sox) [NETSPLIT VICTIM] |
06:22.52 | *** join/#openjtag p2-mate (n=p2@cable-87-244-173-194.upc.chello.be) [NETSPLIT VICTIM] |
06:24.01 | *** join/#openjtag D1N__ (n=D1N@cpe-70-114-207-206.houston.res.rr.com) |
06:29.55 | *** join/#openjtag aproemel (n=aproemel@www-cache.bocholt.fh-gelsenkirchen.de) |
07:02.56 | aproemel | good morning |
07:03.04 | aproemel | vmaster_: need your help again |
08:20.17 | *** join/#openjtag rwhitby (n=rwhitby@nslu2-linux/rwhitby) |
08:34.03 | vmaster_ | hey aproemel |
08:34.45 | aproemel | hi :-) |
08:34.55 | aproemel | my problem is, how to debug my code ^^ |
08:35.06 | aproemel | i tried to use eclipse but it failed :-( |
08:36.15 | aproemel | the main problem is, i think that a interrupt won't be serviced |
08:36.51 | aproemel | I used the ATMEL XModem and Tempo Service, the code seemes to be OK |
08:37.25 | aproemel | but if i start the code, the Xmodem Service opens the pipe and then don't print the "C" to DBGU |
08:38.13 | aproemel | if i "halt" the programm with the telnet feature of openocd |
08:38.20 | aproemel | and make step by step debugging |
08:39.28 | aproemel | my programm hangs in the while(1) and should wait there till finish the file transfer |
08:45.02 | vmaster | aproemel: i'll have breakfast and look into your problem in about 20 minutes |
08:45.09 | aproemel | ok, thanks |
09:18.26 | vmaster | aproemel: ok, i've never debugged anything with Eclipse myself - I find it too cumbersome to debug with an IDE |
09:18.45 | aproemel | with which program do you debug ? |
09:18.53 | vmaster | aproemel: I use the plain GDB |
09:19.08 | aproemel | ok |
09:19.32 | vmaster | aproemel: run your arm-xxx-gdb with your application as the only argument |
09:19.51 | aproemel | on my pc? |
09:19.52 | vmaster | aproemel: on the GDB prompt connect to the OpenOCD: target remote localhost:3333 |
09:19.55 | vmaster | aproemel: yeah |
09:20.07 | aproemel | ok |
09:20.21 | aproemel | with the debug informations, i have to build c code with -d or ? |
09:20.33 | vmaster | with -g |
09:22.09 | aproemel | should i upload the file first? |
09:22.15 | aproemel | or first start gdb ? |
09:22.29 | vmaster | you can use the GDB to upload your file, too |
09:22.58 | vmaster | after attaching, just issue the "load" command |
09:23.18 | aproemel | ok, i test it right now |
09:24.22 | aproemel | mhh, do I need the .out or the .bin file for debuggig ? |
09:24.33 | vmaster | the .out |
09:24.40 | aproemel | but i have to upload the bin |
09:24.47 | aproemel | because the .out is too large |
09:25.03 | vmaster | GDB understands the ELF format, and uploads only the sections containing code and data |
09:26.15 | aproemel | Invalid download offset |
09:26.34 | aproemel | maybe my whitespace in my folder name ? |
09:26.47 | vmaster | could you paste the line you entered and the reply? |
09:28.03 | aproemel | works now |
09:28.12 | aproemel | my folder was named "Loader v1" |
09:28.24 | aproemel | and it fails, I renamed it to "Loader_v1" and it works |
09:28.50 | vmaster | lol, ok |
09:29.05 | aproemel | do you have a good howto for plain gdb ? |
09:29.32 | vmaster | i'm sure there are howtos, but i don't know any |
09:29.43 | aproemel | ok, i'll take a look |
09:29.57 | aproemel | thanks a lot :-) |
09:30.03 | vmaster | you have to enter "monitor arm7_9 sw_bkpts enable" to tell the OpenOCD to use software breakpoints |
09:30.35 | vmaster | these are off by default as they occupy one of only two breakpoint units which could be needed for hardware breakpoints |
09:32.28 | vmaster | 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 |
09:33.33 | aproemel | mhh, how do i do it then? |
09:33.42 | vmaster | 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" |
09:34.23 | aproemel | ok |
09:44.43 | aproemel | if i type "continue" the target should run till braikpoint, right ? |
09:47.01 | vmaster | yes |
09:47.22 | vmaster | you can abbreviate almost every command - a single 'c' works, too |
09:48.14 | aproemel | i typed continue and no halt appears |
09:48.17 | aproemel | i set 2 points |
09:48.20 | aproemel | break main |
09:48.36 | aproemel | break AT91F_ST_DBGU_Handler |
09:49.01 | vmaster | type "monitor arm7_9 sw_bkpts" |
09:49.05 | vmaster | what does it say? |
09:49.06 | aproemel | i typed |
09:49.07 | aproemel | load |
09:49.12 | aproemel | monitor ... |
09:49.16 | aproemel | break ... |
09:49.18 | aproemel | break ... |
09:49.20 | aproemel | continue |
09:49.57 | aproemel | now gdb hangs :-( |
09:50.15 | vmaster | uhm, no, it doesn't hang, it's just waiting for something to happen |
09:50.22 | vmaster | you can interrupt it with <ctrl><c> |
09:50.27 | aproemel | ok |
09:50.41 | vmaster | you only get a GDB prompt when the application is halted |
09:51.02 | vmaster | any warnings or errors in the OpenOCD output? |
09:52.13 | aproemel | Error: arm7_9_common.c:1748 arm7_9_read_memory(): memory read caused data abort |
09:53.49 | vmaster | 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 |
09:54.57 | aproemel | step |
09:55.08 | aproemel | cannot find bounds of current function |
09:55.28 | aproemel | I'm currently in my startup.s |
09:56.15 | vmaster | "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 |
09:56.22 | vmaster | step steps into, next steps over |
09:56.57 | aproemel | next works and goes to the nex label |
09:58.55 | aproemel | maybe i know why the continue fails |
09:59.07 | aproemel | on which speed does the target run? |
09:59.15 | vmaster | hum? |
09:59.35 | aproemel | does the prozessor run with 180Mhz like in normal operation mode? |
10:00.19 | vmaster | it operates at whatever it operated before |
10:00.23 | vmaster | GDB doesn't touch any of this |
10:00.51 | aproemel | i though it could be my waitstates in my while() |
11:13.26 | *** join/#openjtag wookey_ (n=wookey@courthouse.aleph1.co.uk) |
11:15.05 | *** join/#openjtag bullet (n=bullet@248.244.62.81.cust.bluewin.ch) |
11:26.09 | *** join/#openjtag wookey_ (n=wookey@courthouse.aleph1.co.uk) |
12:02.36 | *** join/#openjtag aproemel__ (n=aproemel@www-cache.bocholt.fh-gelsenkirchen.de) |
12:07.49 | aproemel__ | vmaster: do you have 5min agein ? |
12:07.54 | aproemel__ | again |
12:09.40 | vmaster | sure |
12:10.20 | aproemel__ | i know why my code wouldn't work if i upload it with jtag |
12:10.43 | aproemel__ | i use the feature of automatically remap at upload with DBGU |
12:11.00 | vmaster | ah, yeah, i remember that |
12:11.12 | aproemel__ | now i'm searching for the failure of not serviced AIC Routine |
12:11.51 | aproemel__ | did you use the ATMEL API for your loader? |
12:13.43 | aproemel__ | I having an interrupt for the "System Timer" and the DBGU |
12:13.59 | aproemel__ | but this wouldn't serviced :-( |
12:14.08 | vmaster | no, the u-boot does all of this itself (and basic at91rm9200 support was already there) |
12:14.28 | vmaster | aproemel__: the ARM9 has a "vector catch register" |
12:14.39 | aproemel__ | but you have to upload uboot to the AT for the first time |
12:15.21 | vmaster | aproemel__: i simply used the OpenOCD's flash feature to write the image to the NOR flash my board had |
12:15.37 | vmaster | aproemel__: you can use the vector catch to trap IRQ and FIQ |
12:15.48 | vmaster | aproemel__: enter "monitor reg" to get a list of registers |
12:16.12 | vmaster | aproemel__: i believe i called the vector catch reg "vec_catch" or something like that |
12:16.31 | vmaster | aproemel__: ah, it's "vector catch" |
12:16.34 | aproemel__ | vmaster: the flash feature i want to use too, but I'm forced to write a DBGU loader :-( |
12:17.11 | vmaster | aproemel__: you can set that registers with "reg #number 0xvalue" |
12:17.25 | aproemel__ | i'll try |
12:18.39 | vmaster | aproemel__: setting it to 0xc0 should catch IRQ and FIQ |
12:24.36 | aproemel__ | vmaster: mhh, i'm looking for the right reg |
12:25.53 | aproemel__ | because i opend the AIC and tell it the service routine for the interrupt |
12:30.26 | aproemel__ | oh, in gdb mode i'll get a Prefetch Abort |
12:36.00 | aproemel__ | without gdb the error wont occure |
12:38.29 | aproemel__ | vmaster: if i wont get the loader working, i'll upload the uboot image with Jtag |
15:06.27 | *** join/#openjtag prpplague (n=dave@12.190.41.146) |
15:56.53 | *** join/#openjtag aproemel (n=aproemel@p508AB51A.dip0.t-ipconnect.de) |
16:50.09 | *** join/#openjtag wookey_ (n=wookey@courthouse.aleph1.co.uk) |
16:52.13 | *** join/#openjtag Bitmaster (n=Bitmaste@c-a361e253.325-1-64736c12.cust.bredbandsbolaget.se) |
18:52.53 | *** join/#openjtag vmaster_ (i=vmaster@p5B07E22E.dip.t-dialin.net) |
19:32.47 | *** join/#openjtag Masterbit (n=Bitmaste@c-a361e253.325-1-64736c12.cust.bredbandsbolaget.se) |
23:01.29 | *** join/#openjtag rwhitby (n=rwhitby@nslu2-linux/rwhitby) |