This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

about ramfuncs

hi:

I have a question about ramfuncs, i put a ISR in ramfuncs section and i found in .map file there are a word "retain" in it.

I want to know what is the mean of this retain.

thanks!!!

ramfuncs 0 00320000 00000158 RUN ADDR = 00008000
00320000 000000cf SVM.obj (ramfuncs)
003200cf 0000003c DSP2833x_DefaultIsr.obj (ramfuncs:retain)
0032010b 00000020 qsin.obj (ramfuncs)

  • Hello Chuan,

    This has nothing to do with where the device is linked (e.g., load to flash, run from RAM).  Rather, the ISR is not being called by any code visible to the compiler.  Therefore, if it were a regular function it would be a candidate for removal by compiler/linker (unused functions can be removed automatically, depending on the optimization setup).  However, since your ISR(s) were declared using the 'interrupt' keyword, the section containing them is flagged NOT to be removed (i.e., flagged for retention).  The 'retain' you see in the .map file is just a marker indicating that the section was not a candidate for removal.  It is quite correct.

    Regards,

    David