Page 1 of 2

CORTEX_VTOR_INIT

Posted: Fri May 27, 2016 6:37 am
by alexblack
Hi.
In readme.txt is now written:
- VAR: Cortex-M VTOR initialization is now performed in startup files and
no more in port initialization.
But I can't find any mention of CORTEX_VTOR_INIT constant. How to initialise a Cortex VTOR now?

Re: CORTEX_VTOR_INIT

Posted: Fri May 27, 2016 8:16 am
by Giovanni
Hi,

It is done automatically in the startup file. It is loaded with the start address of the vectors segment (see ld files).

Giovanni

Re: CORTEX_VTOR_INIT

Posted: Fri May 27, 2016 10:26 am
by alexblack
How about KEIL and IAR?

Re: CORTEX_VTOR_INIT

Posted: Fri May 27, 2016 11:13 am
by Giovanni
Not implemented yet but will be aligned.

Giovanni

Re: CORTEX_VTOR_INIT for IAR

Posted: Fri Jun 10, 2016 4:59 am
by Al B
Hi,

I have an IAR implementation that does VTOR initializations as well as interrupt and process stack initializations to 0x55.

Includes all the modified IAR project and .icf files for L476, and modified generic cstartup.s and vectors.s files, and is working fine for me. Should be easy enough to modify for any other STM32 processor.

Problem is, I am new to this group and can't see how to go about posting this.
Suggestions and pointers to procedures on how best to do this would be most appreciated.

Thanks,
Al

Re: CORTEX_VTOR_INIT

Posted: Fri Jun 10, 2016 7:53 am
by Giovanni
Hi Al,

Just attach it in this thread zipped.

Giovanni

Re: CORTEX_VTOR_INIT

Posted: Fri Jun 10, 2016 11:31 pm
by Al B
Hi Giovanni,

Here are the IAR related files that I modified.
Hopefully that it covers all of the changes.
There are also some minor L4xx related typos and things included.
I commented out the VTOR initialization in my local copy of base files (not included), which corresponds to your removal of it in the latest Chibios main stream.
And I deleted all other files from the .zip that weren't changed.

I addition, I also added a readme.txt file in the IAR folder to give guidance on usage and on how to modifying it to handle new processors/boards.

Let me know if you have any problems, or if any suggestions on changes.

Thanks,
Al

Re: CORTEX_VTOR_INIT for IAR

Posted: Wed Jun 15, 2016 5:19 am
by Al B
Hi,

Was adding heap initialization code to analyze some code, and noticed that I submitted an incorrect cstartup.s file.
Here is the correct one including the heap initialization routine, along with all the corresponding IAR files for the L476RG-Nucleo board.
Note there are some minor doc changes in these files as well.

Sorry about that,
Al

Re: CORTEX_VTOR_INIT

Posted: Sun Jun 19, 2016 9:56 am
by Giovanni
Hi,

I merged the startup file but not the demo files, the code needs to be compatible with trunk version, the demo is done for 16.1.x.

Giovanni

Re: CORTEX_VTOR_INIT

Posted: Sun Jun 19, 2016 6:07 pm
by Al B
Hi Giovanni,

That's great. I presume by startup file you mean both the cstartup.s and the vector.s.

Just for my info, does the trunk generally have the latest verified code, and the latest branch (like 16.1.x) is experimental?
What is the trunk based off of, 2.6, 3.0 or what?
i.e. where is the best place to branch from to create L476 projects?

I'll bring the IAR parts onto a L476 trunk project and submit that in a bit.

Thanks,
Al