TFTP Client Example
cjohns at cybertec.com.au
Thu Apr 19 22:27:20 UTC 2001
peter.o.mueller at gmx.de wrote:
> Does anyone use this to download user code and executes it afterwards? In
> our case this could speed up development a lot: just press reset, code in rom
> downloads the application, starts it, user monitors output ...
I do and I also have debugging support with BDM. On the Coldfire I have
the downloaded application's entry point the start of the image. I have
the bootrom load a HALT instruction just before entry then execute it.
My .gdbinit script have :
# Catch application exits etc.
# If a stop occurs and the program counter is 0xfffe single stop on
# to the real code.
if $pc == 0x17ffe
# NOTE: YOU MUST define a .gdbinit in your home directory where you
# place the connect command. This is something like :
# define bdm-target-connect
# target bdm bshost:/dev/bdmcf0
# where `bshost' is a host running the BDM server.
# Run from reset to the breakpoint set by the boot rom eg --debug option
# Temp break on main to get us to main.
The first `c'ontinue starts the processor as if from reset and executes
the code in ROM which is the boot rom. This loads the image. The code is
loaded to 0x18000 and so a break at 0x17ffe is the bootrom finishing.
The halt is stepped over (this does work). A break point is set on
`main' and we `c'ontinue over the BSP and RTEMS initialisation code. For
a large 1Mbyte+ file is only takes a few seconds. This is using large
This could be made to work for targets that use a serial port and remote
stub and have a network interface.
Chris Johns, cjohns @ cybertec.com.au
More information about the users