6809 support

2014-02-03
2014-02-04
  • Hi,

    I'm looking for an OSS 6809 C compiler, but cannot find one. As SDCC is partly based on ASXXXX, which has 6809 support, why is it that SDCC has no 6809 target?

    How hard would it be to add 6809 support for SDCC? If it is doable, would anyone be willing to help getting me started in adding 6809 support to SDCC?

    Regards,
    Johan

     
    • -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Am 03.02.2014 12:12, schrieb Johan Van den Brande:

      Hi,

      I'm looking for an OSS 6809 C compiler, but cannot find one. As
      SDCC is partly based on ASXXXX, which has 6809 support, why is it
      that SDCC has no 6809 target?

      While I like the 6809 architecture, and it would be interesting to
      write an sdcc port for it, there already is a gcc port:
      https://code.google.com/p/gcc6809/

      Philipp

      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1
      Comment: Using GnuPG with Icedove - http://www.enigmail.net/

      iEYEARECAAYFAlLvhZkACgkQbtUV+xsoLpqQ7QCg7n0QdhbDn7mUib86TuLgUQzu
      6SgAnjXIpA2YDPYlI9xecxFUZuTVtmPN
      =eFTS
      -----END PGP SIGNATURE-----

       
      • Yes, indeed. I already found out about the gcc port, but I'm not sure if that is exactly what I want. I do not only need to have a working C compiler, but also basic libraries and runtime support.

        I thought sdcc would be a better choice then gcc because sdcc is targeted towards smaller CPUs. Is that assumption correct, or is it better to go for the gcc port?

         
        • -----BEGIN PGP SIGNED MESSAGE-----
          Hash: SHA1

          Am 03.02.2014 15:57, schrieb Johan Van den Brande:

          Yes, indeed. I already found out about the gcc port, but I'm not
          sure if that is exactly what I want. I do not only need to have a
          working C compiler, but also basic libraries and runtime support.

          I thought sdcc would be a better choice then gcc because sdcc is
          targeted towards smaller CPUs. Is that assumption correct, or is
          it better to go for the gcc port?

          I believe that sdcc is better suited to the 6809. sdcc's register
          allocator should do really well for the 6809 architecture. On the
          other hand, gcc has better high-level optimzations.
          If you just want a compiler you can use: Use gcc. Compiling or
          adapting some runtime library will be easy. Making an sdcc port will
          be far more effort, even though it probably would result in somewhat
          better code in the end.

          Philipp

          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1
          Comment: Using GnuPG with Icedove - http://www.enigmail.net/

          iEYEARECAAYFAlLxBJEACgkQbtUV+xsoLpoUKwCfSLqRvNXXJzIdwb/y/KQMn7Kh
          VHwAn1Rn+V3RN8r71TCiCmDVbzuoTiej
          =FQ1C
          -----END PGP SIGNATURE-----

           
  • Tormod Volden
    Tormod Volden
    2014-02-03

    Another GPL-licensed compiler, lwcc, is under construction by Wiliam Astle. I found it in his lwtools repository but I don't think he has announced it yet:
    http://lwtools.projects.l-w.ca/hg/index.cgi/file/a3e277c58df9/lwcc/README.txt

    Otherwise, the 6809 is not so different from the 68HC08 already supported by SDCC so adding 6809 support could be relatively easy.

     
    • -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Am 03.02.2014 21:24, schrieb Tormod Volden:

      Another GPL-licensed compiler, lwcc, is under construction by
      Wiliam Astle. I found it in his lwtools repository but I don't
      think he has announced it yet:
      http://lwtools.projects.l-w.ca/hg/index.cgi/file/a3e277c58df9/lwcc/README.txt

      Otherwise, the 6809 is not so different from the 68HC08 already
      supported by SDCC so adding 6809 support could be relatively easy.

      In case anyone decides to write an sdcc port for the 6809: Please
      don't base it on the hc08 port. The hc08 port is a good port, but it
      is not well suited for the 6809, since the 6809 has an efficient
      addressing mode for stack-pinter-relative-addressing.
      Here are my rough recommendations on which port to look at as an
      example when writing a new port:

      Architecture with many registers, which are mostly the same: mcs51 port.

      Architecture with many registers, which are different: z80 port.

      Architecture with few registers, that does not have efficent
      stack-pointer-relative addressing: hc08 port.

      Architecture with few registers that has efficient
      stack-pointer-relative addressing: stm8 port.

      Philipp

      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1
      Comment: Using GnuPG with Icedove - http://www.enigmail.net/

      iEYEARECAAYFAlLxA70ACgkQbtUV+xsoLpon9wCeJPSaSWiqo6exKvK2VtcBQD5I
      W8EAoJn/9gnFCUMGSP4f/TbVTWEr3SF+
      =3wH8
      -----END PGP SIGNATURE-----