<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic BDM download speed with GDB/DDD in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/BDM-download-speed-with-GDB-DDD/m-p/130770#M760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported&amp;nbsp;from the WildRice - Coldfire forum.&amp;nbsp; Freescale has received the approval from the WildRice administrator on seeding the Freescale forum with messages.&amp;nbsp; The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value as you search for answers to your questions.&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#ff0000"&gt;Freescale assumes no responsibility whatsoever with respect to Posted Material.&amp;nbsp; For additional information, please see the &lt;A href="http://www.freescale.com/files/abstract/help_page/TERMSOFUSE.html" rel="nofollow" target="_blank"&gt;Terms of Use - Message Boards and Community Forums&lt;/A&gt;.&amp;nbsp; Thank You and Enjoy the Forum!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Mar 22, 2006, 5:53 PM &lt;BR /&gt;&lt;BR /&gt;Post #1 of 6 (13 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;[ColdFire] BDM download speed with GDB/DDD Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM adapter ? &lt;BR /&gt;&lt;BR /&gt;that how long does it take to download an image to the target. our &lt;BR /&gt;image size is currently around 1.5MB. &lt;BR /&gt;&lt;BR /&gt;I would like to know if it significantly faster (or slower!) than the &lt;BR /&gt;(defunct) SDS debugger software we are using now. &lt;BR /&gt;&lt;BR /&gt;Chris &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;Chris Russell &lt;BR /&gt;Chief Engineer, ZK Celltest Inc. &lt;BR /&gt;(408) 541-2621 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Listserv &lt;BR /&gt;Veteran &lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 1:00 AM &lt;BR /&gt;&lt;BR /&gt;Post #2 of 6 (13 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;&amp;gt; linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM &lt;BR /&gt;adapter ? &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; that how long does it take to download an image to the target. our &lt;BR /&gt;&amp;gt; image size is currently around 1.5MB. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; I would like to know if it significantly faster (or slower!) than the &lt;BR /&gt;&amp;gt; (defunct) SDS debugger software we are using now. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Chris &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;BR /&gt;I'd be surprised if there was a large difference in speed - the main &lt;BR /&gt;bottleneck is the parallel port and the bit-banging required by simple &lt;BR /&gt;adaptors. I think this is normally run at about 1 MHz, giving 500 kbits per &lt;BR /&gt;second on the BDM. Since you need 51 BDM clocks for every 32 bits data, &lt;BR /&gt;this works out to around 40 kBytes per second max download speed. &lt;BR /&gt;&lt;BR /&gt;To get faster than that, you need to use a different interface - Ethernet or &lt;BR /&gt;USB. I have a prototype USB-based BDM adapator that I estimate gives 150 - &lt;BR /&gt;200 KB download speed, which I expect to get close to its theoretical &lt;BR /&gt;maximum of about 480 KB. At the moment, I've only got a rough Delphi &lt;BR /&gt;program for downloading - when I get the time, I plan to fill out gdb &lt;BR /&gt;support. &lt;BR /&gt;&lt;BR /&gt;mvh., &lt;BR /&gt;&lt;BR /&gt;David &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 8:54 AM &lt;BR /&gt;&lt;BR /&gt;Post #3 of 6 (11 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;We used to download through GDB using a P&amp;amp;E BDM adapter and I &lt;BR /&gt;remember it being quite slow. Now we use Ed Sutter's MicroMonitor to &lt;BR /&gt;receive a "stripped" (of debug symbols) elf file over ethernet and &lt;BR /&gt;load the appropriate parts into memory. We then load GDB with the &lt;BR /&gt;debug info from a non-stripped version of the elf file and start &lt;BR /&gt;debugging. Others are doing similar things with other &lt;BR /&gt;bootloaders. Let me know if you need more details. &lt;BR /&gt;&lt;BR /&gt;Steve &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At 06:53 PM 3/22/2006, you wrote: &lt;BR /&gt;&lt;BR /&gt;&amp;gt;what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;&amp;gt;linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM adapter ? &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;that how long does it take to download an image to the target. our &lt;BR /&gt;&amp;gt;image size is currently around 1.5MB. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;I would like to know if it significantly faster (or slower!) than &lt;BR /&gt;&amp;gt;the (defunct) SDS debugger software we are using now. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;Chris &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;-- &lt;BR /&gt;&amp;gt;Chris Russell &lt;BR /&gt;&amp;gt;Chief Engineer, ZK Celltest Inc. &lt;BR /&gt;&amp;gt;(408) 541-2621 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--- &lt;BR /&gt;Steve Strobel &lt;BR /&gt;Link Communications, Inc. &lt;BR /&gt;1035 Cerise Rd &lt;BR /&gt;Billings, MT 59101-7378 &lt;BR /&gt;(406) 245-5002 ext 102 &lt;BR /&gt;(406) 245-4889 (fax) &lt;BR /&gt;WWW: &lt;A href="http://www.link-comm.com" target="test_blank"&gt;http://www.link-comm.com&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 3:22 PM &lt;BR /&gt;&lt;BR /&gt;Post #4 of 6 (10 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt; We used to download through GDB using a P&amp;amp;E BDM adapter and I remember &lt;BR /&gt;&amp;gt; it being quite slow. Now we use Ed Sutter's MicroMonitor to receive a &lt;BR /&gt;&amp;gt; "stripped" (of debug symbols) elf file over ethernet and load the &lt;BR /&gt;&amp;gt; appropriate parts into memory. We then load GDB with the debug info &lt;BR /&gt;&amp;gt; from a non-stripped version of the elf file and start debugging. Others &lt;BR /&gt;&amp;gt; are doing similar things with other bootloaders. Let me know if you &lt;BR /&gt;&amp;gt; need more details. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;BR /&gt;What commands do you use to do this? I would like to try this. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;Mar 24, 2006, 2:10 PM &lt;BR /&gt;&lt;BR /&gt;Post #5 of 6 (8 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;At 04:22 PM 3/23/2006, Brian Rose &lt;LISTS&gt;wrote: &lt;BR /&gt;&amp;gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt;&amp;gt;We used to download through GDB using a P&amp;amp;E BDM adapter and I remember &lt;BR /&gt;&amp;gt;&amp;gt;it being quite slow. Now we use Ed Sutter's MicroMonitor to receive a "stripped" &lt;BR /&gt;&amp;gt;&amp;gt;(of debug symbols) elf file over ethernet and load the appropriate parts into &lt;BR /&gt;&amp;gt;&amp;gt;memory. We then load GDB with the debug info from a non-stripped version of &lt;BR /&gt;&amp;gt;&amp;gt;the elf file and start debugging. Others are doing similar things with other &lt;BR /&gt;&amp;gt;&amp;gt;bootloaders. Let me know if you need more details. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;What commands do you use to do this? I would like to try this. &lt;BR /&gt;&lt;BR /&gt;My makefile creates three output files. The linker makes tcb2-debug.elf, which has &lt;BR /&gt;debug symbols and is about 34MB. It then calls "m68k-rtems-strip -o $@ &lt;BR /&gt;$(RTEMS_TARGET)-debug.elf" to strip the debug symbols and create tcb2.elf &lt;BR /&gt;(about 1.7MB). Finally, it uses the elf.exe zlib compression program that comes &lt;BR /&gt;with MicroMonitor to create tcb2.ezip (about 650KB). For some targets, I skip the &lt;BR /&gt;last step and use an uncompressed elf file, because it lets the target start up &lt;BR /&gt;faster (it takes uMon a while to decompress *.ezip files). &lt;BR /&gt;&lt;BR /&gt;I then transfer the tcb2.ezip file to the target using TFTP and let uMon save it in TFS &lt;BR /&gt;(its flash file system). For development work, it would be much nicer to use a TFS &lt;BR /&gt;ramdisk (because it would be faster and would prevent having to defragment the &lt;BR /&gt;flash file system every now and then), but I have never taken the time to set that up. &lt;BR /&gt;Even better would be a way to transfer an image directly to memory where it could &lt;BR /&gt;be executed. There is a way to do that with uMon if you use a binary image file, but &lt;BR /&gt;stuff in my elf file isn't stored contiguously, so making a binary image isn't &lt;BR /&gt;straightforward. By using an elf file in TFS, I can get uMon to parse the elf file and &lt;BR /&gt;automatically load the segments at the right addresses in memory. There might be &lt;BR /&gt;a way to get uMon to parse an elf file and load it into memory without first storing it &lt;BR /&gt;in TFS, but I haven't found one. &lt;BR /&gt;&lt;BR /&gt;Once the file is in TFS, I can just execute it by entering "tcb2.ezip" from the uMon&amp;gt; &lt;BR /&gt;prompt I get via a serial connection to the target. It is also possible to use command &lt;BR /&gt;line options like "tcb2.ezip nocop" to disable the COP watchdog. I patched RTEMS &lt;BR /&gt;to make it pull the command line options from uMon, then just parsed the normal &lt;BR /&gt;argc/argv stuff to handle that. &lt;BR /&gt;&lt;BR /&gt;The process I use from here on is more convoluted than it needs to be, because of &lt;BR /&gt;all the combinations I tried before I settled on the current method. I used to be able &lt;BR /&gt;to load the software through the BDM connection with GDB or using uMon/ethernet, &lt;BR /&gt;and either run GDB directly or DDD as a shell for GDB. It still deals with files for a &lt;BR /&gt;variety of different targets. &lt;BR /&gt;&lt;BR /&gt;To run the program in a debugger, I use a script like tcb2-debug-ddd.sh: &lt;BR /&gt;&lt;BR /&gt;#! /bin/bash &lt;BR /&gt;cd build/tcb2 ; ~/debug-tcb-ddd-net.sh tcb2 $1 &lt;BR /&gt;&lt;BR /&gt;which calls debug-tcb-ddd-net.sh: &lt;BR /&gt;&lt;BR /&gt;#! /bin/bash &lt;BR /&gt;# must run this from a term window in X to start DDD &lt;BR /&gt;&lt;BR /&gt;if [ $# -lt 1 ] # if have a command line argument &lt;BR /&gt;then &lt;BR /&gt;echo The name of the executable must be specified on the command line, like this: &lt;BR /&gt;echo $0 hello &lt;BR /&gt;exit 1 &lt;BR /&gt;else &lt;BR /&gt;# this seems to be fooled into thinking that "loopback" is &lt;BR /&gt;# present if a zero byte "loopback.exe" is. &lt;BR /&gt;if [ -f "$1.ezip" ] &lt;BR /&gt;then &lt;BR /&gt;~/download.sh $1.ezip &lt;BR /&gt;~/moncmd.sh tfs -v ld $1.ezip &lt;BR /&gt;cp $1-debug.elf debug-net.elf &lt;BR /&gt;m68k-bdm-elf-gdb -silent --command=~/debug-tcb2-net.gdb &lt;BR /&gt;rm debug-net.elf &lt;BR /&gt;else &lt;BR /&gt;Echo File $1.ezip not found. &lt;BR /&gt;exit 2 &lt;BR /&gt;fi &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;Note that "~/moncmd.sh tfs -v ld $1.ezip" tells uMon to &lt;BR /&gt;decompress the file it has stored in TFS and load it into &lt;BR /&gt;memory (it understands elf files). That script is kind of &lt;BR /&gt;complicated because it is set up to work with several &lt;BR /&gt;types of target files. &lt;BR /&gt;&lt;BR /&gt;The GDB command file (debug-tcb2-net.gdb) follows. Note &lt;BR /&gt;that it uses the "symbol" command to load the debug symbols. &lt;BR /&gt;It uses the reset vector to set the program counter, but &lt;BR /&gt;with an offset because of how we remap the flash during &lt;BR /&gt;the boot process (I am not sure we would still need to &lt;BR /&gt;now that we are using uMon, but that code has never been &lt;BR /&gt;simplified since it booted directly). It also sets up a &lt;BR /&gt;breakpoint to automatically stop and change a global &lt;BR /&gt;variable to disable the COP watchdog. Please let me know &lt;BR /&gt;if you have other questions. &lt;BR /&gt;&lt;BR /&gt;tcb &lt;BR /&gt;symbol debug-net.elf &lt;BR /&gt;set $sp = *((long *) 0xf0000000) &lt;BR /&gt;# if used this, would start uMon over, after which could "call 0x20504" (or whatever the entry address is) to start the app &lt;BR /&gt;set $pc = (*((long *) 0xf0000004)) + 0xf0000000 &lt;BR /&gt;# if use this, starts the application directly &lt;BR /&gt;set $pc = _start &lt;BR /&gt;&lt;BR /&gt;b rtems_main &lt;BR /&gt;condition 1 &lt;BR /&gt;commands 1 &lt;BR /&gt;set do_mon_warmstart = 1 &lt;BR /&gt;disable 1 &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;# automatically disable the enable-cop command so it won't reset while debugging &lt;BR /&gt;b setup_cop_watchdog &lt;BR /&gt;condition 2 &lt;BR /&gt;commands 2 &lt;BR /&gt;set enable_cop_watchdog = 0 &lt;BR /&gt;disable 2 &lt;BR /&gt;c &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;b _uhoh &lt;BR /&gt;b __assert &lt;BR /&gt;&lt;BR /&gt;# make sure the debugger will stop when the program exits &lt;BR /&gt;# hb pollethernet &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--- &lt;BR /&gt;Steve Strobel &lt;BR /&gt;Link Communications, Inc. &lt;BR /&gt;1035 Cerise Rd &lt;BR /&gt;Billings, MT 59101-7378 &lt;BR /&gt;(406) 245-5002 ext 102 &lt;BR /&gt;(406) 245-4889 (fax) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;Mar 24, 2006, 3:08 PM &lt;BR /&gt;&lt;BR /&gt;Post #6 of 6 (8 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt; Even better would be a way to transfer an image directly to memory where it could &lt;BR /&gt;&amp;gt; be executed. There is a way to do that with uMon if you use a binary image file, but &lt;BR /&gt;&amp;gt; stuff in my elf file isn't stored contiguously, so making a binary image isn't &lt;BR /&gt;&amp;gt; straightforward. &lt;BR /&gt;&lt;BR /&gt;Would a simpler method be to add at the entry point of your application: &lt;BR /&gt;&lt;BR /&gt;_start: &lt;BR /&gt;halt &lt;BR /&gt;nop &lt;BR /&gt;... &lt;BR /&gt;&lt;BR /&gt;Then in your .gdbinit file add: &lt;BR /&gt;&lt;BR /&gt;define hook-stop &lt;BR /&gt;if $pc == _start &lt;BR /&gt;si &lt;BR /&gt;end &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;target bdm /dev/bdmcf0 &lt;BR /&gt;&lt;BR /&gt;c &lt;BR /&gt;tb main &lt;BR /&gt;c &lt;BR /&gt;&lt;BR /&gt;Set up your boot monitor to load the application into RAM and start &lt;BR /&gt;executing it. &lt;BR /&gt;&lt;BR /&gt;On the command line you start ddd (gdb) with the ELF file with symbols &lt;BR /&gt;on the command line. &lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;Chris &lt;BR /&gt;&lt;/LISTS&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Dietrich on &lt;SPAN class="date_text"&gt;04-04-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:18 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Apr 2006 04:30:05 GMT</pubDate>
    <dc:creator>Dietrich</dc:creator>
    <dc:date>2006-04-01T04:30:05Z</dc:date>
    <item>
      <title>BDM download speed with GDB/DDD</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/BDM-download-speed-with-GDB-DDD/m-p/130770#M760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported&amp;nbsp;from the WildRice - Coldfire forum.&amp;nbsp; Freescale has received the approval from the WildRice administrator on seeding the Freescale forum with messages.&amp;nbsp; The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value as you search for answers to your questions.&amp;nbsp; &lt;/FONT&gt;&lt;FONT color="#ff0000"&gt;Freescale assumes no responsibility whatsoever with respect to Posted Material.&amp;nbsp; For additional information, please see the &lt;A href="http://www.freescale.com/files/abstract/help_page/TERMSOFUSE.html" rel="nofollow" target="_blank"&gt;Terms of Use - Message Boards and Community Forums&lt;/A&gt;.&amp;nbsp; Thank You and Enjoy the Forum!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Mar 22, 2006, 5:53 PM &lt;BR /&gt;&lt;BR /&gt;Post #1 of 6 (13 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;[ColdFire] BDM download speed with GDB/DDD Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM adapter ? &lt;BR /&gt;&lt;BR /&gt;that how long does it take to download an image to the target. our &lt;BR /&gt;image size is currently around 1.5MB. &lt;BR /&gt;&lt;BR /&gt;I would like to know if it significantly faster (or slower!) than the &lt;BR /&gt;(defunct) SDS debugger software we are using now. &lt;BR /&gt;&lt;BR /&gt;Chris &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;Chris Russell &lt;BR /&gt;Chief Engineer, ZK Celltest Inc. &lt;BR /&gt;(408) 541-2621 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Listserv &lt;BR /&gt;Veteran &lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 1:00 AM &lt;BR /&gt;&lt;BR /&gt;Post #2 of 6 (13 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;&amp;gt; linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM &lt;BR /&gt;adapter ? &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; that how long does it take to download an image to the target. our &lt;BR /&gt;&amp;gt; image size is currently around 1.5MB. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; I would like to know if it significantly faster (or slower!) than the &lt;BR /&gt;&amp;gt; (defunct) SDS debugger software we are using now. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Chris &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;BR /&gt;I'd be surprised if there was a large difference in speed - the main &lt;BR /&gt;bottleneck is the parallel port and the bit-banging required by simple &lt;BR /&gt;adaptors. I think this is normally run at about 1 MHz, giving 500 kbits per &lt;BR /&gt;second on the BDM. Since you need 51 BDM clocks for every 32 bits data, &lt;BR /&gt;this works out to around 40 kBytes per second max download speed. &lt;BR /&gt;&lt;BR /&gt;To get faster than that, you need to use a different interface - Ethernet or &lt;BR /&gt;USB. I have a prototype USB-based BDM adapator that I estimate gives 150 - &lt;BR /&gt;200 KB download speed, which I expect to get close to its theoretical &lt;BR /&gt;maximum of about 480 KB. At the moment, I've only got a rough Delphi &lt;BR /&gt;program for downloading - when I get the time, I plan to fill out gdb &lt;BR /&gt;support. &lt;BR /&gt;&lt;BR /&gt;mvh., &lt;BR /&gt;&lt;BR /&gt;David &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 8:54 AM &lt;BR /&gt;&lt;BR /&gt;Post #3 of 6 (11 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;We used to download through GDB using a P&amp;amp;E BDM adapter and I &lt;BR /&gt;remember it being quite slow. Now we use Ed Sutter's MicroMonitor to &lt;BR /&gt;receive a "stripped" (of debug symbols) elf file over ethernet and &lt;BR /&gt;load the appropriate parts into memory. We then load GDB with the &lt;BR /&gt;debug info from a non-stripped version of the elf file and start &lt;BR /&gt;debugging. Others are doing similar things with other &lt;BR /&gt;bootloaders. Let me know if you need more details. &lt;BR /&gt;&lt;BR /&gt;Steve &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;At 06:53 PM 3/22/2006, you wrote: &lt;BR /&gt;&lt;BR /&gt;&amp;gt;what type of download speeds are folks seeing with the cygwin or &lt;BR /&gt;&amp;gt;linux ports using GDB (of DDD) with a parallel port (P&amp;amp;E Micro) BDM adapter ? &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;that how long does it take to download an image to the target. our &lt;BR /&gt;&amp;gt;image size is currently around 1.5MB. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;I would like to know if it significantly faster (or slower!) than &lt;BR /&gt;&amp;gt;the (defunct) SDS debugger software we are using now. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;Chris &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;-- &lt;BR /&gt;&amp;gt;Chris Russell &lt;BR /&gt;&amp;gt;Chief Engineer, ZK Celltest Inc. &lt;BR /&gt;&amp;gt;(408) 541-2621 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--- &lt;BR /&gt;Steve Strobel &lt;BR /&gt;Link Communications, Inc. &lt;BR /&gt;1035 Cerise Rd &lt;BR /&gt;Billings, MT 59101-7378 &lt;BR /&gt;(406) 245-5002 ext 102 &lt;BR /&gt;(406) 245-4889 (fax) &lt;BR /&gt;WWW: &lt;A href="http://www.link-comm.com" target="test_blank"&gt;http://www.link-comm.com&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;&lt;BR /&gt;Mar 23, 2006, 3:22 PM &lt;BR /&gt;&lt;BR /&gt;Post #4 of 6 (10 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt; We used to download through GDB using a P&amp;amp;E BDM adapter and I remember &lt;BR /&gt;&amp;gt; it being quite slow. Now we use Ed Sutter's MicroMonitor to receive a &lt;BR /&gt;&amp;gt; "stripped" (of debug symbols) elf file over ethernet and load the &lt;BR /&gt;&amp;gt; appropriate parts into memory. We then load GDB with the debug info &lt;BR /&gt;&amp;gt; from a non-stripped version of the elf file and start debugging. Others &lt;BR /&gt;&amp;gt; are doing similar things with other bootloaders. Let me know if you &lt;BR /&gt;&amp;gt; need more details. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;BR /&gt;What commands do you use to do this? I would like to try this. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;Mar 24, 2006, 2:10 PM &lt;BR /&gt;&lt;BR /&gt;Post #5 of 6 (8 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;At 04:22 PM 3/23/2006, Brian Rose &lt;LISTS&gt;wrote: &lt;BR /&gt;&amp;gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt;&amp;gt;We used to download through GDB using a P&amp;amp;E BDM adapter and I remember &lt;BR /&gt;&amp;gt;&amp;gt;it being quite slow. Now we use Ed Sutter's MicroMonitor to receive a "stripped" &lt;BR /&gt;&amp;gt;&amp;gt;(of debug symbols) elf file over ethernet and load the appropriate parts into &lt;BR /&gt;&amp;gt;&amp;gt;memory. We then load GDB with the debug info from a non-stripped version of &lt;BR /&gt;&amp;gt;&amp;gt;the elf file and start debugging. Others are doing similar things with other &lt;BR /&gt;&amp;gt;&amp;gt;bootloaders. Let me know if you need more details. &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt;What commands do you use to do this? I would like to try this. &lt;BR /&gt;&lt;BR /&gt;My makefile creates three output files. The linker makes tcb2-debug.elf, which has &lt;BR /&gt;debug symbols and is about 34MB. It then calls "m68k-rtems-strip -o $@ &lt;BR /&gt;$(RTEMS_TARGET)-debug.elf" to strip the debug symbols and create tcb2.elf &lt;BR /&gt;(about 1.7MB). Finally, it uses the elf.exe zlib compression program that comes &lt;BR /&gt;with MicroMonitor to create tcb2.ezip (about 650KB). For some targets, I skip the &lt;BR /&gt;last step and use an uncompressed elf file, because it lets the target start up &lt;BR /&gt;faster (it takes uMon a while to decompress *.ezip files). &lt;BR /&gt;&lt;BR /&gt;I then transfer the tcb2.ezip file to the target using TFTP and let uMon save it in TFS &lt;BR /&gt;(its flash file system). For development work, it would be much nicer to use a TFS &lt;BR /&gt;ramdisk (because it would be faster and would prevent having to defragment the &lt;BR /&gt;flash file system every now and then), but I have never taken the time to set that up. &lt;BR /&gt;Even better would be a way to transfer an image directly to memory where it could &lt;BR /&gt;be executed. There is a way to do that with uMon if you use a binary image file, but &lt;BR /&gt;stuff in my elf file isn't stored contiguously, so making a binary image isn't &lt;BR /&gt;straightforward. By using an elf file in TFS, I can get uMon to parse the elf file and &lt;BR /&gt;automatically load the segments at the right addresses in memory. There might be &lt;BR /&gt;a way to get uMon to parse an elf file and load it into memory without first storing it &lt;BR /&gt;in TFS, but I haven't found one. &lt;BR /&gt;&lt;BR /&gt;Once the file is in TFS, I can just execute it by entering "tcb2.ezip" from the uMon&amp;gt; &lt;BR /&gt;prompt I get via a serial connection to the target. It is also possible to use command &lt;BR /&gt;line options like "tcb2.ezip nocop" to disable the COP watchdog. I patched RTEMS &lt;BR /&gt;to make it pull the command line options from uMon, then just parsed the normal &lt;BR /&gt;argc/argv stuff to handle that. &lt;BR /&gt;&lt;BR /&gt;The process I use from here on is more convoluted than it needs to be, because of &lt;BR /&gt;all the combinations I tried before I settled on the current method. I used to be able &lt;BR /&gt;to load the software through the BDM connection with GDB or using uMon/ethernet, &lt;BR /&gt;and either run GDB directly or DDD as a shell for GDB. It still deals with files for a &lt;BR /&gt;variety of different targets. &lt;BR /&gt;&lt;BR /&gt;To run the program in a debugger, I use a script like tcb2-debug-ddd.sh: &lt;BR /&gt;&lt;BR /&gt;#! /bin/bash &lt;BR /&gt;cd build/tcb2 ; ~/debug-tcb-ddd-net.sh tcb2 $1 &lt;BR /&gt;&lt;BR /&gt;which calls debug-tcb-ddd-net.sh: &lt;BR /&gt;&lt;BR /&gt;#! /bin/bash &lt;BR /&gt;# must run this from a term window in X to start DDD &lt;BR /&gt;&lt;BR /&gt;if [ $# -lt 1 ] # if have a command line argument &lt;BR /&gt;then &lt;BR /&gt;echo The name of the executable must be specified on the command line, like this: &lt;BR /&gt;echo $0 hello &lt;BR /&gt;exit 1 &lt;BR /&gt;else &lt;BR /&gt;# this seems to be fooled into thinking that "loopback" is &lt;BR /&gt;# present if a zero byte "loopback.exe" is. &lt;BR /&gt;if [ -f "$1.ezip" ] &lt;BR /&gt;then &lt;BR /&gt;~/download.sh $1.ezip &lt;BR /&gt;~/moncmd.sh tfs -v ld $1.ezip &lt;BR /&gt;cp $1-debug.elf debug-net.elf &lt;BR /&gt;m68k-bdm-elf-gdb -silent --command=~/debug-tcb2-net.gdb &lt;BR /&gt;rm debug-net.elf &lt;BR /&gt;else &lt;BR /&gt;Echo File $1.ezip not found. &lt;BR /&gt;exit 2 &lt;BR /&gt;fi &lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;Note that "~/moncmd.sh tfs -v ld $1.ezip" tells uMon to &lt;BR /&gt;decompress the file it has stored in TFS and load it into &lt;BR /&gt;memory (it understands elf files). That script is kind of &lt;BR /&gt;complicated because it is set up to work with several &lt;BR /&gt;types of target files. &lt;BR /&gt;&lt;BR /&gt;The GDB command file (debug-tcb2-net.gdb) follows. Note &lt;BR /&gt;that it uses the "symbol" command to load the debug symbols. &lt;BR /&gt;It uses the reset vector to set the program counter, but &lt;BR /&gt;with an offset because of how we remap the flash during &lt;BR /&gt;the boot process (I am not sure we would still need to &lt;BR /&gt;now that we are using uMon, but that code has never been &lt;BR /&gt;simplified since it booted directly). It also sets up a &lt;BR /&gt;breakpoint to automatically stop and change a global &lt;BR /&gt;variable to disable the COP watchdog. Please let me know &lt;BR /&gt;if you have other questions. &lt;BR /&gt;&lt;BR /&gt;tcb &lt;BR /&gt;symbol debug-net.elf &lt;BR /&gt;set $sp = *((long *) 0xf0000000) &lt;BR /&gt;# if used this, would start uMon over, after which could "call 0x20504" (or whatever the entry address is) to start the app &lt;BR /&gt;set $pc = (*((long *) 0xf0000004)) + 0xf0000000 &lt;BR /&gt;# if use this, starts the application directly &lt;BR /&gt;set $pc = _start &lt;BR /&gt;&lt;BR /&gt;b rtems_main &lt;BR /&gt;condition 1 &lt;BR /&gt;commands 1 &lt;BR /&gt;set do_mon_warmstart = 1 &lt;BR /&gt;disable 1 &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;# automatically disable the enable-cop command so it won't reset while debugging &lt;BR /&gt;b setup_cop_watchdog &lt;BR /&gt;condition 2 &lt;BR /&gt;commands 2 &lt;BR /&gt;set enable_cop_watchdog = 0 &lt;BR /&gt;disable 2 &lt;BR /&gt;c &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;b _uhoh &lt;BR /&gt;b __assert &lt;BR /&gt;&lt;BR /&gt;# make sure the debugger will stop when the program exits &lt;BR /&gt;# hb pollethernet &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--- &lt;BR /&gt;Steve Strobel &lt;BR /&gt;Link Communications, Inc. &lt;BR /&gt;1035 Cerise Rd &lt;BR /&gt;Billings, MT 59101-7378 &lt;BR /&gt;(406) 245-5002 ext 102 &lt;BR /&gt;(406) 245-4889 (fax) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-------------------------------------------------------------------- &lt;BR /&gt;Mar 24, 2006, 3:08 PM &lt;BR /&gt;&lt;BR /&gt;Post #6 of 6 (8 views) &lt;BR /&gt;Copy Shortcut &lt;BR /&gt;Re: [ColdFire] BDM download speed with GDB/DDD [In reply to] Can't Post &lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Steve Strobel wrote: &lt;BR /&gt;&amp;gt; Even better would be a way to transfer an image directly to memory where it could &lt;BR /&gt;&amp;gt; be executed. There is a way to do that with uMon if you use a binary image file, but &lt;BR /&gt;&amp;gt; stuff in my elf file isn't stored contiguously, so making a binary image isn't &lt;BR /&gt;&amp;gt; straightforward. &lt;BR /&gt;&lt;BR /&gt;Would a simpler method be to add at the entry point of your application: &lt;BR /&gt;&lt;BR /&gt;_start: &lt;BR /&gt;halt &lt;BR /&gt;nop &lt;BR /&gt;... &lt;BR /&gt;&lt;BR /&gt;Then in your .gdbinit file add: &lt;BR /&gt;&lt;BR /&gt;define hook-stop &lt;BR /&gt;if $pc == _start &lt;BR /&gt;si &lt;BR /&gt;end &lt;BR /&gt;end &lt;BR /&gt;&lt;BR /&gt;target bdm /dev/bdmcf0 &lt;BR /&gt;&lt;BR /&gt;c &lt;BR /&gt;tb main &lt;BR /&gt;c &lt;BR /&gt;&lt;BR /&gt;Set up your boot monitor to load the application into RAM and start &lt;BR /&gt;executing it. &lt;BR /&gt;&lt;BR /&gt;On the command line you start ddd (gdb) with the ELF file with symbols &lt;BR /&gt;on the command line. &lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;Chris &lt;BR /&gt;&lt;/LISTS&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Dietrich on &lt;SPAN class="date_text"&gt;04-04-2006&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:18 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Apr 2006 04:30:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/BDM-download-speed-with-GDB-DDD/m-p/130770#M760</guid>
      <dc:creator>Dietrich</dc:creator>
      <dc:date>2006-04-01T04:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: BDM download speed with GDB/DDD</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/BDM-download-speed-with-GDB-DDD/m-p/130771#M761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;David said: At the moment, I've only got a rough Delphi&lt;BR /&gt;program for downloading - when I get the time, I plan to fill out gdb&lt;BR /&gt;support.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Have you written delphi software to download with PE:s cable 32 interface ?&lt;/DIV&gt;&lt;DIV&gt;Is it possible to download to a 68k332 processor system?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;mvh&lt;/DIV&gt;&lt;DIV&gt;Jimmy&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 13:22:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/BDM-download-speed-with-GDB-DDD/m-p/130771#M761</guid>
      <dc:creator>jkbpower</dc:creator>
      <dc:date>2007-05-09T13:22:00Z</dc:date>
    </item>
  </channel>
</rss>

