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

Problems with as

Expand Messages
  • wayne
    Hi All, I am currently converting my robots hc11 code to use under the gcc tool chain but I am having a number of problems. When linking I get an error:-
    Message 1 of 5 , Jun 1, 2003
      Hi All,

      I am currently converting my robots hc11 code to use under the gcc tool
      chain but I am having a number of problems. When linking I get an
      error:-

      m6811-elf-as rom.asm -o rom.o -al=rom.lst -as=rom.sym
      m6811-elf-as sercon.asm -o sercon.o -al=sercon.lst -as=sercon.sym
      m6811-elf-as header.asm -o header.o -al=header.lst -as=header.sym
      m6811-elf-ld -o rom rom.o sercon.o header.o -e 0x8000 -Map rom.map
      m6811-elf-ld: region text is full (rom section .text)
      make: *** [all] Error 1

      How to I tell the linker to use a particular memory.xfile???? Secondly
      am I right in defining a text section as .section ".text"??? Have spent
      a while with the GNU info pages but I am a bit stuck


      Many thanks in advance

      Wayne
    • wayne
      I have worked out the -T option to get the linker to user my memory.x file, but its now complaining about page 0 being full!! Wayne ... From: wayne
      Message 2 of 5 , Jun 1, 2003
        I have worked out the -T option to get the linker to user my memory.x
        file, but its now complaining about page 0 being full!!

        Wayne

        -----Original Message-----
        From: wayne [mailto:wayne@...]
        Sent: 01 June 2003 14:30
        To: gnu-m68hc11@yahoogroups.com
        Subject: Problems with as


        Hi All,

        I am currently converting my robots hc11 code to use under the gcc tool
        chain but I am having a number of problems. When linking I get an
        error:-

        m6811-elf-as rom.asm -o rom.o -al=rom.lst -as=rom.sym m6811-elf-as
        sercon.asm -o sercon.o -al=sercon.lst -as=sercon.sym m6811-elf-as
        header.asm -o header.o -al=header.lst -as=header.sym m6811-elf-ld -o rom
        rom.o sercon.o header.o -e 0x8000 -Map rom.map
        m6811-elf-ld: region text is full (rom section .text)
        make: *** [all] Error 1

        How to I tell the linker to use a particular memory.xfile???? Secondly
        am I right in defining a text section as .section ".text"??? Have spent
        a while with the GNU info pages but I am a bit stuck


        Many thanks in advance

        Wayne



        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/
      • imajeff84663
        Although I am not an expert on this stuff, but I wonder if you have allocated the page0 in the memory.x file by this line: page0 (rwx) : ORIGIN = 0x0, LENGTH =
        Message 3 of 5 , Jun 2, 2003
          Although I am not an expert on this stuff, but I wonder if you have
          allocated the page0 in the memory.x file by this line:
          page0 (rwx) : ORIGIN = 0x0, LENGTH = 256

          inside the MEMORY section. I heard it was important. I guess also,
          it helps to know what it is used for. I wouldn't be able to put
          variables in mine because that space in memory is only hardware
          registers (no available ram or rom).
          --jeffs

          --- In gnu-m68hc11@yahoogroups.com, "wayne" <wayne@f...> wrote:
          > I have worked out the -T option to get the linker to user my
          memory.x
          > file, but its now complaining about page 0 being full!!
          >
          > Wayne
          >
          > -----Original Message-----
          > From: wayne [mailto:wayne@f...]
          > Sent: 01 June 2003 14:30
          > To: gnu-m68hc11@yahoogroups.com
          > Subject: Problems with as
          >
          >
          > Hi All,
          >
          > I am currently converting my robots hc11 code to use under the
          gcc tool
          > chain but I am having a number of problems. When linking I get an
          > error:-
          >
          > m6811-elf-as rom.asm -o rom.o -al=rom.lst -as=rom.sym m6811-elf-as
          > sercon.asm -o sercon.o -al=sercon.lst -as=sercon.sym m6811-elf-as
          > header.asm -o header.o -al=header.lst -as=header.sym m6811-elf-ld
          -o rom
          > rom.o sercon.o header.o -e 0x8000 -Map rom.map
          > m6811-elf-ld: region text is full (rom section .text)
          > make: *** [all] Error 1
          >
          > How to I tell the linker to use a particular memory.xfile????
          Secondly
          > am I right in defining a text section as .section ".text"??? Have
          spent
          > a while with the GNU info pages but I am a bit stuck
          >
          >
          > Many thanks in advance
          >
          > Wayne
          >
          >
          >
          > To Post a message, send it to: gnu-m68hc11@e...
          >
          > To Unsubscribe, send a blank message to:
          > gnu-m68hc11-unsubscribe@e...
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
        • imajeff84663
          Oh, I just realized, you were treating memory.x as the entire linker script. http://m68hc11.serveftp.org/doc/ld_doc.html explains how the options work. The
          Message 4 of 5 , Jun 2, 2003
            Oh, I just realized, you were treating memory.x as the entire linker
            script.
            http://m68hc11.serveftp.org/doc/ld_doc.html
            explains how the options work. The "-T" option would tell the name
            of the linker script, which typically includes a file called
            "memory.x" containing the MEMORY section. The linker script files
            are already made. The option you may need to use is "-L", which
            specifies the search path where it will look for the memory.x file.
            Alos, specify the linker script like "". There are different scripts
            for different architectures, found in "m6811-elf/lib/ldscripts/".
            For these you don't need to add the path (it's in the default path).
            I think also the current directory is in the default path.
            Sorry I'm confusing, but if you can see some examples and read about
            the command line options, it will help to decide what you need.

            --- In gnu-m68hc11@yahoogroups.com, "imajeff84663" <imajeffs@h...>
            wrote:
            > Although I am not an expert on this stuff, but I wonder if you
            have
            > allocated the page0 in the memory.x file by this line:
            > page0 (rwx) : ORIGIN = 0x0, LENGTH = 256
            >
            > inside the MEMORY section. I heard it was important. I guess also,
            > it helps to know what it is used for. I wouldn't be able to put
            > variables in mine because that space in memory is only hardware
            > registers (no available ram or rom).
            > --jeffs
            >
            > --- In gnu-m68hc11@yahoogroups.com, "wayne" <wayne@f...> wrote:
            > > I have worked out the -T option to get the linker to user my
            > memory.x
            > > file, but its now complaining about page 0 being full!!
            > >
            > > Wayne
          • imajeff84663
            Here is an example I built successfully yesterday. m6811-elf-as t1.asm -o t1.o -al=t1.lst -as=t1.sym m6811-elf-as t2.asm -o t2.o -al=t2.lst -as=t2.sym
            Message 5 of 5 , Jun 3, 2003
              Here is an example I built successfully yesterday.

              m6811-elf-as t1.asm -o t1.o -al=t1.lst -as=t1.sym
              m6811-elf-as t2.asm -o t2.o -al=t2.lst -as=t2.sym
              m6811-elf-ld -o t.elf t1.o t2.o -e 0x8000 -mm68hc11elfb

              Note that -e does not do anything useful unless the utility which
              reads the .elf file knows what to do with it. I use _start as a
              lable in the source, and to put the address in the start vector at
              0xfffe. The symbol _start is taken in the pre-built linker scripts
              as the execution starting point.

              The -m indicates which pre-built linker script to use, which finds
              memory.x in the current directory. The memory.x file can also be
              found in other directories searched by the -L linker option. It
              defines the page0 memory block.

              The page0 block would hold .page0 section (at least in hc11), which
              has some register variables put in it automatically by the C
              compiler and maybe others.

              ***Contents of memory.x file used***
              /* Fixed definition of the available memory banks.
              See generic emulation script for a user defined configuration.
              */
              MEMORY
              {
              page0 (rwx) : ORIGIN = 0x0, LENGTH = 256
              /* Board with 32K ROM. */
              text (rx) : ORIGIN = 0x8000, LENGTH = 0x8000

              /* And 32K RAM. */
              data : ORIGIN = 0x1040, LENGTH = 0x8000-0x1040
              }
              /* Setup the stack on the top of the data memory bank. */
              PROVIDE (_stack = 0x8000 - 1);
              **************




              --- In gnu-m68hc11@yahoogroups.com, "wayne" <wayne@f...> wrote:
              > I have worked out the -T option to get the linker to user my
              memory.x
              > file, but its now complaining about page 0 being full!!
              >
              > Wayne
              >
              > -----Original Message-----
              > From: wayne [mailto:wayne@f...]
              > Sent: 01 June 2003 14:30
              > To: gnu-m68hc11@yahoogroups.com
              > Subject: Problems with as
              >
              >
              > Hi All,
              >
              > I am currently converting my robots hc11 code to use under the
              gcc tool
              > chain but I am having a number of problems. When linking I get an
              > error:-
              >
              > m6811-elf-as rom.asm -o rom.o -al=rom.lst -as=rom.sym m6811-elf-as
              > sercon.asm -o sercon.o -al=sercon.lst -as=sercon.sym m6811-elf-as
              > header.asm -o header.o -al=header.lst -as=header.sym m6811-elf-ld
              -o rom
              > rom.o sercon.o header.o -e 0x8000 -Map rom.map
              > m6811-elf-ld: region text is full (rom section .text)
              > make: *** [all] Error 1
              >
              > How to I tell the linker to use a particular memory.xfile????
              Secondly
              > am I right in defining a text section as .section ".text"??? Have
              spent
              > a while with the GNU info pages but I am a bit stuck
              >
              >
              > Many thanks in advance
              >
              > Wayne
              >
              >
              >
              > To Post a message, send it to: gnu-m68hc11@e...
              >
              > To Unsubscribe, send a blank message to:
              > gnu-m68hc11-unsubscribe@e...
              >
              > Your use of Yahoo! Groups is subject to
              > http://docs.yahoo.com/info/terms/
            Your message has been successfully submitted and would be delivered to recipients shortly.