This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

__isr_vector size

Hello,

I just had a look at the gcc_startup_nrf52.S file and now I wonder, what the reason might be for the huge amount of reserved interrupt slots? According to my math, there are 804 bytes reserved. If I have an application and a bootloader on a device, it would sum up to 1,608 bytes. I mean it's not terribly much, but not negligible. Is there a particular reason for this?

Kind regards,

Torsten

Parents
  • Hi

    It was decided that in order to keep the startup code a similar size between devices to reserve the maximum number of interrupts for all 52 cores. There are 128 interrupt vectors reseved, making the vector space 512 bytes. since the last vecotr is in position 58 if I calculate properly, the wasted vectors are 74, or 296 bytes.

    This simplifies the delivery of Nordic compiled code, such as the Master Boot Record and the different softdevices, so the binary delivered works in every device since the addresses used by those images will guaranteed to be free.

    Of course if you need the space you can always modify the vector table size eliminating empty vectors from the last populated vector. There is a risk though that you will be able to trigger that interrupt manually writing into NVIC registers, and the vector fetched will be whatever.

    Hope this helps.

  • By the way, the sizes I am refering are the latest release of the files. There were 240 entires before, but were eliminated since the MBR needed more space and the NVIC had not been instantiated with so many possible interrupts.

Reply Children
No Data
Related