Reply by Mark L. Cukier June 24, 20032003-06-24
Bertho:

The log2phy program doesn't alter the user's code, only the addresses
(as you stated it should!). Please send me, off list, your ".phy" file
and your ".s19" files.

Also, you mentioned that your debugger "sort of works". What,
specifically, is the problem your experiencing...?

Cheers,
Mark
P&E

bertho_b wrote:

> --- In , "Mark Cukier" <mark@p...> wrote:
> > Hello:
> >
> > I will address your points as best I can, one by one:
> >
>
> Thanks Mark, Things are sort of running by now but here is an
> update and new problems:
>
> Here is an update on my headaches:
>
> The issue about the assembler not understanding the .pagewidth
> directive is apparently because they switched the assembler in the
> last minute and P&E is working on a fix.
>
> First, the P&E assembler does not talk the same language as their
> programmer as you mentioned. I have been reading about the logical
> to physical translation needed if paging is used but since I
> carefully keep my simple test program to one map and stay away from
> the swap page at $8000 I thought it would be OK.
>
> I expected, and still expect, that I should be able to click
> the Icon for assemble, then the Icon for programming and then the
> debug icon.
> No such luck! After fooling around with all kinds of testing and
> talking to P&E, they have been very helpful, I learned that I had to
> use the Logical to Physical converter program before programming.
>
> After downloading Log2Phy and installing it and converting the S19
> files, it got a lot better but there is also something else going on
> that after programming, just starting the debugger will not
> necessarily work. I need to, at least sometimes, do a hard reset or
> two.
>
> Now, my system is sort of limping along and a little confidence is
> building up and then.........
>
> At several places in my source I have "LDAA #$04" for example.
> While debugging my code, it read loaded A with 4, not 5. First I
> thought that there was a corrupt copy in memory but after reloading,
> the same result.
>
> Eventually, I isolated the problem to the Log2Phy converter. I
> really do not understand how it can happen but you can see the
> result on the little file below.
>
> The first 7 times a LDAA # is encountered, it translates it
> correctly but next 6 times is is one count short. Then 3 good ones.
> The translator should not mess with the code at all! Just the
> addresses.
>
> Am I doing something really stupid or what?
> Hopefully, the text below will show up correctly as long as it is in
> mono-spaced font.
>
> TIA for any suggestions,
> Bertho Boman
>
> The original file line is followed by the converted line by Log2Phy.
> I have marked the places where LDAA #nn occurred,
> for example "$86 05"
>
> In the beginning they are translated correctly but
> later they are one short and then OK again.
>
> S113 4000 1410CF2FFF790001180BFF00031640AE E8
> S214 0F8000 1410CF2FFF790001180BFF00031640AE 98
>
> S113 4010 180BFF000186057A100086047A100186 C9
> S214 0F8010 180BFF000186057A100086047A100186 79
> -OK- -OK- -
> S113 4020 037A100286027A100386017A10048637 16
> S214 0F8020 037A100286027A100386017A10048637 C6
> OK -OK- -OK- -OK-
> S113 4030 5ADA86505AD8CC0F011640B51640A2CC 95
> S214 0F8030 5ADA86505AD8CC0F011640B51640A2CC 45
> -OK-
> S113 4040 0F001640B5CC0C011640B5CC0B041640 3D
> S214 0F8040 0F001640B5CC0C011640B5CC0B041640 ED
>
> S113 4050 B5CC09FF1640B5CC0A031640B58605C6 93
> S214 0F8050 B5CC09FF1640B5CC0A031640B58604C6 44
> Bad!
> S113 4060 0F361640B5324326F81640A28605F610 E0
> S214 0F8060 0F361640B5324326F81640A28604F610 91
> Bad!
> S113 4070 001640B58604F610011640B58603F610 06
> S214 0F8070 001640B58603F610011640B58602F610 B8
> Bad! Bad!
> S113 4080 021640B58602F610031640B58601F610 F6
> S214 0F8080 021640B58601B610031640B58600B610 28
> Bad! Bad!
> S113 4090 041640B51640A286555A010705710001 61
> S214 0F8090 041640B51640A286555A010705710001 11
> -OK-
> S113 40A0 20F9CEFFFF86104326FD0926F83DCEFF FA
> S214 0F80A0 20F9CEFFFF86104326FD0926F83DCEFF AA
> -OK-
> S113 40B0 FF0926FD3D7900015ADD4FDB20FC5BDD 65
> S214 0F80B0 FF0926FD3D7900015ADD4FDB20FC5BDD 15
>
> S10F 40C0 4FDB20FC86FF5A013DA720FD C9
> S210 0F80C0 4FDB20FC86FF5A013DA720FD 79
> -OK-
> S10B FFF8 40C940C940C94000 A2
> S20C 0FFFF8 40C940C940C94000 92
>
> S9030000 FC >
>
> Click Here!
> <http://ashnin.com/clk/muryutaitakenattogyo?YH313099&yhad95056" target="_blank" rel="nofollow">http://rd.yahoo.com/M$4522.3313099.4604523.1261774/D=egroupweb/S06554205:HM/A95056/R=0/SIG4fv1soh/*http://ashnin.com/clk/muryutaitakenattogyo?YH313099&yhad95056 >
> -------------------- >
> ">http://docs.yahoo.com/info/terms/>.


--
________________________________
Mark L. Cukier, Design Engineer
P&E Microcomputer Systems
710 Commonwealth Avenue
Boston, MA 02215
______________________________
e-mail:
phone : (617) 353-9206 x19
fax : (617) 353-9205
______________________________

visit us on the web at: http://www.pemicro.com



Reply by bertho_b June 23, 20032003-06-23
--- In , "Mark Cukier" <mark@p...> wrote:
> Hello:
>
> I will address your points as best I can, one by one:
>

Thanks Mark, Things are sort of running by now but here is an
update and new problems:

Here is an update on my headaches:

The issue about the assembler not understanding the .pagewidth
directive is apparently because they switched the assembler in the
last minute and P&E is working on a fix.

First, the P&E assembler does not talk the same language as their
programmer as you mentioned. I have been reading about the logical
to physical translation needed if paging is used but since I
carefully keep my simple test program to one map and stay away from
the swap page at $8000 I thought it would be OK.

I expected, and still expect, that I should be able to click
the Icon for assemble, then the Icon for programming and then the
debug icon.
No such luck! After fooling around with all kinds of testing and
talking to P&E, they have been very helpful, I learned that I had to
use the Logical to Physical converter program before programming.

After downloading Log2Phy and installing it and converting the S19
files, it got a lot better but there is also something else going on
that after programming, just starting the debugger will not
necessarily work. I need to, at least sometimes, do a hard reset or
two.

Now, my system is sort of limping along and a little confidence is
building up and then.........

At several places in my source I have "LDAA #$04" for example.
While debugging my code, it read loaded A with 4, not 5. First I
thought that there was a corrupt copy in memory but after reloading,
the same result.

Eventually, I isolated the problem to the Log2Phy converter. I
really do not understand how it can happen but you can see the
result on the little file below.

The first 7 times a LDAA # is encountered, it translates it
correctly but next 6 times is is one count short. Then 3 good ones.
The translator should not mess with the code at all! Just the
addresses.

Am I doing something really stupid or what?
Hopefully, the text below will show up correctly as long as it is in
mono-spaced font.

TIA for any suggestions,
Bertho Boman

The original file line is followed by the converted line by Log2Phy.
I have marked the places where LDAA #nn occurred,
for example "$86 05"

In the beginning they are translated correctly but
later they are one short and then OK again.

S113 4000 1410CF2FFF790001180BFF00031640AE E8
S214 0F8000 1410CF2FFF790001180BFF00031640AE 98

S113 4010 180BFF000186057A100086047A100186 C9
S214 0F8010 180BFF000186057A100086047A100186 79
-OK- -OK- -
S113 4020 037A100286027A100386017A10048637 16
S214 0F8020 037A100286027A100386017A10048637 C6
OK -OK- -OK- -OK-
S113 4030 5ADA86505AD8CC0F011640B51640A2CC 95
S214 0F8030 5ADA86505AD8CC0F011640B51640A2CC 45
-OK-
S113 4040 0F001640B5CC0C011640B5CC0B041640 3D
S214 0F8040 0F001640B5CC0C011640B5CC0B041640 ED

S113 4050 B5CC09FF1640B5CC0A031640B58605C6 93
S214 0F8050 B5CC09FF1640B5CC0A031640B58604C6 44
Bad!
S113 4060 0F361640B5324326F81640A28605F610 E0
S214 0F8060 0F361640B5324326F81640A28604F610 91
Bad!
S113 4070 001640B58604F610011640B58603F610 06
S214 0F8070 001640B58603F610011640B58602F610 B8
Bad! Bad!
S113 4080 021640B58602F610031640B58601F610 F6
S214 0F8080 021640B58601B610031640B58600B610 28
Bad! Bad!
S113 4090 041640B51640A286555A010705710001 61
S214 0F8090 041640B51640A286555A010705710001 11
-OK-
S113 40A0 20F9CEFFFF86104326FD0926F83DCEFF FA
S214 0F80A0 20F9CEFFFF86104326FD0926F83DCEFF AA
-OK-
S113 40B0 FF0926FD3D7900015ADD4FDB20FC5BDD 65
S214 0F80B0 FF0926FD3D7900015ADD4FDB20FC5BDD 15

S10F 40C0 4FDB20FC86FF5A013DA720FD C9
S210 0F80C0 4FDB20FC86FF5A013DA720FD 79
-OK-
S10B FFF8 40C940C940C94000 A2
S20C 0FFFF8 40C940C940C94000 92

S9030000 FC


Reply by Mark Cukier June 22, 20032003-06-22
Hello:

I will address your points as best I can, one by one:

1) This directive should work. Please e-mail me, offlist, a copy of
your .asm file and I will take a look at it!

2) Is your taskbar "doublestacked"? If so, the status bar in WinIDE will
probably be hiding under the topmost section of the taskbar.

3) This problem is due to the differences between logical and physical
addressing. You never mentioned what breed of HC12 you're using... but
I'll assume that it's one with pages "0-7" rather than "$30-$3F"...

When you're programming address $4000 or do a "SM" at the same address,
(in PROG12Z) this refers to the physical address $4000. However, when
you view $4000 in ICD12Z, you're looking at the contents of logical
address $4000-- which (with my assumption above) would correspond to
page 6 of the physical memory!

The paged flash architectures can prove to be very confusing (at first)
to work with. In the Motorola Device Guide for your MCU, there is a
section called "Operating Modes and Resources" that will outline the
above in considerably more detail. However, to just get the ball
rolling, I suggest you download P&E's "LOG2PHY" Utility. This is a
graphical utility that, when given your processor name and logical
address format .s19 file, will output a new physical address .phy file.
This new file will conform to Motorola EABI specification (which
requires that s-records are in physical address format) and will be
suitable to program using PROG12Z.

3b) The issue with part of your RAM being inaccessible is most likely
due to a resource conflict (for instance, overlapping RAM and EEPROM).
By simply relocating the conflicting resource in the memory map, you
should be able to access the full RAM array.

I hope this has been helpful to you-- if you're still having problems,
please feel free to e-mail me off list and I'll help you resolve them as
best I can.

Cheers,
Mark
P&E

-----Original Message-----
From: "bertho_b" <>
To:
Date: Sun, 22 Jun 2003 00:36:05 -0000
Subject: [68HC12] BDM headaches

> <html><body > <tt>
> I am getting too old for these problems!&nbsp; I have lived through
> 68-<BR>
> 00,02,05,09,11 and now finally 12.<BR>
> <BR>
> I am just starting to learn the HCS12 and have written a very simple
> <BR>
> program, no interrupts and in single page mode using the EVBPlus <BR>
> dragon development board.<BR>
> <BR>
> I have had too many problems trying to get the P&amp;E MultiLink with
> <BR>
> CodeWarrier to work with my XP system.&nbsp; I have gone through the
> <BR>
> whole user group archive, over 3000 messages, and I saw many about <BR>
> parallel printer port problems and BDMs.&nbsp; I tried all the settings
> <BR>
> and some works for a few seconds and others maybe a minute.<BR>
> <BR>
> After wasting way too much time, (it is the first time I use the <BR>
> HCS12), I finally gave up and on Thursday ordered the P%E USB <BR>
> MultiLink for overnight delivery.<BR>
> <BR>
> Well, it came but no drivers for CodeWarrier.&nbsp; Oops!.&nbsp; I
> called <BR>
> Metrowerks.&nbsp; They said &quot;no problem, drivers will be available
> in 3.0 <BR>
> in September.&quot;<BR>
> <BR>
> Frantic call to P&amp;E and I ordered their PKG12Z Windows development
> <BR>
> system.<BR>
> <BR>
> Good news: The USB MultiLink installed painlessly and synced up with
> <BR>
> the board, so far so good.&nbsp; With that long introduction, here are
> <BR>
> finally my questions and problems. I am probably doing something <BR>
> silly but here it goes:<BR>
> <BR>
> Problem #1.<BR>
> Loading the SCI demo program from P&amp;E and assembling it, I get an
> <BR>
> error on the very first line:<BR>
> Error 11: Unrecognized operation-&nbsp; The assembler does not
> recognize <BR>
> the directive .pagewidth 100t.<BR>
> It is easy to bypass by commenting it out and then the program <BR>
> assembles OK.&nbsp; But why??<BR>
> <BR>
> Problem #2.<BR>
> Setting the WinIDE window to &quot;full&quot; by clicking on the icon
> in the <BR>
> upper right corner makes it too large and the status line disappears
> <BR>
> on the bottom.&nbsp; It took me quite a time to figure out why I could
> <BR>
> not see the assembler error messages.<BR>
> <BR>
> Problem #3.<BR>
> After messing around programming the code into the board and trying
> <BR>
> different things I now have a major problem:&nbsp; I can load my
> program <BR>
> in flash, for example at $4000 and I use the &quot;Show Module&quot; to
> verify <BR>
> that it is there.&nbsp; So far so good!<BR>
> <BR>
> Then I switch to debug mode and do a memory dump of the same area <BR>
> and the program is gone!&nbsp; I go back to the programmer and do a
> <BR>
> memory dump and it is good.<BR>
> <BR>
> I also have seen problems where sometimes the RAM from $1000 to <BR>
> $3FFF stops working at $3000.&nbsp; In other words, I can not change
> the <BR>
> RAM in the $3000 to $3FFF range.<BR>
> <BR>
> I get a suspicion that I have something setup wrong on the board or
> <BR>
> that I am missing some option or setting.&nbsp; It looks like an
> address <BR>
> decoding problem but I do not know why.<BR>
> <BR>
> Any suggestions?<BR>
> TIA<BR>
> Bertho Boman<BR>
> Vinland.com<BR>
> <BR>
> </tt>
>
> <br>
>
> <!-- |**|begin egp html banner|**| -->
>
> <table border=0 cellspacing=0 cellpadding=2>
> <tr bgcolor=#FFFFCC>
> <td alignter><font size="-1" color=#003399><b>Yahoo! Groups
> Sponsor</b></font></td>
> </tr>
> <tr bgcolor=#FFFFFF>
> <td alignter widthG0><a
> href="http://rd.yahoo.com/M%1812.3170658.4537139.1261774/D=egroupweb/
> S06554205:HM/A64415/R=0/SIGt6t7kdo/*http://www.netflix.com/Def
> ault?mqso`164784&partid170658"><img
> src="http://us.a1.yimg.com/us.yimg.com/a/ne/netflix/yhoo0303_a_300250.g
> if" alt="" width="300" height="250" border="0"></a></td>
> </tr>
> <tr><td><img alt="" width=1 height=1
> src="http://us.adserver.yahoo.com/l?M%1812.3170658.4537139.1261774/D=
> egroupmail/S=:HM/A64415/rand7895764"></td></tr>
> </table>
>
> <!-- |**|end egp html banner|**| -- > <br>
> <tt>
> --------------------<BR>
> ">http://www.motorola.com/mcu</a><BR>
> </tt>
> <br>
>
> <br>
> <tt>">http://docs.yahoo.com/info/terms/">Yahoo! Terms of
> Service</a>.</tt>
> </br>
>
> </body></html>





Reply by bertho_b June 21, 20032003-06-21
I am getting too old for these problems! I have lived through 68-
00,02,05,09,11 and now finally 12.

I am just starting to learn the HCS12 and have written a very simple
program, no interrupts and in single page mode using the EVBPlus
dragon development board.

I have had too many problems trying to get the P&E MultiLink with
CodeWarrier to work with my XP system. I have gone through the
whole user group archive, over 3000 messages, and I saw many about
parallel printer port problems and BDMs. I tried all the settings
and some works for a few seconds and others maybe a minute.

After wasting way too much time, (it is the first time I use the
HCS12), I finally gave up and on Thursday ordered the P%E USB
MultiLink for overnight delivery.

Well, it came but no drivers for CodeWarrier. Oops!. I called
Metrowerks. They said "no problem, drivers will be available in 3.0
in September."

Frantic call to P&E and I ordered their PKG12Z Windows development
system.

Good news: The USB MultiLink installed painlessly and synced up with
the board, so far so good. With that long introduction, here are
finally my questions and problems. I am probably doing something
silly but here it goes:

Problem #1.
Loading the SCI demo program from P&E and assembling it, I get an
error on the very first line:
Error 11: Unrecognized operation- The assembler does not recognize
the directive .pagewidth 100t.
It is easy to bypass by commenting it out and then the program
assembles OK. But why??

Problem #2.
Setting the WinIDE window to "full" by clicking on the icon in the
upper right corner makes it too large and the status line disappears
on the bottom. It took me quite a time to figure out why I could
not see the assembler error messages.

Problem #3.
After messing around programming the code into the board and trying
different things I now have a major problem: I can load my program
in flash, for example at $4000 and I use the "Show Module" to verify
that it is there. So far so good!

Then I switch to debug mode and do a memory dump of the same area
and the program is gone! I go back to the programmer and do a
memory dump and it is good.

I also have seen problems where sometimes the RAM from $1000 to
$3FFF stops working at $3000. In other words, I can not change the
RAM in the $3000 to $3FFF range.

I get a suspicion that I have something setup wrong on the board or
that I am missing some option or setting. It looks like an address
decoding problem but I do not know why.

Any suggestions?
TIA
Bertho Boman
Vinland.com