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

Building the GNU Development Chain

Expand Messages
  • danieljjf
    I m trying to build the development chain for the 68HC11, but I m having all kinds of problems. I ve gotten various different errors depending on if I use old
    Message 1 of 13 , Oct 4, 2009
    • 0 Attachment
      I'm trying to build the development chain for the 68HC11, but I'm having all kinds of problems. I've gotten various different errors depending on if I use old versions of binutils and gcc, new versions, or if I build on OS X or Ubuntu. In fact, I've had no problem whatsoever building it with Cygwin on my Windows machine, but no luck at all on anything resembling real Unix! I would post my specific errors, but there are so many different ones that I suspect the chain is just too old now to work. Has anyone been successful in building it on OS X (or Ubuntu) recently? Any advice you can give would be much appreciated.
      Thanks,
      Daniel
    • jsmcortina
      This is a script I use to build the tool chains and run from a subdirectory below the sources. In my case I have /usr/src/jsm and the sources trees are there.
      Message 2 of 13 , Oct 4, 2009
      • 0 Attachment
        This is a script I use to build the tool chains and run from a subdirectory below the sources.
        In my case I have /usr/src/jsm and the sources trees are there.
        This script is in /usr/src/jsm/build

        You may need to check the target, I'm not using that target as I am building for S12X (that code isn't ready for release yet.)

        ------------------

        #!/bin/sh
        TARGET=m68hc12-elf
        PREFIX=/usr
        PROGPREFIX=$TARGET-

        mkdir binout > /dev/null
        mkdir gccout > /dev/null
        mkdir newlibout > /dev/null

        cd binout
        ../../binutils-2.18/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX
        make || exit
        su root -c "make install" || exit
        make install
        cd ../gccout
        ../../gcc-3.3.6/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX --enable-languages=c
        make || exit
        su root -c "make install" || exit
        make install
        cd ../newlibout
        ../../newlib-1.16.0/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX
        make || exit
        su root -c "make install"
        make install

        ------------------

        James
      • Daniel O'Connor
        ... Out of curiosity, what version are you building? Thanks. -- Daniel O Connor software and network engineer for Genesis Software - http://www.gsoft.com.au
        Message 3 of 13 , Oct 4, 2009
        • 0 Attachment
          On Mon, 5 Oct 2009, jsmcortina wrote:
          > This is a script I use to build the tool chains and run from a
          > subdirectory below the sources. In my case I have /usr/src/jsm and
          > the sources trees are there. This script is in /usr/src/jsm/build
          >
          > You may need to check the target, I'm not using that target as I am
          > building for S12X (that code isn't ready for release yet.)

          Out of curiosity, what version are you building?

          Thanks.

          --
          Daniel O'Connor software and network engineer
          for Genesis Software - http://www.gsoft.com.au
          "The nice thing about standards is that there
          are so many of them to choose from."
          -- Andrew Tanenbaum
          GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
        • danieljjf
          Thanks, James, the script worked great. Strangely enough, it runs exactly the same commands I did when I tried to install manually. The only real difference I
          Message 4 of 13 , Oct 4, 2009
          • 0 Attachment
            Thanks, James, the script worked great. Strangely enough, it runs exactly the same commands I did when I tried to install manually. The only real difference I can see is that it uses --target=m68hc11-elf instead of --target=m6811-elf, which is what the toolchain documentation says to use (and what I tried to no success).

            Now that I have gcc built, do you know how to get gdb working? I tried building 6.2 with the patch from gnu-m68hc11.org, but got the following error:

            make[1]: *** No rule to make target `-lm', needed by `gdb.dSYM'. Stop.

            This seems like a strange target to me, but I have no idea what might be generating it.

            --- In gnu-m68hc11@yahoogroups.com, "jsmcortina" <jsm@...> wrote:
            >
            > This is a script I use to build the tool chains and run from a subdirectory below the sources.
            > In my case I have /usr/src/jsm and the sources trees are there.
            > This script is in /usr/src/jsm/build
            >
            > You may need to check the target, I'm not using that target as I am building for S12X (that code isn't ready for release yet.)
            >
            > ------------------
            >
            > #!/bin/sh
            > TARGET=m68hc12-elf
            > PREFIX=/usr
            > PROGPREFIX=$TARGET-
            >
            > mkdir binout > /dev/null
            > mkdir gccout > /dev/null
            > mkdir newlibout > /dev/null
            >
            > cd binout
            > ../../binutils-2.18/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX
            > make || exit
            > su root -c "make install" || exit
            > make install
            > cd ../gccout
            > ../../gcc-3.3.6/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX --enable-languages=c
            > make || exit
            > su root -c "make install" || exit
            > make install
            > cd ../newlibout
            > ../../newlib-1.16.0/configure --target=$TARGET --prefix=$PREFIX --program-prefix=$PROGPREFIX
            > make || exit
            > su root -c "make install"
            > make install
            >
            > ------------------
            >
            > James
            >
          • jsmcortina
            ... The base code versions are: binutils 2.18 gcc version 3.3.6 newlib 1.16 gdb 6.8 With the latest Stephane Carrez patches applied. Then I ve been doing some
            Message 5 of 13 , Oct 5, 2009
            • 0 Attachment
              --- In gnu-m68hc11@yahoogroups.com, "Daniel O'Connor" <darius@...> wrote:
              >

              > Out of curiosity, what version are you building?
              >
              > Thanks.

              The base code versions are:
              binutils 2.18
              gcc version 3.3.6
              newlib 1.16
              gdb 6.8

              With the latest Stephane Carrez patches applied. Then I've been doing some work on binutils to support S12X instructions and a colleague has done some work on gcc to use those and gdb to talk to the P&E USB BDM module (under Linux) to debug the MC9S12XEP100 chip.

              James
            • jsmcortina
              ... What CPU are you targetting and how are you going to use gdb with it? Until recently I had ignored gdb and for debugging I was still using HIWAVE that
              Message 6 of 13 , Oct 5, 2009
              • 0 Attachment
                --- In gnu-m68hc11@yahoogroups.com, "danieljjf" <mr.theta@...> wrote:
                >
                > Now that I have gcc built, do you know how to get gdb working? I tried building 6.2 with the patch from gnu-m68hc11.org, but got the following error:
                >

                What CPU are you targetting and how are you going to use gdb with it?

                Until recently I had ignored gdb and for debugging I was still using HIWAVE that ships with Codewarrior on a Windows machine and using the P&E USB BDM. This was with MC9S12C64 and MC9S12XEP100.

                Now I can debug the XEP100 from Linux although the support is still a little shaky.

                James
              • Daniel O'Connor
                ... Ahh, I only have HCS12 stuff here.. Is there any work on newer version of gcc? (or LLVM :) ... Wow, how d you get that working? I d be very interested in
                Message 7 of 13 , Oct 5, 2009
                • 0 Attachment
                  On Mon, 5 Oct 2009, jsmcortina wrote:
                  > --- In gnu-m68hc11@yahoogroups.com, "Daniel O'Connor" <darius@...>
                  wrote:
                  > > Out of curiosity, what version are you building?
                  > >
                  > > Thanks.
                  >
                  > The base code versions are:
                  > binutils 2.18
                  > gcc version 3.3.6
                  > newlib 1.16
                  > gdb 6.8
                  >
                  > With the latest Stephane Carrez patches applied. Then I've been doing
                  > some work on binutils to support S12X instructions and a colleague

                  Ahh, I only have HCS12 stuff here..

                  Is there any work on newer version of gcc? (or LLVM :)

                  > has done some work on gcc to use those and gdb to talk to the P&E USB
                  > BDM module (under Linux) to debug the MC9S12XEP100 chip.

                  Wow, how'd you get that working?

                  I'd be very interested in being able to use a P&E BDM :)

                  --
                  Daniel O'Connor software and network engineer
                  for Genesis Software - http://www.gsoft.com.au
                  "The nice thing about standards is that there
                  are so many of them to choose from."
                  -- Andrew Tanenbaum
                  GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
                • jsmcortina
                  ... I briefly tried some of the newer versions and HC11/12 support is horribly broken. After a few days banging my head against the wall I returned to 3.3.6.
                  Message 8 of 13 , Oct 5, 2009
                  • 0 Attachment
                    --- In gnu-m68hc11@yahoogroups.com, "Daniel O'Connor" <darius@...> wrote:
                    >
                    > On Mon, 5 Oct 2009, jsmcortina wrote:
                    > > --- In gnu-m68hc11@yahoogroups.com, "Daniel O'Connor" <darius@>
                    > wrote:
                    > > > Out of curiosity, what version are you building?
                    > > >
                    > > > Thanks.
                    > >
                    > > The base code versions are:
                    > > binutils 2.18
                    > > gcc version 3.3.6
                    > > newlib 1.16
                    > > gdb 6.8
                    > >
                    > > With the latest Stephane Carrez patches applied. Then I've been doing
                    > > some work on binutils to support S12X instructions and a colleague
                    >
                    > Ahh, I only have HCS12 stuff here..
                    >
                    > Is there any work on newer version of gcc? (or LLVM :)

                    I briefly tried some of the newer versions and HC11/12 support is horribly broken. After a few days banging my head against the wall I returned to 3.3.6.
                    >
                    > > has done some work on gcc to use those and gdb to talk to the P&E USB
                    > > BDM module (under Linux) to debug the MC9S12XEP100 chip.
                    >
                    > Wow, how'd you get that working?

                    I asked a colleague....

                    He did get it working to some extent with the MC9S12C64 a few years back too.

                    When I get chance I'll ask him to take another look and see if the P&E BDM kernel module he wrote can support both.

                    James
                  • danieljjf
                    I m targeting the MC68HC11. I was hoping to be able to use the simulator with gdb, which I ve done in the past.
                    Message 9 of 13 , Oct 5, 2009
                    • 0 Attachment
                      I'm targeting the MC68HC11. I was hoping to be able to use the simulator with gdb, which I've done in the past.

                      --- In gnu-m68hc11@yahoogroups.com, "jsmcortina" <jsm@...> wrote:
                      >
                      >
                      >
                      > --- In gnu-m68hc11@yahoogroups.com, "danieljjf" <mr.theta@> wrote:
                      > >
                      > > Now that I have gcc built, do you know how to get gdb working? I tried building 6.2 with the patch from gnu-m68hc11.org, but got the following error:
                      > >
                      >
                      > What CPU are you targetting and how are you going to use gdb with it?
                      >
                      > Until recently I had ignored gdb and for debugging I was still using HIWAVE that ships with Codewarrior on a Windows machine and using the P&E USB BDM. This was with MC9S12C64 and MC9S12XEP100.
                      >
                      > Now I can debug the XEP100 from Linux although the support is still a little shaky.
                      >
                      > James
                      >
                    • Ben Morse
                      My coworker was able to 100% successfully build the tool chain. I do not have all his knowledge, but I will help you the best I can. first off use gcc3.3.6
                      Message 10 of 13 , Oct 5, 2009
                      • 0 Attachment
                        My coworker was able to 100% successfully build the tool chain.  I do not have all his knowledge, but I will help you the best I can.

                        first off use gcc3.3.6

                          export CC=/usr/bin/gcc-3.3

                        You must also have these software packages:
                        • m68hc1x-builder-3.1.tar.gz
                        • GNU binutils 2.15
                        • GCC 3.3.6
                        • GDB 6.4
                        • Newlib 1.12.0

                        Let me know if you need any more help

                        -Ben+

                        On Sun, Oct 4, 2009 at 4:08 PM, danieljjf <mr.theta@...> wrote:
                         

                        I'm trying to build the development chain for the 68HC11, but I'm having all kinds of problems. I've gotten various different errors depending on if I use old versions of binutils and gcc, new versions, or if I build on OS X or Ubuntu. In fact, I've had no problem whatsoever building it with Cygwin on my Windows machine, but no luck at all on anything resembling real Unix! I would post my specific errors, but there are so many different ones that I suspect the chain is just too old now to work. Has anyone been successful in building it on OS X (or Ubuntu) recently? Any advice you can give would be much appreciated.
                        Thanks,
                        Daniel


                      • danieljjf
                        I was able to build GDB 6.8 earlier today, so I now have the whole chain working. Thanks for offering to help, though. Daniel
                        Message 11 of 13 , Oct 5, 2009
                        • 0 Attachment
                          I was able to build GDB 6.8 earlier today, so I now have the whole chain working. Thanks for offering to help, though.

                          Daniel

                          --- In gnu-m68hc11@yahoogroups.com, Ben Morse <bjmorse@...> wrote:
                          >
                          > My coworker was able to 100% successfully build the tool chain. I do not
                          > have all his knowledge, but I will help you the best I can.
                          > first off use gcc3.3.6
                          >
                          > export CC=/usr/bin/gcc-3.3
                          >
                          > You must also have these software packages:
                          >
                          > - m68hc1x-builder-3.1.tar.gz
                          > - GNU binutils 2.15
                          > - GCC 3.3.6
                          > - GDB 6.4
                          > - Newlib 1.12.0
                          >
                          >
                          > Let me know if you need any more help
                          >
                          > -Ben+
                          >
                          > On Sun, Oct 4, 2009 at 4:08 PM, danieljjf <mr.theta@...> wrote:
                          >
                          > >
                          > >
                          > > I'm trying to build the development chain for the 68HC11, but I'm having
                          > > all kinds of problems. I've gotten various different errors depending on if
                          > > I use old versions of binutils and gcc, new versions, or if I build on OS X
                          > > or Ubuntu. In fact, I've had no problem whatsoever building it with Cygwin
                          > > on my Windows machine, but no luck at all on anything resembling real Unix!
                          > > I would post my specific errors, but there are so many different ones that I
                          > > suspect the chain is just too old now to work. Has anyone been successful in
                          > > building it on OS X (or Ubuntu) recently? Any advice you can give would be
                          > > much appreciated.
                          > > Thanks,
                          > > Daniel
                          > >
                          > >
                          > >
                          >
                        • said jello
                          Can you please give me detailed instructions on what you did to build the while chain? I haven t done anything using the 9s12 in several years, and even then I
                          Message 12 of 13 , Oct 6, 2009
                          • 0 Attachment
                            Can you please give me detailed instructions on what you did to build the while chain?
                            I haven't done anything using the 9s12 in several years, and even then I relied heavily on precompiled stuff.
                            Thanks

                            --- On Mon, 10/5/09, danieljjf <mr.theta@...> wrote:

                            From: danieljjf <mr.theta@...>
                            Subject: Re: Building the GNU Development Chain
                            To: gnu-m68hc11@yahoogroups.com
                            Date: Monday, October 5, 2009, 8:58 PM

                             

                            I was able to build GDB 6.8 earlier today, so I now have the whole chain working. Thanks for offering to help, though.

                            Daniel

                            --- In gnu-m68hc11@ yahoogroups. com, Ben Morse <bjmorse@... > wrote:
                            >
                            > My coworker was able to 100% successfully build the tool chain. I do not
                            > have all his knowledge, but I will help you the best I can.
                            > first off use gcc3.3.6
                            >
                            > export CC=/usr/bin/ gcc-3.3
                            >
                            > You must also have these software packages:
                            >
                            > - m68hc1x-builder- 3.1.tar.gz
                            > - GNU binutils 2.15
                            > - GCC 3.3.6
                            > - GDB 6.4
                            > - Newlib 1.12.0
                            >
                            >
                            > Let me know if you need any more help
                            >
                            > -Ben+
                            >
                            > On Sun, Oct 4, 2009 at 4:08 PM, danieljjf <mr.theta@.. .> wrote:
                            >
                            > >
                            > >
                            > > I'm trying to build the development chain for the 68HC11, but I'm having
                            > > all kinds of problems. I've gotten various different errors depending on if
                            > > I use old versions of binutils and gcc, new versions, or if I build on OS X
                            > > or Ubuntu. In fact, I've had no problem whatsoever building it with Cygwin
                            > > on my Windows machine, but no luck at all on anything resembling real Unix!
                            > > I would post my specific errors, but there are so many different ones that I
                            > > suspect the chain is just too old now to work. Has anyone been successful in
                            > > building it on OS X (or Ubuntu) recently? Any advice you can give would be
                            > > much appreciated.
                            > > Thanks,
                            > > Daniel
                            > >
                            > >
                            > >
                            >


                          • danieljjf
                            For binutils, gcc, and newlib, I used the script James gave in an earlier post for this topic (with the specific directories, etc. modified to my
                            Message 13 of 13 , Oct 6, 2009
                            • 0 Attachment
                              For binutils, gcc, and newlib, I used the script James gave in an earlier post for this topic (with the specific directories, etc. modified to my configuration). For gdb, I had to set a number of environment variables:

                              export GCC_FOR_TARGET=m68hc11-elf-gcc
                              export AR_FOR_TARGET=m68hc11-elf-ar
                              export AS_FOR_TARGET=m68hc11-elf-as

                              And so forth. There is one of these variables for each tool in binutils and gcc. After setting them, I configured with:

                              configure --target=m68hc11-elf --program-prefix=m68hc11-elf-

                              You will of course need to change all references to 'm68hc11' to your particular target. I had a few make errors, some of which required manual editing of the Makefile. If you get any of those, let me know and I will be happy to give details.

                              Daniel

                              --- In gnu-m68hc11@yahoogroups.com, said jello <sjellouli@...> wrote:
                              >
                              > Can you please give me detailed instructions on what you did to build the while chain?
                              > I haven't done anything using the 9s12 in several years, and even then I relied heavily on precompiled stuff.
                              > Thanks
                              >
                              > --- On Mon, 10/5/09, danieljjf <mr.theta@...> wrote:
                              >
                              > From: danieljjf <mr.theta@...>
                              > Subject: Re: Building the GNU Development Chain
                              > To: gnu-m68hc11@yahoogroups.com
                              > Date: Monday, October 5, 2009, 8:58 PM
                              >
                              >
                              >
                              >
                              >
                              >
                              >  
                              >
                              >
                              >
                              >
                              >
                              > I was able to build GDB 6.8 earlier today, so I now have the whole chain working. Thanks for offering to help, though.
                              >
                              >
                              >
                              > Daniel
                              >
                              >
                              >
                              > --- In gnu-m68hc11@ yahoogroups. com, Ben Morse <bjmorse@ > wrote:
                              >
                              > >
                              >
                              > > My coworker was able to 100% successfully build the tool chain. I do not
                              >
                              > > have all his knowledge, but I will help you the best I can.
                              >
                              > > first off use gcc3.3.6
                              >
                              > >
                              >
                              > > export CC=/usr/bin/ gcc-3.3
                              >
                              > >
                              >
                              > > You must also have these software packages:
                              >
                              > >
                              >
                              > > - m68hc1x-builder- 3.1.tar.gz
                              >
                              > > - GNU binutils 2.15
                              >
                              > > - GCC 3.3.6
                              >
                              > > - GDB 6.4
                              >
                              > > - Newlib 1.12.0
                              >
                              > >
                              >
                              > >
                              >
                              > > Let me know if you need any more help
                              >
                              > >
                              >
                              > > -Ben+
                              >
                              > >
                              >
                              > > On Sun, Oct 4, 2009 at 4:08 PM, danieljjf <mr.theta@ .> wrote:
                              >
                              > >
                              >
                              > > >
                              >
                              > > >
                              >
                              > > > I'm trying to build the development chain for the 68HC11, but I'm having
                              >
                              > > > all kinds of problems. I've gotten various different errors depending on if
                              >
                              > > > I use old versions of binutils and gcc, new versions, or if I build on OS X
                              >
                              > > > or Ubuntu. In fact, I've had no problem whatsoever building it with Cygwin
                              >
                              > > > on my Windows machine, but no luck at all on anything resembling real Unix!
                              >
                              > > > I would post my specific errors, but there are so many different ones that I
                              >
                              > > > suspect the chain is just too old now to work. Has anyone been successful in
                              >
                              > > > building it on OS X (or Ubuntu) recently? Any advice you can give would be
                              >
                              > > > much appreciated.
                              >
                              > > > Thanks,
                              >
                              > > > Daniel
                              >
                              > > >
                              >
                              > > >
                              >
                              > > >
                              >
                              > >
                              >
                            Your message has been successfully submitted and would be delivered to recipients shortly.