• AVR Freaks

Hot!dsPIC33 Linker file modification

Author
jolofman
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2010/09/13 02:21:34
  • Location: 0
  • Status: offline
2010/09/13 02:49:47 (permalink)
0

dsPIC33 Linker file modification


Hi everybody

I'm using the dspic33fj256GP710 microcontroller and i try to develop a bootloader, but i'm experiencing problem to personalize my linker file.
Especially how to remap the interrupt vector in both appplication et bootloader linker file.
I program works fine when i don't use interruption in my application but when i use it, it doesn't work.

Thanks in advance for your help.
#1

11 Replies Related Threads

    jolofman
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2010/09/13 02:21:34
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/13 07:37:48 (permalink)
    0
    Does anyone have an idea? please
    #2
    cawilkie
    Administrator
    • Total Posts : 1996
    • Reward points : 0
    • Joined: 2003/11/07 12:49:11
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/13 08:07:59 (permalink)
    +1 (1)
    The hardware vectors are at fixed locations (defined by hardware).  Simply 'moving' them by editing the linker script will likely produce the results you describe.

    Relocating the the vector tables can only be accomplished by introducing a virtual mapping to the real physical address.  In reality this means mapping the real physical address to another table location...

    I believe there are several application notes that discuss this issue, though I cannot recall their exact titles they should be searchable from the microchip web site (or by searching this forum).  There are many different ways to do this task - the definition of 'best' is often woolly and depends wholly on the application (IMHO).

    Regards
    Calum
    #3
    jolofman
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2010/09/13 02:21:34
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/14 00:55:13 (permalink)
    0
    Thanks Calum for responding
    i did move the vector interruption by editing the linker script but my program doesn't run with maybe i'm missing something.
    You can find attached my application et bootloader linker script, maybe you can point me out wat is wrong with.


    Jolofman

    #4
    cawilkie
    Administrator
    • Total Posts : 1996
    • Reward points : 0
    • Joined: 2003/11/07 12:49:11
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/14 14:23:10 (permalink)
    0
    Hard to tell.  I note that you are remapping only the IVT, are you sure that AIVT is not being used?

    After linking have you inspected the program memory to see if it makes sense?  Ie the IVT entry at index X points the the JIVT entry at index X?

    What are the non-working symptoms?

    Regards
    Calum
    #5
    jolofman
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2010/09/13 02:21:34
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/15 00:38:16 (permalink)
    0
    I think that the problem is in the side of the booltoader linker script because with just when i compile the program and turn it to the microcontroller, the dspic doesn't run, i turned on a led in the program in order to be sure that my bootloader program is running but it doesn't.

    In the bootloader script linker i remapped both IVT and AIVT but in the application i did not.

    Do you have any example of linking script file for dspic?
    I searched in the forum but did not find one with remapping vector.


    Best Regards,

    Jolofman
    #6
    aschen0866
    Super Member
    • Total Posts : 4525
    • Reward points : 0
    • Joined: 2006/01/08 22:18:32
    • Location: San Diego
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/15 10:10:28 (permalink)
    0
    Does the bootloader use interrupt? Why do you remap both IVT and AIVT to the same table? That just defeats the whole purpose of having two interrupt vector tables. Also, what's running on your computer that does the downloading?
    #7
    jolofman
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2010/09/13 02:21:34
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/16 05:10:57 (permalink)
    0
    Yes the Bootloader uses UART interrupt to retrieve data from computer.
    I have a simple application which convert .hex file data to binary data and send it to the dspic thru UART.
    i did make difference between IVT and AIVT, so i'm going just to remap IVT to see how it will affect the program.

    This linker script is having me crazy, the script file for pic18f is easier to remap than those of dspic.
    #8
    jolofman
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2010/09/13 02:21:34
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2010/09/23 08:19:23 (permalink)
    0
    I'm back again, may someone tell me if i can use interrupt et remap vector at the same time in the bootloader?

    Regards,

    Jolofman
    #9
    gaubuali
    Starting Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2008/10/18 09:34:27
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2015/10/01 03:53:59 (permalink)
    0
    Hi all,
    Do you have any update ?
    #10
    Taliesin
    Super Member
    • Total Posts : 130
    • Reward points : 0
    • Joined: 2008/10/08 11:39:35
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2015/10/01 06:32:59 (permalink)
    0
    For what it's worth, I've done Bootloaders for the dsPIC33FJ series, and I've always just avoided the problem of remapping by including the reset and interrupt vector page as part of my app and by disabling interrupts in the Bootloader.  A Bootloader has just one job, and there's no reason that job can't be done with polling rather than interrupts...
     
    Taliesin
    #11
    pavankumaraganur
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2019/08/26 08:14:09
    • Location: 0
    • Status: offline
    Re:dsPIC33 Linker file modification 2019/11/25 04:06:23 (permalink)
    -1 (1)
    Hi All,
     
    Sorry for writing into old post!, I have posted new query on forum but i am not getting replies to it, so i thought to write here.
     
    Can someone check my below post and provide your comments 
    https://www.microchip.com/forums/m1119997.aspx
    #12
    Jump to:
    © 2020 APG vNext Commercial Version 4.5