SD Card Bootloader (Beta 1)

Page: 12 > Showing page 1 of 2
Author
PIC32 Support
Junior Member
  • Total Posts : 81
  • Reward points : 0
  • Status: offline
2009/02/10 12:49:35 (permalink)
0

SD Card Bootloader (Beta 1)

Looking for a simple way to update firmware on products in the field? SD Cards are incredibly easy to use and readily available thus creating a simple and low-cost method for service personnel to update product already in use in the field. This code enables users to boot load new firmware from an SD Card.

The attached demo code is provided as a beta release. This demo code is intended for evaluation use only and not for use in production intent designs. Modifications to the library are expected prior to the official release of version 1.0.

1) This release targets PIC32 Starter Kit (DM320001) attached to a I/O Expansion Board (DM320002).

2) Start with the readme file
#1

35 Replies Related Threads

    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/23 16:59:39 (permalink)
    0
    I have used this bootloader and the USB bootloader modified to work with an SD card and I'm having trouble with it.  I'm running it on a PIC32MX360F512L part and I've successfully run it with hex files up to 600kB or so.  My most recently hex file is 1.05MB and the bootloader is no longer able to handle it.  The bootloader keeps on chugging through everything thinking everything is fine, but when it tries to jump to the applicaiton, the application doesn't execute.  If I read the code back out of the chip, addresses such as 0x4000, 0x5000, 0x6000, etc have incorrect data.  It appears that part of the preceeding line is copied into the buffer.  For example
     
    :102FF00055414C206D6F646500000000444F530044
    :1030000000000000444F5300444F53206D6F64652F
     
    :102FF00055414C206D6F646500000000444F530044
    :10300000656E61626C657320444F53206D6F64651B
     
    Note how the end of the preceeding line (in bold) is incorrectly duplicated on the following line.
     
    :106FF0006060606060606060000000000000000091
    :107000000000000000000000F0F030303030303080

    :106FF0006060606060606060000000000000000091
    :107000000000000000303000F0F030303030303020

    :10AFF0002842494ABEF7FFFFFFFFFFFF55AD4D6BEB
    :10B00000FFFFFFFF55AD4D6BAA52494ADFFFFFFF1F
     
    :10AFF0002842494ABEF7FFFFFFFFFFFF55AD4D6BEB
    :10B00000FFFFFFFFFFFFFFFFAA52494ADFFFFFFFDD


     
    This pattern repeats itself all the way until the end of the loaded file.
    #2
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/23 17:11:35 (permalink)
    0
    I believe there is a bug in the code. I had the same symptom as you. The area where the pages overlap is written with incorrect data from the previous page buffer. See my post under the usb thumbdrive bootloader for how to fix it:

    http://www.microchip.com/forums/tm.aspx?m=382076

    BTW, it's just a coincidence that your new hex file has exposed the bug. It's not related to file size. It's related to where the memory pages end/begin in your hex file.
    #3
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/23 18:06:34 (permalink)
    0
    Awesome, thanks.  I'll try this when I get to work in the morning.  I remembered seeing your post a couple of weeks ago, I tried looking for it but I couldn't remember what I had searched for in order to find it the first time.
    #4
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/23 18:58:46 (permalink)
    0
    I haven't had time to go back and look for the root cause. I am sure there is a better way to fix the problem. If you find it, please let me know. Other than that bug, the bootloader works very well.
    #5
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/24 05:29:29 (permalink)
    0
    I need to put more time into it, but I don't think that was the correct fix for the problem.  My previous load file no longer works, I get a BL Load Hex: Flash block verification failure.  Error reported by lower layer message now.  If I remove the SD card and reinsert it, I get BL Loader: Error - Hex record checksum mismatch
     
    Edit: I looked at it a bit closer and realized that I didn't have the line
     
    pCopyFrom = &pRecord->data[BlockTargetStart - RecordTargetStart + pRecord->ValidIndex];
     
    but I actually had
     
    pCopyFrom = &pRecord->data[BlockTargetStart - RecordTargetStart];

    I think the search term was just concatenated.  If I used the line of code you provided or the one that says + pRecord->ValidIndex, my new load file loads properly but my old ones won't.  Guess I'll get to start digging into this now :(


    post edited by Noggin - 2009/03/24 05:39:28
    #6
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/24 07:02:08 (permalink)
    0
    I may be on the completely wrong track but this is what it is starting to look like to me.
     
    For the first part of my hex file, the load offets are multiples of 0x10.  Everything works fine.  However, a little less than half way down the hex offsets become multiples of 0x10 + 0x08  (such as 0x08, 0x18, etc).  This is where the problem starts.  I think this is what you meant by "It's related to where the memory pages end/begin in your hex file."
     
    So when the offset is equal to 0x00000008, that is when I get a problem.
     
    Now I just have to figure out how to account for it.  Unfortunately, I'm having a HELL of a time understanding this bootloader code.  Its like everything is a freaking pointer.  I hate pointers.
     
    So here are a few lines from my hex file:
     
    :10fff8000742000048189e891baa93e1d5d91ab276
    :020000041d05d8
    :100008001f9ade819b691861934850384f384f38e2

    After the address gets set to 1D05, the offset of the next record is 8.  This means that the last 8 bytes of the previous record should be copied into the first 8 offsets of the next page.  If I read the hex code back out of the chip after programming it with the real ice i get the following:
     
    :10FFF000FFFFFFFFFFFF38C60742000048189E8939
    :020000041D05D8
    :100000001BAA93E1D5D91AB21F9ADE819B691861A8

    The offsets are converted back to multiples of 0x10, and you can see that the items in bold have been correctly placed in flash. 
     
    After bootloading, the same areas of flash are as follows:
     
    :10FFF000FFFFFFFFFFFF38C60742000048189E8939
    :020000041D05D8
    :100000000742000048189E891F9ADE819B6918618B

    The first line of the bootloaded file is correct, but the second line is not.  The 8 bytes from the previous line were moved into the start of the page, not the additional 8 bytes that should have been.
     
    Now.... i have to figure out where I can "capture" those 8 bytes and place them where they need to go....
    #7
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/24 07:47:44 (permalink)
    0
    Right, anything that doesn't end on an even page boundary will be corrupted.  Most code does end properly as it is generally continuous data.  When you use structures or other data that is not continuous, this is where you will run into problems.  I wish I had more time to figure out the root of the problem.  Please keep me updated as I would like to fix it properly too.  I may have time next week to look at it again but so far my fix is working for me.
    #8
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/24 08:20:20 (permalink)
    0
    I'll let you know what I do, if anything.... the problem is catch 22.  I don't have time to fix this, but I can't ship without fixing it.  I was supposed to ship yesterday.  The bootloader was working great for a week and only failed 3 hours before the FedEx truck came.  its starting to look like my solution will be to write program, load hex file, read back the necessary address range from the chip, and use that as the bootload file.  I really don't want to do that though.
    #9
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/03/24 13:02:34 (permalink)
    0
    i don't have an elegant solution, but this is what I came up with that works.  I don't understand why it works though.
     
    in BLMediaL_LoadFile, after the file is successfully open, I erase  flash with the following:
     
    // File was opened, erase flash
            CurrentAddress = PROGRAM_FLASH_BASE;
            while (CurrentAddress < PROGRAM_FLASH_BASE + PROGRAM_FLASH_LENGTH)
            {
             NVMErasePage((void *)CurrentAddress);
             CurrentAddress += 0x400;
             Flicker_Backlight();
          }
       
    I would have thought CurrentAddress should be incremented by 0x1000, but that doesn't work.
     
    In Loader_ProgramFlashBlock, immediately following the line nvmResult = NVMErasePage((void *)CurrentAddress); I added NVMErasePage( (void*)CurrentAddress + 0x400 );
     
    I wouldn't have thought that line was needed because of the loop above already erased it.
     
    And finally...
     
    unsigned int AddToBlock( FLASH_BLOCK *pFlashBlock, RECORD_STRUCT *pRecord )
    {
        unsigned long int   RecordTargetStart;
        unsigned long int   RecordTargetEnd;
        unsigned long int   BlockTargetStart;
        unsigned long int   BlockTargetEnd;
        unsigned long int   CopySize;
        unsigned char       iCopy;
        unsigned char      *pCopyFrom;
        unsigned char      *pCopyTo;
       
        static unsigned char overlap_data[16];
        static unsigned int overlapped_data_bytes = 0;
        static unsigned char overlap_detected = FALSE;
        static unsigned char block_just_written;
        unsigned int i;
       
        // Calculate the start and end addresses for  record
        RecordTargetStart   = baseAddress + pRecord->LoadOffset + pRecord->ValidIndex;
        RecordTargetEnd     = baseAddress + pRecord->LoadOffset + pRecord->RecordLength;
       
        // Initialize the block address if block is new
        if ( pFlashBlock->blockState == BLOCK_STATE_NEW )
        {
            // Initialize block paramters
            pFlashBlock->address    = RecordTargetStart & BLOCK_ALIGNMENT_MASK;
            pFlashBlock->blockState = BLOCK_STATE_PARTIAL;
            // If the block has already been erased once, we've probably written data to it.
            if (TrackPageEraseTest(pFlashBlock->address))
            {
                // Fill the block buffer from Flash so that we can overlay new data on it and
                // mark it as not erased so we will erase it again before writing this block.
                memcpy(pFlashBlock->data, PA_TO_KVA1(pFlashBlock->address), FLASH_BLOCK_SIZE);
                TrackPageErase(pFlashBlock->address, PAGE_NOT_ERASED);
            }
        }
        // Calculate the start and end addresses for the block
        BlockTargetStart    = pFlashBlock->address;
        BlockTargetEnd      = pFlashBlock->address + FLASH_BLOCK_SIZE;
        // Determine the copy size and from/to addresses
        // (regardless of relative size of record and block buffers).
        if (RecordTargetEnd <= BlockTargetStart)
        {
            // Record target is outside (before) block target
            pFlashBlock->blockState = BLOCK_STATE_READY;
            CopySize = 0;
        }
        else
        {
            if (RecordTargetStart <= BlockTargetStart)
            {
                // Record overlaps start of block
                pCopyFrom = &pRecord->data[BlockTargetStart - RecordTargetStart];
                //pCopyFrom = &pRecord->data[pRecord->ValidIndex];
              pCopyTo   = &pFlashBlock->data[0];
               
                if (RecordTargetEnd <= BlockTargetEnd)
                {
                    // Record ends before block ends
                    CopySize = RecordTargetEnd - BlockTargetStart;
                }
                else
                {
                    // Block ends before record ends
                    CopySize = FLASH_BLOCK_SIZE;
                }
                // Reduce the record length by the date we're copying
                pRecord->RecordLength -= CopySize;
            }
            else
            {
                if (RecordTargetStart < BlockTargetEnd)
                {
                    // Record starts before block ends
                    pCopyFrom = &pRecord->data[pRecord->ValidIndex];
                    pCopyTo   = &pFlashBlock->data[RecordTargetStart - BlockTargetStart];
                    if (RecordTargetEnd <= BlockTargetEnd)
                    {
                        // Record contained entirely within block
                        CopySize = RecordTargetEnd - RecordTargetStart;
                    }
                    else
                    {
                        // Record overlaps end of block
                        CopySize = BlockTargetEnd - RecordTargetStart;
                        overlap_detected = TRUE;
                        overlapped_data_bytes = RecordTargetEnd - BlockTargetEnd;
                    }
                    // Update the record valid data index
                    pRecord->ValidIndex += CopySize;
                }
                else
                {
                    // Record target is outside (after) block target
                    pFlashBlock->blockState = BLOCK_STATE_READY;
                    CopySize = 0;
                }
            }
        }
       
        // Copy data from the record buffer to the block buffer
        for (iCopy=0; iCopy < CopySize; iCopy++)
        {
            pCopyTo[iCopy] = pCopyFrom[iCopy];
        }
       
        if (block_just_written)
        {
         if (overlapped_data_bytes)
           {
            for (i = 0; i < overlapped_data_bytes; i++)
               pFlashBlock->data = overlap_data;
            overlapped_data_bytes = 0;
         }
         block_just_written = FALSE;
      }
     
        if (overlap_detected)
        {
         pCopyFrom = &pRecord->data[iCopy];
           for (i = 0; i < overlapped_data_bytes; i++)
           {
            overlap_data = pCopyFrom;
         }
         overlap_detected = FALSE;
        }
        // Return TRUE of the block is ready to program to Flash
        if (pFlashBlock->blockState == BLOCK_STATE_READY)
        {
           block_just_written = TRUE;
           return TRUE;
        }
       
        return FALSE;
    } // AddToBlock
     
    ~~~~~~~~~~~~~~~~~~~~~~~
     
    This solution is FAR from elegant, and I have very little faith that it will work in all situations.  However, I think I can ship this today now and fix the bootloader later. 
    #10
    aemili
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2009/04/09 06:18:18
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/05/07 06:58:07 (permalink)
    0
    Hi,
    I'm try to developt in my project with PIC32MX460F512L the SD bootloader. It work so so..
    In my application code there is the USB msd (SD) functionality.
    When I load my application whit MPLAB and debbugger all work well, and when I connect my device whit USB port of PC, my desktop recognize it like a mass storage device.
    Instead when load my application with bootloader all work well(Graphical, SD and other) but USB functionality do not run well. When I try to connect my device to PC USB port, the PC tell me with a window that the device is not recognized.
    Maybe the problems there are in linker file, but I make some attempts whit bad results.
    Sorry for my bad English I'm Italian. :-)
    Regards,
    Andrea
    #11
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/05/07 11:54:55 (permalink)
    0
    Hi Andrea,

    I recommend you read the program flash of the device that you programmed and see if it matches your hex file.  I would be willing to bet that the area just before a page break (every 4096 bytes) is corrupted in places.  Take a look and let us know.
    #12
    aemili
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2009/04/09 06:18:18
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/05/08 01:44:29 (permalink)
    0
    Thank you for answer.
    Now my problem is resolve. The problem was the MCU's inizialization parameters. I think that when the program start in application mode the MCU parameters are the parameters in application. In Bootloader mode I set MCU to work more slow and USB don't start, I know that MCU speed for USB must > 48MHz. Now I set application's MCU parameter also in bootloader program and all go well. I hope that my explanation is understandable:-)!
    I follow your suggestion to see the memory. In MPLAB I work with the bootloader program. I enable the watch memory and but I can see only the bootloader code. The memory area where should be the application program is all 0xFF.
    is it strange?
    #13
    tvnpe
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2008/05/09 12:29:48
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/08/25 11:21:26 (permalink)
    0
    Hi All,

    I am successfully recompile the SD Card Bootloader and download it to the Explore16 board with the SD Card module and it works. Now I want to use my own application code, instead of the blinking LEDs application that is provided. My question is can I just replace the application main.c that is provided with my own application code and recompile would that works? any help would appreciated, thanks.

    Tuan
    #14
    aemili
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2009/04/09 06:18:18
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/08/26 00:27:44 (permalink)
    0
    Hi,
    for bootloader your application code, you must recompile it with a opportune "procdefs.ld". This file tell to compilator in what area of flash memory place the application code. Then in your program folder take the *.hex file and fill it in SD card. When the bootloader start see in SD card if there is an opportune *.hex file and copy it in application code area memory.
    #15
    tvnpe
    New Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2008/05/09 12:29:48
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/08/26 08:57:04 (permalink)
    0
    Hi,

    I am a little bit lost, what do you mean by opportune "procdefs.ld". I guess I don't know what is "opportune" is that a file in the directory that I should be using? thank you for your help.

    Tuan
    #16
    Noggin
    Junior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2008/07/07 14:49:34
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/09/08 18:59:14 (permalink)
    0
    I think he means "appropriate" instead of "opportune."  Other than that, his description is pretty spot on.

    Look in the example code for a file named "procdefs.ld".  As aemili stated, this file tells the linker where to place the application code.  The bootloader will need a procdefs.ld file as well when it is compiled.
    #17
    rubes99
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2009/10/02 06:46:12
    • Location: 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2009/10/14 11:57:49 (permalink)
    0
    When using an Explorer 16 board what changes do I have to make, I have yet to take a look at the program but I think I am going to try to use the Fatfs folder to change the file system
    #18
    microcoder
    Starting Member
    • Total Posts : 73
    • Reward points : 0
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2010/01/14 09:52:27 (permalink)
    0
    With c32 code optimization on, I managed to build a sdcard bootloader with this beta release that is less than 12kB.

    How should I modify the procdefs.ld to put this bootloader into the 12kB Boot Flash section @0xBFC00000, that is documented in the pic32mx3xx/4xx datasheet (DS61143C) page 104.
    In the pic32 serial bootloader example, the bootloader seems to be stored in boot flash, but its size is limited to 8064 bytes. It seems that the rest is reserved for Debug executive (see "PIC32 Serial Boot Loader.chm" in this link:
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en536741

    Can I still debug the bootloader with MPLAB if I store it in this boot flash area?

    Concerning the application, can I use the default pic32 linker script?

    regards,

    microcoder
    #19
    JT
    New Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2006/12/15 02:47:22
    • Location: Dijon - FRANCE
    • Status: offline
    RE: SD Card Bootloader (Beta 1) 2010/01/26 04:09:13 (permalink)
    0
    Hello Microcoder,
    I'm trying to do the same thing but with no result. I took the procdefs.ld file from the microchip serial bootloader and put it in the sd bootloader but when i'im trying to compile i got these errors:
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02008 of .\resources\bootloader.elf section .vector_0 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02020 of .\resources\bootloader.elf section .vector_1 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02040 of .\resources\bootloader.elf section .vector_2 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02060 of .\resources\bootloader.elf section .vector_3 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02080 of .\resources\bootloader.elf section .vector_4 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc020a0 of .\resources\bootloader.elf section .vector_5 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc020c0 of .\resources\bootloader.elf section .vector_6 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc020e0 of .\resources\bootloader.elf section .vector_7 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02100 of .\resources\bootloader.elf section .vector_8 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02120 of .\resources\bootloader.elf section .vector_9 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02140 of .\resources\bootloader.elf section .vector_10 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02160 of .\resources\bootloader.elf section .vector_11 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02180 of .\resources\bootloader.elf section .vector_12 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc021a0 of .\resources\bootloader.elf section .vector_13 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc021c0 of .\resources\bootloader.elf section .vector_14 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc021e0 of .\resources\bootloader.elf section .vector_15 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02200 of .\resources\bootloader.elf section .vector_16 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02220 of .\resources\bootloader.elf section .vector_17 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02240 of .\resources\bootloader.elf section .vector_18 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02260 of .\resources\bootloader.elf section .vector_19 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02280 of .\resources\bootloader.elf section .vector_20 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc022a0 of .\resources\bootloader.elf section .vector_21 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc022c0 of .\resources\bootloader.elf section .vector_22 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc022e0 of .\resources\bootloader.elf section .vector_23 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02300 of .\resources\bootloader.elf section .vector_24 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02320 of .\resources\bootloader.elf section .vector_25 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02340 of .\resources\bootloader.elf section .vector_26 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02360 of .\resources\bootloader.elf section .vector_27 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02380 of .\resources\bootloader.elf section .vector_28 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc023a0 of .\resources\bootloader.elf section .vector_29 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc023c0 of .\resources\bootloader.elf section .vector_30 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc023e0 of .\resources\bootloader.elf section .vector_31 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02400 of .\resources\bootloader.elf section .vector_32 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02420 of .\resources\bootloader.elf section .vector_33 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02440 of .\resources\bootloader.elf section .vector_34 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02460 of .\resources\bootloader.elf section .vector_35 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02480 of .\resources\bootloader.elf section .vector_36 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc024a0 of .\resources\bootloader.elf section .vector_37 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc024c0 of .\resources\bootloader.elf section .vector_38 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc024e0 of .\resources\bootloader.elf section .vector_39 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02500 of .\resources\bootloader.elf section .vector_40 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02520 of .\resources\bootloader.elf section .vector_41 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02540 of .\resources\bootloader.elf section .vector_42 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02560 of .\resources\bootloader.elf section .vector_43 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02580 of .\resources\bootloader.elf section .vector_44 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc025a0 of .\resources\bootloader.elf section .vector_45 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc025c0 of .\resources\bootloader.elf section .vector_46 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc025e0 of .\resources\bootloader.elf section .vector_47 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02600 of .\resources\bootloader.elf section .vector_48 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02620 of .\resources\bootloader.elf section .vector_49 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02640 of .\resources\bootloader.elf section .vector_50 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02660 of .\resources\bootloader.elf section .vector_51 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02680 of .\resources\bootloader.elf section .vector_52 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc026a0 of .\resources\bootloader.elf section .vector_53 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc026c0 of .\resources\bootloader.elf section .vector_54 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc026e0 of .\resources\bootloader.elf section .vector_55 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02700 of .\resources\bootloader.elf section .vector_56 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02720 of .\resources\bootloader.elf section .vector_57 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02740 of .\resources\bootloader.elf section .vector_58 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02760 of .\resources\bootloader.elf section .vector_59 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc02780 of .\resources\bootloader.elf section .vector_60 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc027a0 of .\resources\bootloader.elf section .vector_61 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc027c0 of .\resources\bootloader.elf section .vector_62 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc027e0 of .\resources\bootloader.elf section .vector_63 is not within region exception_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: address 0x9fc09060 of .\resources\bootloader.elf section .text is not within region kseg0_program_mem
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .text [9fc00490 -> 9fc0905f] overlaps section .app_excpt [9fc01f80 -> 9fc01f8f]
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .rodata [9fc00490 -> 9fc00783] overlaps section .text [9fc00490 -> 9fc0905f]
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .data [9fc00784 -> 9fc00877] overlaps section .text [9fc00490 -> 9fc0905f]
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: section .sdata [9fc00878 -> 9fc00887] overlaps section .text [9fc00490 -> 9fc0905f]
    C:\Program Files\Microchip\MPLAB C32 Suite\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\..\pic32mx\bin\ld.exe: .\resources\bootloader.elf: section .text lma 0x9fc00490 overlaps previous sections
    Link step failed.


    Have you managed to put the booloader code in the boot flash area of the PIC32 (I'm using a pic32mx360F512L).

    regards.

    Jannick

    Jannick TRONCIN
    3C CONCEPT S.A.S
    France
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2017 APG vNext Commercial Version 4.5