Loading ...
Sorry, an error occurred while loading the content.

RE: Star HC12

Expand Messages
  • Al Gelders
    Before I try to reinvent the wheel, is anybody working on this problem? Al Gelders agelders@lightspeed.net ... From: Stephane Carrez [mailto:stcarrez@nerim.fr]
    Message 1 of 8 , Sep 2, 2002
    • 0 Attachment
      Before I try to reinvent the wheel, is anybody working on this problem?

      Al Gelders
      agelders@...



      -----Original Message-----
      From: Stephane Carrez [mailto:stcarrez@...]
      Sent: Wednesday, July 24, 2002 4:49 PM
      To: gnu-m68hc11@yahoogroups.com
      Subject: Re: Star HC12


      Hi!

      Donald E Haselwood wrote:

      > In reading of the docs of the new Star HC12, 9S12DP256, I noticed that

      > the MOVB and MOVW instructions (for PC relative addressing mode) need
      > to be assemble differently from the original HC12 series. Is there
      > provision in the gnu release to handle this?
      >
      >
      > Regards,
      >
      > Donald E Haselwood
      >


      No. If the opcodes or offset calculations are different, the binutils
      must be updated.

      I don't have a board nor the documentation.

      Stephane

      -----------------------------------------------------------------------
      Home Office
      E-mail: stcarrez@... Stephane.Carrez@...
      WWW: http://stephane.carrez.free.fr http://www.solsoft.com
      Free the Software! Visual Security Policy
      Management




      To Post a message, send it to: gnu-m68hc11@...

      To Unsubscribe, send a blank message to:
      gnu-m68hc11-unsubscribe@...

      Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    • Stephane Carrez
      Hi! ... Not that I m aware of, at least. Anyway, if the difference is only for PC relative addressing mode, only GAS and the disassembler (aka GNU Binutils)
      Message 2 of 8 , Sep 2, 2002
      • 0 Attachment
        Hi!

        Al Gelders wrote:

        > Before I try to reinvent the wheel, is anybody working on this problem?
        >
        > Al Gelders
        > agelders@...
        >
        >


        Not that I'm aware of, at least.

        Anyway, if the difference is only for PC relative addressing mode, only GAS
        and the disassembler (aka GNU Binutils) must be adapted. May be that's not
        a big deal.

        Stephane


        -----------------------------------------------------------------------
        Home Office
        E-mail: stcarrez@... Stephane.Carrez@...
        WWW: http://stephane.carrez.free.fr http://www.solsoft.com
        Free the Software! Visual Security Policy Management
      • wileypob
        In case you re curious, the documentation for this is on page 7 of: http://e-www.motorola.com/brdata/PDFDB/docs/EB376.pdf which is the best document I ve found
        Message 3 of 8 , Sep 2, 2002
        • 0 Attachment
          In case you're curious, the documentation for this is on page 7 of:
          http://e-www.motorola.com/brdata/PDFDB/docs/EB376.pdf
          which is the best document I've found detailing the differences
          between the HC12 and HCS12. But since the compiler never generates PC-
          relative MOVs (as far as I know), and I've never needed it in
          assembly, I'm not that concerned about this.

          More problematic is what to do about paging, as has been discussed
          before. How hard would it be to add a -m flag which would cause all
          function calls/returns to use call/rtc? I guess that would still be
          messy since you'd need 24-bit addresses in both gcc and binutils. I
          thought maybe I could modify the generated assembly with a perl
          script to change bsrs/rts to call/rtc, but surely there's a better
          way. Ideas?
          --
          Tim
          --- In gnu-m68hc11@y..., Stephane Carrez <stcarrez@n...> wrote:
          > Hi!
          >
          > Al Gelders wrote:
          >
          > > Before I try to reinvent the wheel, is anybody working on this
          problem?
          > >
          > > Al Gelders
          > > agelders@l...
          > >
          > >
          >
          >
          > Not that I'm aware of, at least.
          >
          > Anyway, if the difference is only for PC relative addressing mode,
          only GAS
          > and the disassembler (aka GNU Binutils) must be adapted. May be
          that's not
          > a big deal.
          >
          > Stephane
          >
          >
          > --------------------------------------------------------------------
          ---
          > Home Office
          > E-mail: stcarrez@n... Stephane.Carrez@s...
          > WWW: http://stephane.carrez.free.fr http://www.solsoft.com
          > Free the Software! Visual Security Policy
          Management
        • Stephane Carrez
          Hi! ... Oops.... I forgot to notify this list. I implemented something in Binutils/Gcc/Gdb. You can have a look at these patches (integrated in CVS FSF):
          Message 4 of 8 , Sep 3, 2002
          • 0 Attachment
            Hi!

            wileypob wrote:

            > In case you're curious, the documentation for this is on page 7 of:
            > http://e-www.motorola.com/brdata/PDFDB/docs/EB376.pdf
            > which is the best document I've found detailing the differences
            > between the HC12 and HCS12. But since the compiler never generates PC-
            > relative MOVs (as far as I know), and I've never needed it in
            > assembly, I'm not that concerned about this.
            >
            > More problematic is what to do about paging, as has been discussed
            > before. How hard would it be to add a -m flag which would cause all
            > function calls/returns to use call/rtc? I guess that would still be
            > messy since you'd need 24-bit addresses in both gcc and binutils. I
            > thought maybe I could modify the generated assembly with a perl
            > script to change bsrs/rts to call/rtc, but surely there's a better
            > way. Ideas?
            > --
            > Tim


            Oops.... I forgot to notify this list. I implemented something
            in Binutils/Gcc/Gdb. You can have a look at these patches (integrated in CVS FSF):

            [PATCH]: Fix gas to handle 68HC12 call and indexed addressing modes
            http://sources.redhat.com/ml/binutils/2002-08/msg00240.html

            [PATCH]: Support new HC11/HC12 relocs in bfd
            http://sources.redhat.com/ml/binutils/2002-08/msg00236.html

            [PATCH]: New option -mlong-calls for 68HC12

            http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00972.html



            I hadn't time to write out something nor document much.

            I've been able to run a gcc validation with -mlong-calls and obtained very good
            results. Pointer to functions do not work yet, but I'll implement something
            using linker-generated trampolines (the function ptr is 16-bit and it redirects
            to a trampoline that does the appropriate call). That's the only solution I've
            found that prevent big changes in gcc to support two pointers (16bit or 24bit).

            For the curious, have a look at the 'relocs in bfd' patch as it explains
            how address and page mappings are implemented.

            Stephane

            -----------------------------------------------------------------------
            Home Office
            E-mail: stcarrez@... Stephane.Carrez@...
            WWW: http://stephane.carrez.free.fr http://www.solsoft.com
            Free the Software! Visual Security Policy Management
          Your message has been successfully submitted and would be delivered to recipients shortly.