It's... alive!

Discussions and support about ChibiOS/NIL, the almost nil RTOS.
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: It's... alive!

Post by mobyfab »

After a quick test is seems LTO does not work with NIL. The app just hangs at start.

I will try to debug it when I have some time.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: It's... alive!

Post by Giovanni »

Hi,

This is strange, LTO is the default now and it works here. Are you using the makefiles taken from the new repository? there are differences with the old makefiles.

Giovanni
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: It's... alive!

Post by pito »

I've been trying to compile the Cb3.0 nil example NIL-STM32F303-DISCOVERY while getting this (ChibiStudio, not the latest):

Code: Select all

mkdir -p build/obj
mkdir -p build/lst
Compiling nilcoreasm_v7m.s
Compiling crt0.c
cc1.exe: error: LTO support has not been enabled in this configuration

Where I have to enable it?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: It's... alive!

Post by Giovanni »

Hi,

Try downloading the latest ChibiStudio, apparently the older compiler does not support it. Alternatively disable LTO in the makefile.

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: It's... alive!

Post by mobyfab »

Yes i'm using the latest makefiles
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: It's... alive!

Post by pito »

ok, I've downloaded the CBS5 and it compiles now..
PS: would it be possible to create a CBS package without the "chibios" folder? When doing svn from trunk into CBS..
PS1: is there a STM32VLDisco demo for Nil somewhere, plz? The only board missing is mine :cry:
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: It's... alive!

Post by Giovanni »

Not yet, it is work in progress.

Giovanni
User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Has thanked: 3 times
Been thanked: 3 times

Re: It's... alive!

Post by DeusExMachina »

Giovanni wrote:Hi,
...

Main differences:
1) In Nil threads cannot be created and cannot terminate, totally static. RT can start-terminate threads.
2) In Nil priorities are fixed, threads cannot change priority, this makes it impossible to implement proper mutexes with priority inheritance support.
3) Internal algorithms are less computationally efficient, Nil is basically even faster than RT (something I didn't expected to see being RT already about the fastest thing on earth right there with Road Runner) but RT scales better, so Nil is only faster when few threads are involved.


I have some questions :)
2) - Threads have priorities? But where I can set thread priority? I don't find priority field in thread_t structure.
3) - What type of task scheduler NIL uses?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: It's... alive!

Post by Giovanni »

2) The order of threads in the table is the priority.
3) The most lame scheduler ever written but it does the job of executing threads by priority preemptively.

Giovanni
Post Reply