PIC: Changing location of code

  • Terry Barnaby

    Terry Barnaby - 2007-11-04


    I am trying to implement a software bootlader for a PIC 16f873a.
    To do this I want to create the bootloader code so that it has a small bit
    of code located at 0x0000, but the rest of the code located at the top
    of memory.
    This is to allow the easy use with programs compiled/linked to run at 0x0000.

    I have not been able to work out how to do this.
    I have tried adding "#pragma codeseg BOOTLOADER" and editing the
    linker spec file amoungst other things.

    Any ideas on how to acheive this ?



    • Terry Barnaby

      Terry Barnaby - 2007-11-12

      I have found that this can be achieved by modifying the link script file by adding something like:

      "SECTION NAME=code_bootLoader ROM=page1"

      Where "bootLoader" was the name of the 'C' source file in my case.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks