EmbeddedRelated.com
Forums

CodeWarrior Startup Initialization with BDM

Started by eric_cina April 14, 2005

Gilles,

Thank you for your help. I understand the situation. I will work
workout the issue some other way.

Thanks again,
Eric --- In 68HC12@68HC..., Gilles Blanquin
<gilles.blanquin@f...> wrote:
>
> Hi Eric.
>
> All understood. Providing you these "direct" commands to call P&E
drivers
> primitives would require time work effort for a very specific and
> exceptional purpose, but this will not be worthy, as of no help
for you.
> Indeed, the command that you will launch by script file will be
completely
> overlapped and mixed with commands executed by the debugger. We
would have
> to clean all debugger calls to let a command file open connection
with a
> driver, with no way to handle driver feedbacks. Really, too
complex.
> Finally, we don't think that driver calls can be involved in a
connection
> issue, because at connection time, calls are really minimal. All
sensible
> BDM communication, synchronization and handshake are more between
the
> driver/P&E interface and the chip: something that we do not
control at all.
> Definitely, P&E is your interlocutor on this point if you really
have a BDM
> interfacing problem, but first I guess you should check on
hardware side.
>
> For your information, on our side, so far, connections to early
CPU12/HC912
> devices (A4, B32,D60, DG128) have remained stable with all P&E
cables.
> However I remember some BDM entering problem with A4 devices where
the chip
> had first to be in single chip mode before being forced later on
by command
> file to expanded mode (writing to MODE register). Of course, this
> configuration has to be done also by the application.
>
> I hope this help.
> Thanks for your understanding.
>
> Regards,
> Gilles > At 06:36 PM 4/22/2005, you wrote: > >Hi Gilles,
> >
> >Basically, I am trying to figure out why my BDM is having trouble
> >with my A4 target (it works well with my E128 target). Mostly it
> >just has trouble with a Reset but it loads code, executes, and
hits
> >breakpoints. Its just that on a Reset the BDM and the target seem
to
> >get out of sync and things go haywire.
> >
> >On a Reset, I'd like to make use of some of the BDM init routines
> >that are called when the debugger 1st connects to the BDM.
> >Specifically, I'd like to call routines like force_background_mode
()
> >and a few others to see if this will help things (or maybe just
> >perform the entire init sequence on every reset).
> >
> >I have been in touch with P&E to try to get some info on their
BDM,
> >its drivers, and related API calls but I haven't heard back yet.
If
> >the CodeWarrior Debugger provides a way for me to make these
calls,
> >that would be great. If not then I may consider writing my own app
> >for the purposes of understanding the BDM and finding out why its
> >flakey with my A4 target. Is there a way to do this in the
debugger?
> >
> >Thanks for your help,
> >Eric
> >
> >
> >
> >--- In 68HC12@68HC..., Gilles Blanquin
> ><gilles.blanquin@f...> wrote:
> > > Hi Eric.
> > >
> > > Indeed, the calls you see in the Command window are displayed
when
> >you set
> > > the "PROTOCOL ON" command or "Show Protocol" option. The
protocol
> >mode
> > > displays a lot of debug information (mainly for maintenance),
> >including
> > > function calls to the P&E "unit_12z.dll" Multilink/Cyclone
> >Pro/etc. BDM cables.
> > >
> > > The P&E API is provided in C language, therefore nothing like
text
> >command
> > > you would find in the debugger. Also there is no mapping from
> >debugger text
> > > command to these function calls, simply because this is not
very
> >useful
> > > (the functions are very simple and cannot only be used "as
is"),
> >and also
> > > because, to be consistent, we would have to do it for all third
> >party
> > > drivers we support.
> > >
> > > If you think a function call could be useful for you to help
you
> >debug,
> > > please don't hesitate to tell me.
> > >
> > > Regards,
> > > Gilles
> > >
> > >
> > > At 01:05 AM 4/22/2005, you wrote:
> > >
> > >
> > > >In the Command window of the debugger, I see some of the
following
> > > >calls as well as others when I first connect the debugger to
my
> >BDM:
> > > >
> > > > preset_communication_speed(51);
> > > > reset_cable()
> > > > force_background_mode()
> > > >
> > > >I guess I see these because I have "Show Protocol" turned on.
But
> >I
> > > >was wondering if there was a way I could make calls to these
> > > >functions in the Command window through a cmd file or
something.
> > > >
> > > >Thanks,
> > > >Eric
> > > >
> > > >
> > > >--- In 68HC12@68HC..., Gilles Blanquin
> > > ><gilles.blanquin@f...> wrote:
> > > > > Hi Eric.
> > > > >
> > > > > What do you mean by "API calls"? Calls to cable driver?
> > > > > For sure, calls to cable driver have no direct command
> > > >equivalence.
> > > > > Commands are already a 'high level' user interface to
hardware
> > > >debugging.
> > > > > Or, in another way, what would you like to perform?
> > > > >
> > > > > Regards,
> > > > > Gilles
> > > > >
> > > > >
> > > > > At 06:37 PM 4/19/2005, you wrote:
> > > > >
> > > > >
> > > > > >Do you happen to know how I can make API calls from the
cmd
> > > >files? I
> > > > > >notice that when I start the debugger, it goes through a
> >series of
> > > > > >init steps and API calls to the driver for the BDM I am
> >using. I
> > > > > >tried to put some of these calls in my command file and it
> >does
> > > >not
> > > > > >recognize them.
> > > > > >
> > > > > >Any idea how I could do this?
> > > > > >
> > > > > >Thanks,
> > > > > >Eric
> > > > > >
> > > > > >
> > > > > >--- In 68HC12@68HC..., Gilles Blanquin
> > > > > ><gilles.blanquin@f...> wrote:
> > > > > > > Hi Eric.
> > > > > > >
> > > > > > > Manuals are delivered with the CodeWarrior installation
> >CD's.
> > > > > > > If you installed with a web installer, you can download
> >manuals
> > > > > >from the
> > > > > > > Metrowerks web site.
> > > > > > >
> > > > > > > You can have a look in your CodeWarrior install
> > > >path, "Help\pdf"
> > > > > >folder if
> > > > > > > you can find "Manual_Engine_HC12.pdf" and, for example,
> > > > > > > "Manual_ICD_HC12.pdf" if you use a P&E ICD or Multilink
> >cable,
> > > >etc.
> > > > > > >
> > > > > > > Manuals are big so not in Web installation, and
> >not "Typical"
> > > > > >installed.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Gilles
> > > > > > >
> > > > > > >
> > > > > > > At 06:39 PM 4/15/2005, you wrote:
> > > > > > >
> > > > > > >
> > > > > > > >Thanks. Thats a big help. Do you happen to know what
> >manual
> > > > > >describes
> > > > > > > >the commands?
> > > > > > > >
> > > > > > > >Eric
> > > > > > > >
> > > > > > > >
> > > > > > > >--- In 68HC12@68HC..., Gilles Blanquin
> > > > > ><gilles.blanquin@f...>
> > > > > > > >wrote:
> > > > > > > > > Hi Eric.
> > > > > > > > >
> > > > > > > > > Yes, the startup.cmd can be used to preset some
> >registers.
> > > > > >However,
> > > > > > > >the
> > > > > > > > > startup.cmd is executed only once, at first
connection.
> > > > > > > > > So I invite you to copy your command in the
reset.cmd
> >file,
> > > > > > > >otherwise, the
> > > > > > > > > first time you reset the debugger and the chip, the
> > > >registers
> > > > > >you
> > > > > > > >wanted to
> > > > > > > > > set returns to reset value!
> > > > > > > > >
> > > > > > > > > To see all debugger commands, you can open a
Command
> > > >window,
> > > > > >and
> > > > > > > >type
> > > > > > > > > "HELP" there. All commands are also described in
> >manuals.
> > > > > > > > >
> > > > > > > > > Example of wb (write byte) command:
> > > > > > > > >
> > > > > > > > > define MODEregister 0x0B
> > > > > > > > > define SpecialSingleChip 0x00
> > > > > > > > > wb MODEregister SpecialSingleChip
> > > > > > > > > undef MODEregister
> > > > > > > > > undef SpecialSingleChip
> > > > > > > > >
> > > > > > > > > or if you want, more directly:
> > > > > > > > >
> > > > > > > > > wb 0x0B 0x00
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > Gilles
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > At 11:19 PM 4/14/2005, you wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >Hi,
> > > > > > > > > >
> > > > > > > > > >I'm trying to figure out how to initialize a
register
> > > >(MODE
> > > > > > > >located at
> > > > > > > > > >0x0B) when I load my code through the debugger. In
> >other
> > > > > >words I
> > > > > > > >need
> > > > > > > > > >to set this register but I do not want to change
my
> >code
> > > >to
> > > > > >do it.
> > > > > > > >How
> > > > > > > > > >can I do this? Do I need to use startup.cmd? If
so,
> >what
> > > >are
> > > > > >the
> > > > > > > > > >commands to do it? Thanks in advance.
> > > > > > > > > >
> > > > > > > > > >Eric
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >Yahoo! Groups Links
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >Yahoo! Groups Links
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >Yahoo! Groups Links
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >