I am sorry I have provided confusing info (now I had a closer look at project) and I am sorry I’ll confuse you a little bit more.It is hard to join all info into short essay.
Please ignore everything related to OSEK. Not necessary to think about if you do not use it. However as I see these command lines are used even they have different meaning and in this case there is no problem to use them. The SW engineer only used the command line for his purpose. So let’s start.
There are more ways how to define interrupt vector table/interrupt_function_vector
/* VECTORS = READ_ONLY 0xFFFE00 TO 0xFFFFFF; intentionally not defined: used for VECTOR commands below */
This can be uncommented when you want to use this space to place there own vector array defined in your SW. The size is selected to cover all possible vectors size. In this case you do not use VECTOR commands (the first one is presented only) placed on the bottom of the prm file.
Vector 0 _Startup
But you create your own array of the vector with the placement in the space which should be presented in the PLACEMENT section if you do not use direct placement of the array at iven address “@” as an alternative.
If you want to use VECTOR commands to define vectors then for example define vector 25:
Vector 0 _Startup
Vector 25 My_vector_25_function
The result is that the interrupt function is then defined:
Interrupt void My_vector_25_function(void) {}
Another approach is to ignore above mentioned and easily use. (Neither additional VECTOR command nor Vectors uncommented):
Interrupt 25 void My_vector_function(void) {}
So back to your question. The organization you presented does:
/* VECTORS = READ_ONLY 0xFFFE00 TO 0xFFFFFF; intentionally not defined: used for VECTOR commands below */
Is commented so the space is not allocated and you can use commands VECTOR or interrupt xx int function() or to define array of interrupt functions at given address “@”.
In this project there is vectors.c file created where interrupt vectors are created as an array of vectors placed at PR_CONST_SECTION(vector):
PR_CONST_SECTION(vector)
const typeVect _vectab[] = {….
There is a definition of section placement in the file S12ZVM_devconfig.h
#define PR_CONST_SECTION(sec_name) \#pragma section const {## sec_name}
Of course, the SW engineer used “vector”definition from prm file:
vector INTO OSVECTORS; /* OSEK */
It is confusing because the project has nothing with OSEK but the space covers entire space. Everything is correct because the vectors are from upper address toward lower addresses and OSEK here is only confusing word.
It would nothing happen if you change the prm file to following content:
/* VECTORS = READ_ONLY 0xFFFE00 TO 0xFFFFFF; intentionally not defined: used for VECTOR commands below */
/* OSVECTORS = READ_ONLY 0xFFFE10 TO 0xFFFFFF; */ /* OSEK interrupt vectors (use your vector.o) */
MY_INTERRUPT_VECTORS = READ_ONLY 0xFFFE00 TO 0xFFFFFF
Andin the section placement:
/*vector INTO OSVECTORS; *//* OSEK */
vector INTO MY_INTERRUPT_VECTORS
I am sorry I think you are now confused more than before.
Best regards,
Ladislav