Page 3 of 8
Re: [NEWS] The ChibiOS Book
Posted: Wed Sep 03, 2014 3:18 pm
by Tectu
Giovanni wrote:The material keeps growing. Probably it would be a good idea to create 2 distinct books. The first one would be about RTOS concepts and the RT kernel in details. The second about the HAL and playing with the STM32 (more "fun").
This would also let me to focus on the kernel part and have it ready earlier.
As suggested earlier

It's definitely the right move to make in my opinion.
~ Tectu
Re: [NEWS] The ChibiOS Book
Posted: Wed Sep 03, 2014 3:39 pm
by Giovanni
Tectu wrote:As suggested earlier

It's definitely the right move to make in my opinion.
~ Tectu
Credit given

Giovanni
Re: [NEWS] The ChibiOS Book
Posted: Fri Sep 05, 2014 9:59 pm
by barthess
Chapter 5 - Introduction to the RT Kernel/Thread Working Areas:
Could you explain purpose of all this sections a bit more? Most of them are port-dependent, but could you explain all of them for certain MCUs?
Chapter 7 - RT System Layer/Abnormal Termination:
Some time (years) ago (hell, how fast the time runs!) I introduced "post mortem UART driver" for stm32. What about standard HAL driver for that purpose? Especially with combo with
http://sourceforge.net/p/chibios/feature-requests/37/
Re: [NEWS] The ChibiOS Book
Posted: Fri Sep 05, 2014 10:20 pm
by Giovanni
OK about the more info.
About the feature request, there is a specific reason, the message is not used because some MCUs simply don't have enough memory to hold all messages, see AVR where strings are stored in RAM by default. In 3.0 I had to reduce the usage because there are more assertions in 3.0.
The only thing really needed is an halt function, everything else is available in the stack trace, function, line, file. A descriptive string is not really required.
Because the above, any advanced logging capability will have to be custom, the kernel just needs to provide the required hooks.
Giovanni
Re: [NEWS] The ChibiOS Book
Posted: Sat Sep 13, 2014 5:29 pm
by Giovanni
I started adding code samples in the latest two chapters, I would like to have some feedback about the examples style, too complex? too abstract? not sufficient?
Thanks,
Giovanni
Re: [NEWS] The ChibiOS Book
Posted: Sun Sep 14, 2014 10:31 am
by barthess
1)"Spawning and Resynchronizing". Should chThdShouldTerminateX() must be used instead of chThdTerminatedX()
2) "Processing Frames"
Code: Select all
/* If the network is down all the waiting threads are notified.*/
if ((NET->SR & NET_SR_ERROR) != 0 {
/* Entering I-Locked state and waking up all threads with a
special message.*/
chSysLockFromISR();
chThdDequeueNextI(&rx_frames_queue, MSG_RESET);
chSysUnlockFromISR();
/* Resetting interrupt source.*/
NET->SR &= ~NET_SR_ERROR;
}
may be chThdDequeueAllI()?
3) "Priority Ceiling". Example should be closer to real usage. I feel that the solution is an elegant, but can not think of a use case for it.
4) "Time Bounded Loop".
Code: Select all
systime_t start = chVTGetSystemTime();
systime_t end = now + MS2ST(200);
should "now" variable be replace by "start"?
5) Passing of arguments (void *arg) to thread functions and VT callbacks should be described a bit more.
6) Examples are good from my point of view but we need some feedback from newcomers.
Offtopic:
Now I am understand destination of chThdYield() function.
Re: [NEWS] The ChibiOS Book
Posted: Sun Sep 14, 2014 11:21 am
by Giovanni
Thanks for finding all the errors

I just couldn't think to a better example for priority change, it is something that should be avoided too.
Giovanni
Re: [NEWS] The ChibiOS Book
Posted: Wed Sep 17, 2014 10:37 am
by Giovanni
It is becoming huge I fear, I haven't yet added all the chapters related to kernel yet too...
I think the first one will be like a huge RTOS manual with lots of example, the name could be: "ChibiOS/RT 3.0 - The Ultimate Guide". This one could be ready for the 3.0 release.
The second book could be about the HAL on a specific platform, STM32 initially I think: "ChibiOS/RT and HAL - Learning on the STM32". This one more oriented to an hand-on experience.
BTW I wouldn't mind if other authors write something similar for other platforms, we could share effort and, hopefully, income.
About the book, I think that lulu.com could be a good idea, prices are interesting and they are able to produce both paper and ebooks. I think paper will be more popular because the size.
Giovanni
Re: [NEWS] The ChibiOS Book
Posted: Sun Sep 28, 2014 9:55 pm
by jcw
I don't think this has been mentioned yet - if you're writing in Markdown, this is another great site for publishing, IMO:
https://leanpub.com/p - see also
https://leanpub.com/lean for the point of it all.
And if you're not using Markdown:
http://freecode.com/projects/pandoc can convert most text formats to it (as well as the other way around and numerous other combinations).
-jcw
PS. I'm really looking forward to the ChibiOS book!
Re: [NEWS] The ChibiOS Book
Posted: Mon Sep 29, 2014 8:00 am
by Giovanni
Hi,
Tanks for the links, I am using the docuwiki text format right now but I think it can be converted to that format.
The book is about at 50% of the raw material, working on the hardest part now: events.
Giovanni