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); #endif
the NVIC_SetVectorTable function is:
void NVIC_SetVectorTable(u32 NVIC_VectTab, u32 Offset) { /* Check the parameters */ assert(IS_NVIC_VECTTAB(NVIC_VectTab)); assert(IS_NVIC_OFFSET(Offset)); 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); assert(IS_NVIC_VECTTAB(NVIC_VectTab_FLASH)); assert(IS_NVIC_OFFSET(0x0)); SCB->ExceptionTableOffset = NVIC_VectTab_FLASH | (0x0 & (u32)0x1FFFFF80); #endif
... 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)
thanks!
So, if you pick up 100 of my posts and look at them - exactly how many references to "read the manual" do you think you will find?
When the OP has a question where there is a possibility to "share experience", my posts contains very specific information about what to think about. No, I do absolutely refuse to read other peoples data sheets, but my answers very specifically mentions what to think about in generic terms.
The only post you have received from me in this thread is a note that this isn't the official support channel, and that the people here are not payed. That must really have hurt you, since you immediately suggests banning...
A quick check of the threads currently on the first page: 10160: I wrote how I usually use common global memory to share between different seldom used functions. I also makes a not about a new alias being used. 10151: I mentioned that people here are not payed. 10155: I wrote that the code was not complete, and not readable. I also mentioned a test to deduce if the problem was in read or write code. 10161: I mentioned that code size was not the size of object files. 10166: I asked a couple of questions about how Hebrew characters were used in the project. 10117: Huge amounts of "sharing experience" about use of ADC.
That completes the list of threads that I - to my knowledge - have posted in for the first page of threads. Not a reference to "read the manual". In 10117, I have one or two posts telling how problems are normally solved, but mentioning that the specificS of the individual chip requires the OP to read the data sheet for that chip. I think not being paid gives me the right to not post debugged turn-key source code.
Obviously a reason for banning, since I'm not helpfull...