From raul.moreno at telvent.com Wed Oct 1 12:30:26 2008 From: raul.moreno at telvent.com (raul.moreno at telvent.com) Date: Wed, 1 Oct 2008 14:30:26 +0200 Subject: Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 Message-ID: Hi everybody! Currently I have two different problem, but both related to the debugging. I am using a M5484Lite EVB. I downloaded the Sourcery G++ Lite 4.2-125 toolchain and I want to use Linux as the operating system, so I use the m68k-linux-gnu- commands. I know it sounds weird, but the team works in Windows. We installed the Eclipse on Windows, in spite of developing to a Linux target. We followed as a guide a pair of example I found in internet about how to add a CDT plug to Eclipse (document "Open source Coldfire IDE" and "ARM cross development with GNU Toolchain and Eclipse"). Here the problem goes: 1. Applications debug. First of all I have to say I have been able to debug a simple application! But I still have a doubt about the libraries. I use the gdbserver in the target and m68k-linux-gnu-gdb in the host. Next I show what appears in the console: 189-gdb-set confirm off 189^done (gdb) 190-gdb-set width 0 190^done (gdb) 191-gdb-set height 0 191^done 192-interpreter-exec console echo (gdb) 192^done (gdb) 193-gdb-show prompt 193^done,value="(gdb) " (gdb) 194 set solib-absolute-prefix C:\\Toolchain_CodeSourcery\\m68k-linux-gnu\\libc\\usr\\lib &"set solib-absolute-prefix C:\\\\Toolchain_CodeSourcery\\\\m68k-linux-gnu\\\\libc\\\\usr\\\\lib \n" set solib-absolute-prefix C:\Toolchain_CodeSourcery\m68k-linux-gnu\libc\usr\lib 194^done 195 set remote exec-file Hello.elf (gdb) &"set remote exec-file Hello.elf \n" 195^done set remote exec-file Hello.elf 196 target remote 172.19.134.100:2345 (gdb) &"target remote 172.19.134.100:2345\n" target remote 172.19.134.100:2345 ~"[New Thread 206]\n" [New Thread 206] warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. &"warning: Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code." &"\n" ~"0x80005cdc in ?? ()\n" 0x80005cdc in ?? () 196^done 197-stack-list-frames (gdb) 197^done,stack=[frame={level="0",addr="0x80005cdc",func="??"},frame={level="1",addr="0x00000001",func="??"},frame={level="2",addr="0xbfe9df6d",func="??"},frame={level="3",addr="0x00000000",func="??"}] ... 217 c &"c\n" c &"Error while mapping shared library sections:\n" &"/lib/libc.so.6: No such file or directory.\n" Error while mapping shared library sections: /lib/libc.so.6: No such file or directory. Error while mapping shared library sections: &"Error while mapping shared library sections:\n" &"/lib/ld.so.1: No such file or directory.\n" /lib/ld.so.1: No such file or directory. ~"\nBreakpoint " Breakpoint ~"1, main (arg=1, argv=0xbfe9dec4) at main.c:15\n" 1, main (arg=1, argv=0xbfe9dec4) at main.c:15 ~"15\t\tint a = 2;\n" 15 int a = 2; 217^done ... Red lines show the probems I've got. I thought I would solve the first red errors using "set solib-absolute-prefix" or "set sysroot", but it didn't. I am not sure if it just says I can't debug the shared libraries. The second one I don't know what it means (error mapping libraries???). However, I can debug right. 2. Linux kernel debug. First I try to to debug the Linux kernel from the command-line and after that I'll try to do it with Eclipse. I continue working on Windows, although if it was completely necessary, I would do on Linux, only for the kernel. I have a P&E Parallel Port Cable BDM and a USBMultilink and it seems, both work: C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-sprite.exe -i CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-125) pe: [speed=&memory-timeout=] P&E Adaptor pe://USBMultilink/PE6015776 - USB1 : USB-ML-CF Rev C (PE6015776) pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) ccs: [timeout=&speed=] CCS Adaptor ccs://$Host:$Port/$Chain_position - CCS address tblcf: TBLCF Interface I am trying with the parallel one. I create the xml for my board m5484Liteevb.xml: 64MBytes DDR SDRAM 4KBytes Internal SRAM 4KBytes Internal SRAM 4MBytes External BootFlash, 16bit wide Next C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-gdb.exe C:\\Proyectos\\workspace_Ec lipseCF\\Linux_kernel\\vmlinux GNU gdb (Sourcery G++ Lite 4.2-125) 6.7.50.20080107-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-mingw32 --target=m68k-linux-gnu". For bug reporting instructions, please see: . .. <-linux-gnu-sprite.exe pe://ParallelPortCable m5484Liteevb Remote debugging using | m68k-linux-gnu-sprite.exe pe://ParallelPortCable m5484L iteevb m68k-linux-gnu-sprite: Opening P&E ParallelPortCable port 1 (LPT1 : Parallel Por t 1 (Address $0378)) m68k-linux-gnu-sprite: Target reset 0x00000000 in ?? () (gdb) load Loading section .text.head, size 0x102a lma 0x20000 Loading section .text, size 0x1a1512 lma 0x2102c Loading section .cpuinit.text, size 0xa26 lma 0x1c2540 Loading section .meminit.text, size 0x1aa lma 0x1c2f66 Loading section __ex_table, size 0x26d0 lma 0x1c3110 Loading section .rodata, size 0x4a943 lma 0x1c6000 Loading section .pci_fixup, size 0x580 lma 0x210944 Loading section __ksymtab, size 0x3ee8 lma 0x210ec4 Loading section __ksymtab_gpl, size 0x14f0 lma 0x214dac Loading section __ksymtab_strings, size 0xb172 lma 0x21629c Loading section __param, size 0xbf0 lma 0x221410 Loading section .data, size 0x10b40 lma 0x222000 Loading section .cpuinit.data, size 0x32 lma 0x232b40 Loading section .meminit.data, size 0xc lma 0x232b72 Loading section .data.cacheline_aligned, size 0xb0 lma 0x232b80 Loading section .notes, size 0x24 lma 0x232c30 Loading section .init.text, size 0x1223e lma 0x234000 Loading section .init.data, size 0x168c lma 0x24623e Loading section .init.setup, size 0x264 lma 0x2478d0 Loading section .initcall.init, size 0x1f4 lma 0x247b34 Loading section .con_initcall.init, size 0x8 lma 0x247d28 Loading section .init.ramfs, size 0x86 lma 0x248000 Loading section .data.init_task, size 0x2000 lma 0x24a000 Start address 0x20000, load size 2261467 Transfer rate: 6 KB/sec, 7463 bytes/write. (gdb) break start_kernel Breakpoint 1 at 0x2347f8: file init/main.c, line 512. (gdb) l 1 init/main.c: No such file or directory. in init/main.c (gdb) c Continuing. Breakpoint 1, start_kernel () at init/main.c:512 512 in init/main.c (gdb) c Continuing. m68k-linux-gnu-sprite: error: Hardware device not ready Error from remote target: Hardware device not ready (gdb) You can see at the beginning it seems that all is OK, but after loading the image in RAM, I try to debug but the main.c is not found. I also tried to debug with Eclipse, but an error occurs. Could you help with these problems? Thanks in advance and sorry for the long message. Ra?l Moreno ***********Internet Email Confidentiality Footer************* This email and any files transmitted with it are confidential and intended solely for the use of the organization or individual to whom they are addressed. It is expressly forbidden to retransmit or copy email and/or this attached files without our permission . If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. From Tom.Malnar at christiedigital.com Wed Oct 1 22:14:56 2008 From: Tom.Malnar at christiedigital.com (Malnar, Tom) Date: Wed, 1 Oct 2008 18:14:56 -0400 Subject: [coldfire-gnu-discuss] Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 In-Reply-To: Message-ID: <0384B41A03232C45B676D09A0173AB1EED4AA3@cdskitexg01.cds.int> We are doing the same thing with windows, eclipse and GDB. We ran into the same issue and the set solib-absolute-prefix fixed us. Looking at your line you point to your libs source directory. I believe the shared libraries use the root as a starting path in the debugger (I may be wrong). We set "solib-absolute-prefix" to our root directory. These are indicating your path is wrong and I think its assuming root because of the '/lib': &"Error while mapping shared library sections:\n" &"/lib/libc.so.6: No such file or directory.\n" Error while mapping shared library sections: /lib/libc.so.6: No such file or directory. Error while mapping shared library sections: &"Error while mapping shared library sections:\n" &"/lib/ld.so.1: No such file or directory.\n" /lib/ld.so.1: No such file or directory. Try changing the path followed by the gdb command "info shared" to see if it found the libraries. -----Original Message----- From: raul.moreno at telvent.com [mailto:raul.moreno at telvent.com] Sent: Wednesday, October 01, 2008 8:30 AM To: coldfire-gnu-discuss at codesourcery.com Subject: [coldfire-gnu-discuss] Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 Hi everybody! Currently I have two different problem, but both related to the debugging. I am using a M5484Lite EVB. I downloaded the Sourcery G++ Lite 4.2-125 toolchain and I want to use Linux as the operating system, so I use the m68k-linux-gnu- commands. I know it sounds weird, but the team works in Windows. We installed the Eclipse on Windows, in spite of developing to a Linux target. We followed as a guide a pair of example I found in internet about how to add a CDT plug to Eclipse (document "Open source Coldfire IDE" and "ARM cross development with GNU Toolchain and Eclipse"). Here the problem goes: 1. Applications debug. First of all I have to say I have been able to debug a simple application! But I still have a doubt about the libraries. I use the gdbserver in the target and m68k-linux-gnu-gdb in the host. Next I show what appears in the console: 189-gdb-set confirm off 189^done (gdb) 190-gdb-set width 0 190^done (gdb) 191-gdb-set height 0 191^done 192-interpreter-exec console echo (gdb) 192^done (gdb) 193-gdb-show prompt 193^done,value="(gdb) " (gdb) 194 set solib-absolute-prefix C:\\Toolchain_CodeSourcery\\m68k-linux-gnu\\libc\\usr\\lib &"set solib-absolute-prefix C:\\\\Toolchain_CodeSourcery\\\\m68k-linux-gnu\\\\libc\\\\usr\\\\lib \n" set solib-absolute-prefix C:\Toolchain_CodeSourcery\m68k-linux-gnu\libc\usr\lib 194^done 195 set remote exec-file Hello.elf (gdb) &"set remote exec-file Hello.elf \n" 195^done set remote exec-file Hello.elf 196 target remote 172.19.134.100:2345 (gdb) &"target remote 172.19.134.100:2345\n" target remote 172.19.134.100:2345 ~"[New Thread 206]\n" [New Thread 206] warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. &"warning: Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code." &"\n" ~"0x80005cdc in ?? ()\n" 0x80005cdc in ?? () 196^done 197-stack-list-frames (gdb) 197^done,stack=[frame={level="0",addr="0x80005cdc",func="??"},frame={level="1",addr="0x00000001",func="??"},frame={level="2",addr="0xbfe9df6d",func="??"},frame={level="3",addr="0x00000000",func="??"}] ... 217 c &"c\n" c &"Error while mapping shared library sections:\n" &"/lib/libc.so.6: No such file or directory.\n" Error while mapping shared library sections: /lib/libc.so.6: No such file or directory. Error while mapping shared library sections: &"Error while mapping shared library sections:\n" &"/lib/ld.so.1: No such file or directory.\n" /lib/ld.so.1: No such file or directory. ~"\nBreakpoint " Breakpoint ~"1, main (arg=1, argv=0xbfe9dec4) at main.c:15\n" 1, main (arg=1, argv=0xbfe9dec4) at main.c:15 ~"15\t\tint a = 2;\n" 15 int a = 2; 217^done ... Red lines show the probems I've got. I thought I would solve the first red errors using "set solib-absolute-prefix" or "set sysroot", but it didn't. I am not sure if it just says I can't debug the shared libraries. The second one I don't know what it means (error mapping libraries???). However, I can debug right. 2. Linux kernel debug. First I try to to debug the Linux kernel from the command-line and after that I'll try to do it with Eclipse. I continue working on Windows, although if it was completely necessary, I would do on Linux, only for the kernel. I have a P&E Parallel Port Cable BDM and a USBMultilink and it seems, both work: C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-sprite.exe -i CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-125) pe: [speed=&memory-timeout=] P&E Adaptor pe://USBMultilink/PE6015776 - USB1 : USB-ML-CF Rev C (PE6015776) pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) ccs: [timeout=&speed=] CCS Adaptor ccs://$Host:$Port/$Chain_position - CCS address tblcf: TBLCF Interface I am trying with the parallel one. I create the xml for my board m5484Liteevb.xml: 64MBytes DDR SDRAM 4KBytes Internal SRAM 4KBytes Internal SRAM 4MBytes External BootFlash, 16bit wide Next C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-gdb.exe C:\\Proyectos\\workspace_Ec lipseCF\\Linux_kernel\\vmlinux GNU gdb (Sourcery G++ Lite 4.2-125) 6.7.50.20080107-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-mingw32 --target=m68k-linux-gnu". For bug reporting instructions, please see: . .. <-linux-gnu-sprite.exe pe://ParallelPortCable m5484Liteevb Remote debugging using | m68k-linux-gnu-sprite.exe pe://ParallelPortCable m5484L iteevb m68k-linux-gnu-sprite: Opening P&E ParallelPortCable port 1 (LPT1 : Parallel Por t 1 (Address $0378)) m68k-linux-gnu-sprite: Target reset 0x00000000 in ?? () (gdb) load Loading section .text.head, size 0x102a lma 0x20000 Loading section .text, size 0x1a1512 lma 0x2102c Loading section .cpuinit.text, size 0xa26 lma 0x1c2540 Loading section .meminit.text, size 0x1aa lma 0x1c2f66 Loading section __ex_table, size 0x26d0 lma 0x1c3110 Loading section .rodata, size 0x4a943 lma 0x1c6000 Loading section .pci_fixup, size 0x580 lma 0x210944 Loading section __ksymtab, size 0x3ee8 lma 0x210ec4 Loading section __ksymtab_gpl, size 0x14f0 lma 0x214dac Loading section __ksymtab_strings, size 0xb172 lma 0x21629c Loading section __param, size 0xbf0 lma 0x221410 Loading section .data, size 0x10b40 lma 0x222000 Loading section .cpuinit.data, size 0x32 lma 0x232b40 Loading section .meminit.data, size 0xc lma 0x232b72 Loading section .data.cacheline_aligned, size 0xb0 lma 0x232b80 Loading section .notes, size 0x24 lma 0x232c30 Loading section .init.text, size 0x1223e lma 0x234000 Loading section .init.data, size 0x168c lma 0x24623e Loading section .init.setup, size 0x264 lma 0x2478d0 Loading section .initcall.init, size 0x1f4 lma 0x247b34 Loading section .con_initcall.init, size 0x8 lma 0x247d28 Loading section .init.ramfs, size 0x86 lma 0x248000 Loading section .data.init_task, size 0x2000 lma 0x24a000 Start address 0x20000, load size 2261467 Transfer rate: 6 KB/sec, 7463 bytes/write. (gdb) break start_kernel Breakpoint 1 at 0x2347f8: file init/main.c, line 512. (gdb) l 1 init/main.c: No such file or directory. in init/main.c (gdb) c Continuing. Breakpoint 1, start_kernel () at init/main.c:512 512 in init/main.c (gdb) c Continuing. m68k-linux-gnu-sprite: error: Hardware device not ready Error from remote target: Hardware device not ready (gdb) You can see at the beginning it seems that all is OK, but after loading the image in RAM, I try to debug but the main.c is not found. I also tried to debug with Eclipse, but an error occurs. Could you help with these problems? Thanks in advance and sorry for the long message. Ra?l Moreno ***********Internet Email Confidentiality Footer************* This email and any files transmitted with it are confidential and intended solely for the use of the organization or individual to whom they are addressed. It is expressly forbidden to retransmit or copy email and/or this attached files without our permission . If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. From raul.moreno at telvent.com Thu Oct 2 08:17:52 2008 From: raul.moreno at telvent.com (raul.moreno at telvent.com) Date: Thu, 2 Oct 2008 10:17:52 +0200 Subject: [coldfire-gnu-discuss] Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 In-Reply-To: <0384B41A03232C45B676D09A0173AB1EED4AA3@cdskitexg01.cds.int> Message-ID: You're right, Tom. Thanks. That fixed the libraries problem, but what about debugging the kernel? Did you try and get it? Ra?l Moreno "Malnar, Tom" "Malnar, Tom" 02/10/2008 00:14 Para: , cc: Asunto: RE: [coldfire-gnu-discuss] Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 We are doing the same thing with windows, eclipse and GDB. We ran into the same issue and the set solib-absolute-prefix fixed us. Looking at your line you point to your libs source directory. I believe the shared libraries use the root as a starting path in the debugger (I may be wrong). We set "solib-absolute-prefix" to our root directory. These are indicating your path is wrong and I think its assuming root because of the '/lib': &"Error while mapping shared library sections:\n" &"/lib/libc.so.6: No such file or directory.\n" Error while mapping shared library sections: /lib/libc.so.6: No such file or directory. Error while mapping shared library sections: &"Error while mapping shared library sections:\n" &"/lib/ld.so.1: No such file or directory.\n" /lib/ld.so.1: No such file or directory. Try changing the path followed by the gdb command "info shared" to see if it found the libraries. -----Original Message----- From: raul.moreno at telvent.com [mailto:raul.moreno at telvent.com] Sent: Wednesday, October 01, 2008 8:30 AM To: coldfire-gnu-discuss at codesourcery.com Subject: [coldfire-gnu-discuss] Linux debug with P&E BDM - Toolchain Sourcery G++ Lite 4.2-125 Hi everybody! Currently I have two different problem, but both related to the debugging. I am using a M5484Lite EVB. I downloaded the Sourcery G++ Lite 4.2-125 toolchain and I want to use Linux as the operating system, so I use the m68k-linux-gnu- commands. I know it sounds weird, but the team works in Windows. We installed the Eclipse on Windows, in spite of developing to a Linux target. We followed as a guide a pair of example I found in internet about how to add a CDT plug to Eclipse (document "Open source Coldfire IDE" and "ARM cross development with GNU Toolchain and Eclipse"). Here the problem goes: 1. Applications debug. First of all I have to say I have been able to debug a simple application! But I still have a doubt about the libraries. I use the gdbserver in the target and m68k-linux-gnu-gdb in the host. Next I show what appears in the console: 189-gdb-set confirm off 189^done (gdb) 190-gdb-set width 0 190^done (gdb) 191-gdb-set height 0 191^done 192-interpreter-exec console echo (gdb) 192^done (gdb) 193-gdb-show prompt 193^done,value="(gdb) " (gdb) 194 set solib-absolute-prefix C:\\Toolchain_CodeSourcery\\m68k-linux-gnu\\libc\\usr\\lib &"set solib-absolute-prefix C:\\\\Toolchain_CodeSourcery\\\\m68k-linux-gnu\\\\libc\\\\usr\\\\lib \n" set solib-absolute-prefix C:\Toolchain_CodeSourcery\m68k-linux-gnu\libc\usr\lib 194^done 195 set remote exec-file Hello.elf (gdb) &"set remote exec-file Hello.elf \n" 195^done set remote exec-file Hello.elf 196 target remote 172.19.134.100:2345 (gdb) &"target remote 172.19.134.100:2345\n" target remote 172.19.134.100:2345 ~"[New Thread 206]\n" [New Thread 206] warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. &"warning: Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code." &"\n" ~"0x80005cdc in ?? ()\n" 0x80005cdc in ?? () 196^done 197-stack-list-frames (gdb) 197^done,stack=[frame={level="0",addr="0x80005cdc",func="??"},frame={level="1",addr="0x00000001",func="??"},frame={level="2",addr="0xbfe9df6d",func="??"},frame={level="3",addr="0x00000000",func="??"}] ... 217 c &"c\n" c &"Error while mapping shared library sections:\n" &"/lib/libc.so.6: No such file or directory.\n" Error while mapping shared library sections: /lib/libc.so.6: No such file or directory. Error while mapping shared library sections: &"Error while mapping shared library sections:\n" &"/lib/ld.so.1: No such file or directory.\n" /lib/ld.so.1: No such file or directory. ~"\nBreakpoint " Breakpoint ~"1, main (arg=1, argv=0xbfe9dec4) at main.c:15\n" 1, main (arg=1, argv=0xbfe9dec4) at main.c:15 ~"15\t\tint a = 2;\n" 15 int a = 2; 217^done ... Red lines show the probems I've got. I thought I would solve the first red errors using "set solib-absolute-prefix" or "set sysroot", but it didn't. I am not sure if it just says I can't debug the shared libraries. The second one I don't know what it means (error mapping libraries???). However, I can debug right. 2. Linux kernel debug. First I try to to debug the Linux kernel from the command-line and after that I'll try to do it with Eclipse. I continue working on Windows, although if it was completely necessary, I would do on Linux, only for the kernel. I have a P&E Parallel Port Cable BDM and a USBMultilink and it seems, both work: C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-sprite.exe -i CodeSourcery ColdFire Debug Sprite (Sourcery G++ Lite 4.2-125) pe: [speed=&memory-timeout=] P&E Adaptor pe://USBMultilink/PE6015776 - USB1 : USB-ML-CF Rev C (PE6015776) pe://CycloneProMaxSerial:1 - COM1 : Serial Port 1 pe://ParallelPortCable:1 - LPT1 : Parallel Port 1 (Address $0378) ccs: [timeout=&speed=] CCS Adaptor ccs://$Host:$Port/$Chain_position - CCS address tblcf: TBLCF Interface I am trying with the parallel one. I create the xml for my board m5484Liteevb.xml: 64MBytes DDR SDRAM 4KBytes Internal SRAM 4KBytes Internal SRAM 4MBytes External BootFlash, 16bit wide Next C:\Toolchain_CodeSourcery\bin>m68k-linux-gnu-gdb.exe C:\\Proyectos\\workspace_Ec lipseCF\\Linux_kernel\\vmlinux GNU gdb (Sourcery G++ Lite 4.2-125) 6.7.50.20080107-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-mingw32 --target=m68k-linux-gnu". For bug reporting instructions, please see: . .. <-linux-gnu-sprite.exe pe://ParallelPortCable m5484Liteevb Remote debugging using | m68k-linux-gnu-sprite.exe pe://ParallelPortCable m5484L iteevb m68k-linux-gnu-sprite: Opening P&E ParallelPortCable port 1 (LPT1 : Parallel Por t 1 (Address $0378)) m68k-linux-gnu-sprite: Target reset 0x00000000 in ?? () (gdb) load Loading section .text.head, size 0x102a lma 0x20000 Loading section .text, size 0x1a1512 lma 0x2102c Loading section .cpuinit.text, size 0xa26 lma 0x1c2540 Loading section .meminit.text, size 0x1aa lma 0x1c2f66 Loading section __ex_table, size 0x26d0 lma 0x1c3110 Loading section .rodata, size 0x4a943 lma 0x1c6000 Loading section .pci_fixup, size 0x580 lma 0x210944 Loading section __ksymtab, size 0x3ee8 lma 0x210ec4 Loading section __ksymtab_gpl, size 0x14f0 lma 0x214dac Loading section __ksymtab_strings, size 0xb172 lma 0x21629c Loading section __param, size 0xbf0 lma 0x221410 Loading section .data, size 0x10b40 lma 0x222000 Loading section .cpuinit.data, size 0x32 lma 0x232b40 Loading section .meminit.data, size 0xc lma 0x232b72 Loading section .data.cacheline_aligned, size 0xb0 lma 0x232b80 Loading section .notes, size 0x24 lma 0x232c30 Loading section .init.text, size 0x1223e lma 0x234000 Loading section .init.data, size 0x168c lma 0x24623e Loading section .init.setup, size 0x264 lma 0x2478d0 Loading section .initcall.init, size 0x1f4 lma 0x247b34 Loading section .con_initcall.init, size 0x8 lma 0x247d28 Loading section .init.ramfs, size 0x86 lma 0x248000 Loading section .data.init_task, size 0x2000 lma 0x24a000 Start address 0x20000, load size 2261467 Transfer rate: 6 KB/sec, 7463 bytes/write. (gdb) break start_kernel Breakpoint 1 at 0x2347f8: file init/main.c, line 512. (gdb) l 1 init/main.c: No such file or directory. in init/main.c (gdb) c Continuing. Breakpoint 1, start_kernel () at init/main.c:512 512 in init/main.c (gdb) c Continuing. m68k-linux-gnu-sprite: error: Hardware device not ready Error from remote target: Hardware device not ready (gdb) You can see at the beginning it seems that all is OK, but after loading the image in RAM, I try to debug but the main.c is not found. I also tried to debug with Eclipse, but an error occurs. Could you help with these problems? Thanks in advance and sorry for the long message. Ra?l Moreno ***********Internet Email Confidentiality Footer************* This email and any files transmitted with it are confidential and intended solely for the use of the organization or individual to whom they are addressed. It is expressly forbidden to retransmit or copy email and/or this attached files without our permission . If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. From list_ob at gmx.net Fri Oct 17 16:50:54 2008 From: list_ob at gmx.net (Oliver Betz) Date: Fri, 17 Oct 2008 18:50:54 +0200 Subject: Mixed source + assembly listing crippled Message-ID: <48F8DE8E.12596.5D7BA20@list_ob.gmx.net> Hi All, when I call the compiler with "-Wa,-a" to get a mixed source/assembly output in "listing", I get crippled output: Source and assembly lines are out of sync, and characters are missing in the (source and assembly) lines. Is this a known issue? (Sourcery G++ Lite 4.2-125) 4.2.3, OS is Win32 (XP) Compiler invocation: m68k-elf-gcc.exe foo.c -c -g -mcpu=5213 -Wa,-a TIA, Oliver -- Oliver Betz, Muenchen From mark at codesourcery.com Fri Oct 17 17:00:04 2008 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 17 Oct 2008 10:00:04 -0700 Subject: [coldfire-gnu-discuss] Mixed source + assembly listing crippled In-Reply-To: <48F8DE8E.12596.5D7BA20@list_ob.gmx.net> References: <48F8DE8E.12596.5D7BA20@list_ob.gmx.net> Message-ID: <48F8C494.1060706@codesourcery.com> Oliver Betz wrote: > Compiler invocation: > m68k-elf-gcc.exe foo.c -c -g -mcpu=5213 -Wa,-a We are aware of a bug that manifests in that case on Windows hosts with the Spring 2008 release. That bug has been fixed for the forthcoming Fall 2008 release. -- Mark Mitchell CodeSourcery mark at codesourcery.com (650) 331-3385 x713 From maxim at codesourcery.com Wed Oct 29 13:57:37 2008 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Wed, 29 Oct 2008 14:57:37 +0100 Subject: 2008Q3 Release Available Message-ID: <49086BD1.8020705@codesourcery.com> CodeSourcery is pleased to announce the availability of the 2008q3 Sourcery G++ Lite Edition release for ColdFire processors. This is available for download from: http://www.codesourcery.com/gnu_toolchains/coldfire New features in this release include: * GCC has been upgraded from GCC 4.2.3 to GCC 4.3.2. This upgrade provides improved optimization, as well as a number of new features and quality improvements. Other components, including GDB and Binutils have also been upgraded. * Support for new V1 processors. Sourcery G++ now includes support for the ColdFire MCF51ACnn (Celis), MCF51CNnn (Lasko) and MCF51EM (Nucleus) families of microprocessors. * The packaged P&E drivers now include support for ColdFire V1 devices. * Support for new V2 and V3 processors. Sourcery G++ now includes support for the ColdFire MCF5225x (Kirin3), MCF5227x (DragonFire0) and MCF5301x (Longjin) family of microprocessors. * Support for uClinux on V4 processors. Sourcery G++ now includes uClinux libraries for the ColdFire M54455 family of processors. Enjoy! -- Maxim Kuvyrkov CodeSourcery maxim at codesourcery.com From frank.bennett at valcomelton.com Fri Oct 31 14:05:00 2008 From: frank.bennett at valcomelton.com (Frank Bennett) Date: Fri, 31 Oct 2008 10:05:00 -0400 Subject: [coldfire-gnu-discuss] Debugging from flash Message-ID: <490B108C.7070504@valcomelton.com> I'm having the same problem. I am running, debugging my standalone application out of SDRAM just fine until I attempt a restart (set pc indirect location 4). The actual process I was attempting is: o Flash external flash with application elf file debugged in SDRAM o boot from internal Flash, relocate o init SDRAM controller o copy external Flash to SDRAM @ location 0 o start execution at address found in location 4 (restart) void RunProgramImage(void) { /* Call application startup code */ asm("move.l 4.l, %d1; move.l %d1, -(%a7); rts;"); } Using start_c.c I added: o disable interrupts til after initialization o put __cs3_regions on a long boundary alignment via linker script o linked in _sbrk() to set heap_ptr=NULL (probably not necessary since it's in .bss) Now __cs3_start_c seems to init the .bss section but now I die in the first call to malloc(discovered using pemico debugger). ....suggestions? thanks, Frank Bennett using gdb/sprite I run the application, hit c, I only get: (gdb) set $pc=0x400 (gdb) s 26 move.l #__cs3_region_start_ipsbar+0x108050,%a0 Current language: auto; currently asm (gdb) 28 move.l #0x8fff,%d0 (gdb) 29 move.w %d0,0x7FB4(%a0) (gdb) 30 move.l #__cs3_region_start_rambar+0x01,%d1 (gdb) 31 movec.l %d1,#0x81 (gdb) 32 move.l #__cs3_region_start_rombar+0x01,%d1 (gdb) 33 movec.l %d1,#0xC04 (gdb) 35 move.l #0xc0,%d0 (gdb) 36 move.b %d0,0x-8000(%a0) (gdb) 37 move.l #__cs3_region_start_ipsbar,%a0 (gdb) 44 clr.l %d0 (gdb) 45 move.w %d0,__cs3_region_start_ipsbar+0x140000 (gdb) 46 jmp _start (gdb) _start () at start.S:21 21 move.l #__cs3_stack, %sp (gdb) _start () at start.S:23 23 move.l #0, %fp (gdb) _start () at start.S:25 25 move.l %fp,%sp at - (gdb) _start () at start.S:26 26 jmp __cs3_start_c (gdb) __cs3_start_c () at start_c.c:27 27 { Current language: auto; currently c (gdb) 0x40000000 in ?? () (gdb) bt #0 0x40000000 in ?? () (gdb) b __cs3_start_c Breakpoint 4 at 0x554: file start_c.c, line 27. (gdb) info r d0 0x0 0x0 d1 0xf0000001 0xf0000001 d2 0xfffffffc 0xfffffffc d3 0x408 0x408 d4 0x49 0x49 d5 0xf 0xf d6 0x4115c5 0x4115c5 d7 0xf 0xf a0 0x40000000 0x40000000 a1 0x0 0x0 a2 0xf40003ee 0xf40003ee a3 0x6120bc1 0x6120bc1 a4 0xffffffff 0xffffffff a5 0x672ae608 0x672ae608 fp 0x0 0x0 sp 0x2000ffec 0x2000ffec ps 0x41e02704 0x41e02704 pc 0x40000000 0x40000000 (gdb)