CW files

Discussions and support about ChibiOS/RT, the free embedded RTOS.
louis
Posts: 23
Joined: Tue May 17, 2016 9:26 am

Re: CW files

Postby louis » Tue Jul 12, 2016 9:27 am

Hi,

Yes I checked. Your IVOR10 calls chSchIsPreemptionRequired(), and chSchDoReschedule()(when it is required)

Enclosed, you can see my IVOR10 & IVOR4 implementations.
For IVOR10, the value which is returned by chSchIsPreemptionRequired() is always false.

Louis
Attachments
IVOR4.PNG
IVOR4suite.PNG
IVOR4suite.PNG (8.61 KiB) Viewed 2072 times
IVOR10.PNG

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

Re: CW files

Postby Giovanni » Tue Jul 12, 2016 1:09 pm

It should return true when context switch is required which usually happens not so often.

BTW, writing that function in C does not ensure that all required registers are actually saved on stack.

Giovanni

louis
Posts: 23
Joined: Tue May 17, 2016 9:26 am

Re: CW files

Postby louis » Wed Jul 20, 2016 3:57 pm

hello Giovanni,

I changed my strategy. I used now your IVORs (from ivor.s) and I modified my scheduler. I created my task.
But I have still problems with interruptions (IVOR don't work). My program is blocked inside "_idle_thread()" (well it is normal, if IVORs don't work :D ).

I would like to know if the boot.s must be included in the project? Actually, I didn't include this file.
I saw there was an IVORs initialization there.

Louis

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

Re: CW files

Postby Giovanni » Wed Jul 20, 2016 4:19 pm

Boot.s is required for ECC initialization, MSR initialization, cache initialization and exceptions initialization and that includes IVPR and IVORs. Include it if your files don't implement that.

Giovanni

louis
Posts: 23
Joined: Tue May 17, 2016 9:26 am

Re: CW files

Postby louis » Thu Jul 21, 2016 11:23 am

Hi,

Thank you for the answer.
For the IVORs, you implemented its in ivors.s. Does ChibiOS already active/install them? Otherwhise, did you provide a macro where I have to activate them.

Thank Louis

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

Re: CW files

Postby Giovanni » Thu Jul 21, 2016 12:21 pm

IVORs and IRQ vectors are setup at link time using weak symbols, there is not need to set or activate them.

Just declare symbols with the right name and those will be linked to tables.

Giovanni

louis
Posts: 23
Joined: Tue May 17, 2016 9:26 am

Re: CW files

Postby louis » Thu Jul 21, 2016 2:42 pm

Hi,

Then for the use of IVOR10, I have nothing to delcare/code more than you did in ivor.s & port_init(void) ?
(Sorry if I ask you easy question, but I try to find the origin of my problem)

Louis

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

Re: CW files

Postby Giovanni » Thu Jul 21, 2016 3:18 pm

Nothing more, the IVOR handler is linked automatically (if you are using our boot.s).

Giovanni

louis
Posts: 23
Joined: Tue May 17, 2016 9:26 am

Re: CW files

Postby louis » Fri Jul 22, 2016 10:39 am

Hi,

Thank you. I understand better :)
The timer for the system tick is already implemented/initialized ?

Louis

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

Re: CW files

Postby Giovanni » Fri Jul 22, 2016 11:05 am

HAL takes care of that if you use HAL, if not then you need to initialize it before calling chSysInit() in your main().

Giovanni


Return to “ChibiOS/RT”

Who is online

Users browsing this forum: No registered users and 3 guests