EmbeddedRelated.com
Forums
Memfault Beyond the Launch

HCS12 Bank Switch

Started by Phillip Mastroianni February 21, 2005
How does the compiler deal with bank switching? We current are using
9s12DP256 processor which uses banked memory. If there is a document
which I can read that would be helpful. Also this process use .5u SST
flash, which requires a fixed length srecord. Does the current build
tools properly format the srecord or do I need to execute the srecord
convert uitil to properly format?

Thanks



Re: HCS12 Bank Switch
Re: HCS12 Bank Switch

--- In , Phillip Mastroianni <phil@s...> wrote:
> How does the compiler deal with bank switching? We current are using

What compiler was that, again?



Individual compilers do it differently, there is no standard. Particular
implementations can greatly effect the efficeincy of the code.

The SST flash itself places no restrictions on the length of S-Records.
This is a function of the programming software.

Dave Phillip Mastroianni wrote:

> How does the compiler deal with bank switching? We current are using
> 9s12DP256 processor which uses banked memory. If there is a document
> which I can read that would be helpful. Also this process use .5u SST
> flash, which requires a fixed length srecord. Does the current build
> tools properly format the srecord or do I need to execute the srecord
> convert uitil to properly format?
>
> Thanks >
> >.




FYI, the S12 devices use 0.25um split gate flash.

Jim
www.freegeeks.net

----- Original Message -----
From: "Phillip Mastroianni" <>
To: <>
Sent: Monday, February 21, 2005 8:46 PM
Subject: [68HC12] HCS12 Bank Switch >
> How does the compiler deal with bank switching? We current are using
> 9s12DP256 processor which uses banked memory. If there is a document
> which I can read that would be helpful. Also this process use .5u SST
> flash, which requires a fixed length srecord. Does the current build
> tools properly format the srecord or do I need to execute the srecord
> convert uitil to properly format?
>
> Thanks >
>
> Yahoo! Groups Links >




Actually, the Flash limitation is in the hardware. Must write 16-bit
aligned words at a time. In my compiler, GCC, I have the linker script
align each rom section so it will end on the right note.

The "easy" solution though is to use SRecCvt.exe (download from
Freescale, or comes with some packages). It works in Linux too with
wine. It's just what the Dr ordered.

--- In , "Dr. David A. Perreault" <dap@p...> wrote:

> The SST flash itself places no restrictions on the length of S-Records.
> This is a function of the programming software.
>
> Dave > Phillip Mastroianni wrote:
>
> > How does the compiler deal with bank switching? We current are using
> > 9s12DP256 processor which uses banked memory. If there is a document
> > which I can read that would be helpful. Also this process use .5u SST
> > flash, which requires a fixed length srecord. Does the current build
> > tools properly format the srecord or do I need to execute the srecord
> > convert uitil to properly format?
> >
> > Thanks
> >
> >
> >
> >
> >
> >

> > >.
> >
> >




--- In , "Jefferson Smith" <imajeffs@h...>
wrote:
>
> --- In , Phillip Mastroianni <phil@s...>
wrote:
> > How does the compiler deal with bank switching? We current are
using
>
> What compiler was that, again?

I would like to use http://m68hc11.serveftp.org/m68hc11_port.php




--- In , "phillipmastroianni" <phil@s...> wrote:
>
> --- In , "Jefferson Smith" <imajeffs@h...>
> wrote:
> >
> > --- In , Phillip Mastroianni <phil@s...>
> wrote:
> > > How does the compiler deal with bank switching? We current are
> using
> >
> > What compiler was that, again?
>
> I would like to use http://m68hc11.serveftp.org/m68hc11_port.php

That is my favorite, because it's free with source code, and it is
very powerful.

The memory banks map to space above 0xffff. If you look at Appendix A
in the "Reference Guide For D-Bug12 Version 4.x.x", it shows mapping like
Linear Addr Range PPAGE
0xc0000 - 0xc3fff 0x30

In gcc-m68hc1x (the compiler you found), ppage 0x30 is mapped to the
linear addr + 0x10000. In other words,
GCC virtual addr PPAGE
0xd0000 - 0xd3fff 0x30

if you called a 'far' function which was placed in this region (ppage
0x30), the compiler automatically calls the function with the proper
ppage value.



Memfault Beyond the Launch