STM32 Cortex-M3

Hi all,

OBS1: i'm not a specialist in C.

running the ADC example we have this code in configuration function. I dont know if this lib package is distributed by keil or ST. I received it from ST people with some keil examples.

#else /* VECT_TAB_FLASH */
/* Set the Vector Table base location at 0x08000000*/
NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);

the NVIC_SetVectorTable function is:

void NVIC_SetVectorTable(u32 NVIC_VectTab, u32 Offset)
/* Check the parameters */

SCB->ExceptionTableOffset = NVIC_VectTab | (Offset & (u32)0x1FFFFF80);

so, compiling this code with keil it is a 4798 bytes long. But if i hide the function call and write all the code inside the function...

#else /* VECT_TAB_FLASH */
/* Set the Vector Table base location at 0x08000000 */
//NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);


SCB->ExceptionTableOffset = NVIC_VectTab_FLASH | (0x0 & (u32)0x1FFFFF80);

... the code is 3682 bytes long. I think that 1k for this function is so much. Can anyone explain what is happening? (forget about the assert function because i disabled #DEBUG)


More questions in this forum