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

GCC/GNU code - First run

Expand Messages
  • eleking22
    Hi ken, upon first running the given code i recieve the following: % cd oki % make5k c: Program Files GNUARM bin oki cd ml675k C: Program
    Message 1 of 2 , Jun 2, 2006
    • 0 Attachment
      Hi ken, upon first running the given code i recieve the following:

      % cd oki
      % make5k

      c:\Program Files\GNUARM\bin\oki>cd ml675k

      C:\Program Files\GNUARM\bin\oki\ml675k>mkdir obj
      A subdirectory or file obj already exists.

      C:\Program Files\GNUARM\bin\oki\ml675k>cd obj

      C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.o

      C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.hex

      C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.map

      C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.elf

      C:\Program Files\GNUARM\bin\oki\ml675k\obj>cd ..

      C:\Program Files\GNUARM\bin\oki\ml675k>cd ..

      C:\Program Files\GNUARM\bin\oki>cd ..

      C:\Program Files\GNUARM\bin>arm-elf-gcc -gdwarf-2 -Wall -march=armv4t
      -fno-built
      in -mcpu=arm7tdmi -mlittle-endian -mthumb-interwork -O0 -g -c
      ./oki/ml675k/src/i
      nit.s -o ./oki/ml675k/obj/init.o
      ./oki/ml675k/src/init.s: Assembler messages:
      ./oki/ml675k/src/init.s:155: Error: undefined symbol T_Bit used as an
      immediate
      value

      ~

      child process exited abnormally
      %





      I looked in the define.s file and found that I_Bit and F_Bit from the
      Program Status Register were defined as:

      .global I_Bit
      .global F_Bit

      ~

      .equ I_Bit, 0x80
      .equ F_Bit, 0x40

      Which I changed to

      .global I_Bit
      .global F_Bit
      .global T_Bit

      .equ I_Bit, 0x80
      .equ F_Bit, 0x40
      .equ T_Bit, 0x20

      to be consistent with page 41 of the oki 4001/5001 manual.


      The compile process now goes through, but still throws warnings about
      the stubs:

      __gccmain()
      {
      }


      exit()
      {
      while(1);
      }

      atexit()
      {
      while(1);
      }



      should i be concerned?
    • kendwyer
      Hi Aiden, Yes T_bit should have been defined, you have defined it correctly I have not looked at this in a while and no longer have GNU on my system. I recall
      Message 2 of 2 , Jun 5, 2006
      • 0 Attachment
        Hi Aiden,

        Yes T_bit should have been defined, you have defined it correctly

        I have not looked at this in a while and no longer have GNU on my
        system. I recall that the stubs were necessary but do not remember the
        details as to why, if you don't link the libgcc.a then you need to add
        the stubs....
        ....Maybe someone else can explain the stubs?

        Regards,
        Ken


        --- In OKI-ARM-mcus@yahoogroups.com, "eleking22" <Aiden.Morrison@...>
        wrote:
        >
        > Hi ken, upon first running the given code i recieve the following:
        >
        > % cd oki
        > % make5k
        >
        > c:\Program Files\GNUARM\bin\oki>cd ml675k
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k>mkdir obj
        > A subdirectory or file obj already exists.
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k>cd obj
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.o
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.hex
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.map
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k\obj>del *.elf
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k\obj>cd ..
        >
        > C:\Program Files\GNUARM\bin\oki\ml675k>cd ..
        >
        > C:\Program Files\GNUARM\bin\oki>cd ..
        >
        > C:\Program Files\GNUARM\bin>arm-elf-gcc -gdwarf-2 -Wall -march=armv4t
        > -fno-built
        > in -mcpu=arm7tdmi -mlittle-endian -mthumb-interwork -O0 -g -c
        > ./oki/ml675k/src/i
        > nit.s -o ./oki/ml675k/obj/init.o
        > ./oki/ml675k/src/init.s: Assembler messages:
        > ./oki/ml675k/src/init.s:155: Error: undefined symbol T_Bit used as an
        > immediate
        > value
        >
        > ~
        >
        > child process exited abnormally
        > %
        >
        >
        >
        >
        >
        > I looked in the define.s file and found that I_Bit and F_Bit from the
        > Program Status Register were defined as:
        >
        > .global I_Bit
        > .global F_Bit
        >
        > ~
        >
        > .equ I_Bit, 0x80
        > .equ F_Bit, 0x40
        >
        > Which I changed to
        >
        > .global I_Bit
        > .global F_Bit
        > .global T_Bit
        >
        > .equ I_Bit, 0x80
        > .equ F_Bit, 0x40
        > .equ T_Bit, 0x20
        >
        > to be consistent with page 41 of the oki 4001/5001 manual.
        >
        >
        > The compile process now goes through, but still throws warnings about
        > the stubs:
        >
        > __gccmain()
        > {
        > }
        >
        >
        > exit()
        > {
        > while(1);
        > }
        >
        > atexit()
        > {
        > while(1);
        > }
        >
        >
        >
        > should i be concerned?
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.