pic32 bootloader Exception Memory

Discussion in 'Embedded Systems and Microcontrollers' started by chrisw1990, Jan 3, 2014.

  1. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    I tried asking stuff in the microchip forum but i got very confused with their layout etc.. hopefully someone here can provide an answer...
    if i have no interrupts in a bootloader.. do i need the exception memory?
    and if i dont.. how do i map this in the bootloader linker script??
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Why would this matter? The bootloader runs once before starting your app code, which then sets the memory as it needs be. If the bootloader reserved something the app does not respect this division and uses everything as it needs... as it should be.

    I messed with PIC32 bootloader scripts a few years back. It took forever to get a set that would work and play together. I imagine since MC has changed the compiler or the linker and that work is broken.
  3. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    Hi Ernie,
    The issue is that the code cant be overwritten, the exception memory anyway, because that (i assume) will have the function pointers to interrupt routines etc...
    Im just struggling at the moment to identify where the different parts of the code go, and what they do.. the main issue i have is that the KSEG1 and KSEG0 are virtual memory, so does that mean that anything in KSEG0 memory regions cannot be mapped to KSEG1 regions?
    the linker im looking at for AN1388 UART bootloader from mchp seems to put the exception table in the same area as the bootloader C code, so needless to say im a little confused