Page 2 of 4

Re: CW files

Posted: Tue Jul 12, 2016 9:27 am
by louis
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

Re: CW files

Posted: Tue Jul 12, 2016 1:09 pm
by Giovanni
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

Re: CW files

Posted: Wed Jul 20, 2016 3:57 pm
by louis
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

Re: CW files

Posted: Wed Jul 20, 2016 4:19 pm
by Giovanni
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

Re: CW files

Posted: Thu Jul 21, 2016 11:23 am
by louis
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

Re: CW files

Posted: Thu Jul 21, 2016 12:21 pm
by Giovanni
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

Re: CW files

Posted: Thu Jul 21, 2016 2:42 pm
by louis
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

Re: CW files

Posted: Thu Jul 21, 2016 3:18 pm
by Giovanni
Nothing more, the IVOR handler is linked automatically (if you are using our boot.s).

Giovanni

Re: CW files

Posted: Fri Jul 22, 2016 10:39 am
by louis
Hi,

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

Louis

Re: CW files

Posted: Fri Jul 22, 2016 11:05 am
by Giovanni
HAL takes care of that if you use HAL, if not then you need to initialize it before calling chSysInit() in your main().

Giovanni