From: Anton F. <AD....@gm...> - 2010-04-02 22:59:54
Attachments:
openocd_a8_mmu.diff
|
Hello, This patch adds MMU support for Cortex A8: + virt2phys() can now convert virtual address to real + read_memory() and write_memory() are renamed to read_phys_memory() and write_phys_memory() + new read_memory() and write_memory() try to resolve real address if mmu is enambled than perform real address reading/writing + if address is bellow 0xc000000 than TTB0 is used for page table dereference, if above - than TTB1. Linux style of user/kernel address separation + if above fails (i.e address is unspecified) than mode is checked whether it is Supervisor (than TTB1) or User (than TTB0) - Software breakpoints doesn't work. You should invoke "gdb_breakpoint_override hard" before you start debugging + cortex_a8_mmu(), cortex_a8_enable_mmu_caches(), cortex_a8_disable_mmu_caches() are implemented This patch is not perfect. It needs at least some cleaning. And it shouldn't be commited in current state. But it works. I've tested it on DevKit8000 with Olimex ARM-USB-TINY. Both MMU disabled u-boot and MMU enabled Linux can be debugged without a problem. Maybe it will help someone. Signed-off-by: Anton Fedotov <AD.Fedotov at gmail.com> |
From: Dirk B. <dir...@go...> - 2010-04-03 10:12:38
|
Hi Anton, On 03.04.2010 09:16, Øyvind Harboe wrote: > Hi Anton, > > I can't look until after easter, but it is great to see some work > done in this area! Yes, great! :) > Hopefully you'll get some good feedback before then and it will > be ready to merge soon, so we can get it tested more widely! It would be nice if you could give some short examples how you tested it. E.g. how to load U-Boot and Linux debugging symbols, how you initialized OpenOCD, where you set breakpoints etc. Maybe you like to just copy & paste the log of an example debugging session? Many thanks for the great work and best regards Dirk |
From: Anton F. <AD....@gm...> - 2010-04-03 12:07:16
|
Hello, Thanks for your replies. Let me tell a few words about debugging emvironment I've used Devkit8000: http://www.armkits.com/Product/devkit8000.asp It came with Linux preinstalled. From user guide I've taken an example program that makes leds blink and cross-compiled it with debug symbols included. I didn't recompile Linux kernel, but I think everything will be the same. I've launched the system this way: 1) Powered on Devkit8000 2) On my linux host launched OpenOCD: sudo openocd -s /usr/local/share/openocd/ -f interface/olimex-jtag-tiny.cfg -f target/omap3530.cfg -d 3 3) On cross-GDB (arm-linux-gnueabi-gdb) entered commands: target remote localhost:3333 monitor gdb_breakpoint_override hard monitor omap3_dbginit omap3530.cpu monitor halt Two last commands can be substituted with "monitor reset halt". Command "monitor gdb_breakpoint_override hard" is critical. It tells gdb to use hardware breakpoints. Now GDB is connected to the device and device is stoped and ready to be debugged. You can use usual GDB commands like: backtrace, break, step, stepi, print, x, ... And also Openocd commands in GDB like: monitor virt2phys, monitor mww, ... I'll attach some logs of debugging session on Monday. Anton 2010/4/3 Dirk Behme <dir...@go...>: > Hi Anton, > > On 03.04.2010 09:16, Øyvind Harboe wrote: >> >> Hi Anton, >> >> I can't look until after easter, but it is great to see some work >> done in this area! > > Yes, great! :) > >> Hopefully you'll get some good feedback before then and it will >> be ready to merge soon, so we can get it tested more widely! > > It would be nice if you could give some short examples how you tested it. > E.g. how to load U-Boot and Linux debugging symbols, how you initialized > OpenOCD, where you set breakpoints etc. Maybe you like to just copy & paste > the log of an example debugging session? > > Many thanks for the great work and best regards > > Dirk > > > |
From: Anton F. <AD....@gm...> - 2010-04-05 09:27:40
Attachments:
openocd.log
gdb.log
|
Hello, Please see logs of OpenOCD and GDB in attached files. Anton Fedotov 2010/4/3 Anton Fedotov <AD....@gm...>: > Hello, > > Thanks for your replies. Let me tell a few words about debugging emvironment > I've used Devkit8000: http://www.armkits.com/Product/devkit8000.asp > It came with Linux preinstalled. From user guide I've taken an example > program that makes leds blink and cross-compiled it with debug symbols > included. I didn't recompile Linux kernel, but I think everything will be the > same. > > I've launched the system this way: > 1) Powered on Devkit8000 > 2) On my linux host launched OpenOCD: > sudo openocd -s /usr/local/share/openocd/ -f > interface/olimex-jtag-tiny.cfg -f target/omap3530.cfg -d 3 > 3) On cross-GDB (arm-linux-gnueabi-gdb) entered commands: > target remote localhost:3333 > monitor gdb_breakpoint_override hard > monitor omap3_dbginit omap3530.cpu > monitor halt > > Two last commands can be substituted with "monitor reset halt". Command > "monitor gdb_breakpoint_override hard" is critical. It tells gdb to use hardware > breakpoints. > > Now GDB is connected to the device and device is stoped and ready to > be debugged. > You can use usual GDB commands like: backtrace, break, step, stepi, > print, x, ... > And also Openocd commands in GDB like: monitor virt2phys, monitor mww, ... > > I'll attach some logs of debugging session on Monday. > > Anton > > 2010/4/3 Dirk Behme <dir...@go...>: >> Hi Anton, >> >> On 03.04.2010 09:16, Øyvind Harboe wrote: >>> >>> Hi Anton, >>> >>> I can't look until after easter, but it is great to see some work >>> done in this area! >> >> Yes, great! :) >> >>> Hopefully you'll get some good feedback before then and it will >>> be ready to merge soon, so we can get it tested more widely! >> >> It would be nice if you could give some short examples how you tested it. >> E.g. how to load U-Boot and Linux debugging symbols, how you initialized >> OpenOCD, where you set breakpoints etc. Maybe you like to just copy & paste >> the log of an example debugging session? >> >> Many thanks for the great work and best regards >> >> Dirk >> >> >> > |
From: Øyvind H. <oyv...@zy...> - 2010-04-11 08:57:03
|
Could you perform the cleanup you would like to have done? I would like to merge these changes so they can see wider testing. -- Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1. http://www.zylin.com/events_rts.html Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer |
From: Anton F. <AD....@gm...> - 2010-04-14 06:50:33
Attachments:
openocd_cortexa8_mmu.diff
|
See updated patch in attach. 2010/4/11 Øyvind Harboe <oyv...@zy...>: > Could you perform the cleanup you would like to have > done? > > I would like to merge these changes so they can see wider > testing. > > > -- > Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1. > http://www.zylin.com/events_rts.html > > Øyvind Harboe > US toll free 1-866-980-3434 / International +47 51 63 25 00 > http://www.zylin.com/zy1000.html > ARM7 ARM9 ARM11 XScale Cortex > JTAG debugger and flash programmer > |
From: Øyvind H. <oyv...@zy...> - 2010-04-14 09:47:40
|
On Wed, Apr 14, 2010 at 6:50 AM, Anton Fedotov <AD....@gm...> wrote: > See updated patch in attach. Merged. Thanks! -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer |
From: Øyvind H. <oyv...@zy...> - 2010-04-03 09:16:27
|
Hi Anton, I can't look until after easter, but it is great to see some work done in this area! Hopefully you'll get some good feedback before then and it will be ready to merge soon, so we can get it tested more widely! -- Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1. http://www.zylin.com/events_rts.html Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer |