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

Newbie HC12 Vector Help

Expand Messages
  • John Gerthoffer
    Hi all, I ve modified the Timer.c example and sucessfully compiled it for a HC12D60 target. My question is, I ve looked at the S19 file and do not see where
    Message 1 of 3 , Oct 1, 2001
    • 0 Attachment
      Hi all,

      I've modified the Timer.c example and sucessfully compiled it for a HC12D60
      target. My question is, I've looked at the S19 file and do not see where
      the vector table is being defined. The S records range from 8000-8CFF.

      Typically, when I assemble using a commercial product, I am used to seeing a
      set of S records for the vector table in the FFC2-FFFF range.

      I did not change the interrupts.h file or the vectors.s file. Any hints or
      tips?


      Regards,

      John R. Gerthoffer
    • Stefan Cermak
      ... First of all you should ensure that your vercors.s file points to the right area the lines inside should look like this(entery for pointer standing on
      Message 2 of 3 , Oct 1, 2001
      • 0 Attachment
        > the vector table is being defined. The S records range from 8000-8CFF.
        >
        > Typically, when I assemble using a commercial product, I am used to seeing
        > a set of S records for the vector table in the FFC2-FFFF range.
        >
        First of all you should ensure that your vercors.s file points to the right
        area

        the lines inside should look like this(entery for pointer standing on 0xffcc)

        .word def ; ffcc (MCCTL)

        mext you should check hao you make the S-Record I use


        the makefileentery

        OBJCOPY_FLAGS=--only-section=.text \
        --only-section=.rodata \
        --only-section=.vectors

        #
        # Rule to create an S19 file from an ELF file.
        #
        .elf.s19:
        $(OBJCOPY) --output-target=srec $(OBJCOPY_FLAGS) $< $*.s19


        here in the object_flags the .vectors area is included. I guess if you dont
        use this flag the vector table wount bee included in the S-file.

        By the way, I also use a pure microcontoler 68hc912D. When I started
        compiling my first programm it didn't run/crashed after a view commands. I
        dont know thar the problem was, the page0, data, text or stack area(but I
        think it was the stack)

        Iht problem is that I didnt know how to include the memory.x file, where this
        things are defined, as it is user in the demos. I think the Linkes default
        setup is fitted to some hc12 protoboard. The easiest way to fix this is to
        run the Linker whith a special command, where it writes ist default linker
        script to the console. I Piped it into a file linkerscript. The 4 areas are
        defined quite at the top, and easy to edit. You just have to use this skript
        during linking to get a runable script

        main.elf: $(OBJS) memory.x
        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) -T linkerscript


        Greatings

        Stefan
      • Campbell, Barrie (N-CDI Corp)
        to get the file to read the memory.x file you have to pass a flag to the linker -Wl,-u,-mm68hc12elfb undefines m68hc12elfb, so the linker uses the
        Message 3 of 3 , Oct 2, 2001
        • 0 Attachment
          to get the file to read the memory.x file you have to pass a flag to the
          linker

          -Wl,-u,-mm68hc12elfb

          undefines m68hc12elfb, so the linker uses the m68hc12elfb.x script instead
          of the m68hc12elf.x script

          if you want to edit the scripts themselves, they are in
          /usr/local/m6812-elf/lib/ldscripts

          I am running Linux/GNU, but.....

          And of course, for you '11 users, change the 12's...

          TE

          -----Original Message-----
          From: Stefan Cermak [mailto:cermak@...-graz.ac.at]
          Sent: Tuesday, October 02, 2001 2:41 AM
          To: gnu-m68hc11@yahoogroups.com
          Subject: Re: Newbie HC12 Vector Help



          > the vector table is being defined. The S records range from 8000-8CFF.
          >
          > Typically, when I assemble using a commercial product, I am used to seeing
          > a set of S records for the vector table in the FFC2-FFFF range.
          >
          First of all you should ensure that your vercors.s file points to the right

          area

          the lines inside should look like this(entery for pointer standing on
          0xffcc)

          .word def ; ffcc (MCCTL)

          mext you should check hao you make the S-Record I use


          the makefileentery

          OBJCOPY_FLAGS=--only-section=.text \
          --only-section=.rodata \
          --only-section=.vectors

          #
          # Rule to create an S19 file from an ELF file.
          #
          .elf.s19:
          $(OBJCOPY) --output-target=srec $(OBJCOPY_FLAGS) $< $*.s19


          here in the object_flags the .vectors area is included. I guess if you dont
          use this flag the vector table wount bee included in the S-file.

          By the way, I also use a pure microcontoler 68hc912D. When I started
          compiling my first programm it didn't run/crashed after a view commands. I
          dont know thar the problem was, the page0, data, text or stack area(but I
          think it was the stack)

          Iht problem is that I didnt know how to include the memory.x file, where
          this
          things are defined, as it is user in the demos. I think the Linkes default
          setup is fitted to some hc12 protoboard. The easiest way to fix this is to
          run the Linker whith a special command, where it writes ist default linker
          script to the console. I Piped it into a file linkerscript. The 4 areas are
          defined quite at the top, and easy to edit. You just have to use this skript

          during linking to get a runable script

          main.elf: $(OBJS) memory.x
          $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) -T linkerscript


          Greatings

          Stefan

          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/
        Your message has been successfully submitted and would be delivered to recipients shortly.