CORTEX_VTOR_INIT

Discussions and support about ChibiOS/RT, the free embedded RTOS.
alexblack
Posts: 193
Joined: Mon Sep 24, 2012 3:52 pm
Location: Donetsk
Been thanked: 10 times
Contact:

CORTEX_VTOR_INIT

Postby alexblack » Fri May 27, 2016 6:37 am

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?

User avatar
Giovanni
Site Admin
Posts: 11935
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 535 times
Been thanked: 447 times
Contact:

Re: CORTEX_VTOR_INIT

Postby Giovanni » Fri May 27, 2016 8:16 am

Hi,

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

Giovanni

alexblack
Posts: 193
Joined: Mon Sep 24, 2012 3:52 pm
Location: Donetsk
Been thanked: 10 times
Contact:

Re: CORTEX_VTOR_INIT

Postby alexblack » Fri May 27, 2016 10:26 am

How about KEIL and IAR?

User avatar
Giovanni
Site Admin
Posts: 11935
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 535 times
Been thanked: 447 times
Contact:

Re: CORTEX_VTOR_INIT

Postby Giovanni » Fri May 27, 2016 11:13 am

Not implemented yet but will be aligned.

Giovanni

Al B
Posts: 24
Joined: Thu Jun 09, 2016 4:01 am
Been thanked: 2 times

Re: CORTEX_VTOR_INIT for IAR

Postby Al B » Fri Jun 10, 2016 4:59 am

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

User avatar
Giovanni
Site Admin
Posts: 11935
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 535 times
Been thanked: 447 times
Contact:

Re: CORTEX_VTOR_INIT

Postby Giovanni » Fri Jun 10, 2016 7:53 am

Hi Al,

Just attach it in this thread zipped.

Giovanni

Al B
Posts: 24
Joined: Thu Jun 09, 2016 4:01 am
Been thanked: 2 times

Re: CORTEX_VTOR_INIT

Postby Al B » Fri Jun 10, 2016 11:31 pm

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
Attachments
RT-STM32L476RG-NUCLEO-IAR.zip
(596.85 KiB) Downloaded 65 times

Al B
Posts: 24
Joined: Thu Jun 09, 2016 4:01 am
Been thanked: 2 times

Re: CORTEX_VTOR_INIT for IAR

Postby Al B » Wed Jun 15, 2016 5:19 am

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
Attachments
IAR.zip
(7.08 KiB) Downloaded 67 times

User avatar
Giovanni
Site Admin
Posts: 11935
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 535 times
Been thanked: 447 times
Contact:

Re: CORTEX_VTOR_INIT

Postby Giovanni » Sun Jun 19, 2016 9:56 am

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

Al B
Posts: 24
Joined: Thu Jun 09, 2016 4:01 am
Been thanked: 2 times

Re: CORTEX_VTOR_INIT

Postby Al B » Sun Jun 19, 2016 6:07 pm

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


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 2 guests