Search found 17 matches

by kermitas
Wed Mar 28, 2012 11:37 am
Forum: General Support
Topic: Example of memory pool + struct + mailbox.
Replies: 14
Views: 14575

Re: Example of memory pool + struct + mailbox.

I am thinking to create a generic "dynamic mail" mechanism built on top of pools, counting semaphores and mailboxes. The "mail" would be a structure defined by the user, there could be more mail types.

it would have 4 main functions:

On the sender side:
mailAlloc() - Allocates a mail object from ...
by kermitas
Wed Mar 28, 2012 11:04 am
Forum: General Support
Topic: Example of memory pool + struct + mailbox.
Replies: 14
Views: 14575

Re: Example of memory pool + struct + mailbox.

Badger wrote:...


Great answer :) .
Thank you that you tryed to answer all my questions.
by kermitas
Wed Mar 28, 2012 10:52 am
Forum: General Support
Topic: Is there any book/ebook about ChibiOS?
Replies: 10
Views: 12657

Re: Is there any book/ebook about ChibiOS?

Guys,

I just searched the web for " Using the FreeRTOS Real Time Kernel - A Practical Guide - Cortex-M3 Edition.pdf ". If you will do that I am sure that you will find discobots SVN repository and very helpful readme.txt file.

Look into this 1.3MB book. It covers all subjects in with very easy ...
by kermitas
Tue Mar 27, 2012 10:52 pm
Forum: General Support
Topic: Example of memory pool + struct + mailbox.
Replies: 14
Views: 14575

Re: Example of memory pool + struct + mailbox.

Here's a quick run down of how I'd do it:

MemoryPool pool;

// align data, this depends on your compiler. this works for GCC
BasicMessage data[N] __attribute__((aligned(sizeof(stkalign_t))));

// initialise pool
chPoolInit(&pool, sizeof(BasicMessage), NULL);

// add each element to ...
by kermitas
Tue Mar 27, 2012 10:02 pm
Forum: General Support
Topic: Example of memory pool + struct + mailbox.
Replies: 14
Views: 14575

Re: Example of memory pool + struct + mailbox.

It looks like what you described could be useful in a lot of situations, I will add this as a library module and let you have fun debugging it

Giovanni

"Library module"? Where will I find it? In SVN?
When?

I can't wait!

(Now I have a lot of free time so that is why I am fighting with ...
by kermitas
Tue Mar 27, 2012 9:59 pm
Forum: General Support
Topic: Is there any book/ebook about ChibiOS?
Replies: 10
Views: 12657

Re: Is there any book/ebook about ChibiOS?

I'd agree that some sort of book would be immensely helpful for getting started. I'd never used a RTOS before I stumbled across Chibios, and had not much experience with multhithreaded synchronisation, so it took me a while to work out how I should do things.

Dear Badger,

How did you start ...
by kermitas
Tue Mar 27, 2012 9:56 pm
Forum: General Support
Topic: Is there any book/ebook about ChibiOS?
Replies: 10
Views: 12657

Re: Is there any book/ebook about ChibiOS?

I'd agree that some sort of book would be immensely helpful for getting started. I'd never used a RTOS before I stumbled across Chibios, and had not much experience with multhithreaded synchronisation, so it took me a while to work out how I should do things. Could we do a collaborative book on the ...
by kermitas
Tue Mar 27, 2012 5:26 pm
Forum: General Support
Topic: Is there any book/ebook about ChibiOS?
Replies: 10
Views: 12657

Re: Is there any book/ebook about ChibiOS?

Hi,

In the documentation section there are a set of "how to" articles, did you find those helpful? probably would be a good idea to expand them (feel free to suggest topics for new articles).

About the book, this is a recurring request but it seems there is not an agreement on which kind of book ...
by kermitas
Tue Mar 27, 2012 5:25 pm
Forum: General Support
Topic: Example of memory pool + struct + mailbox.
Replies: 14
Views: 14575

Example of memory pool + struct + mailbox.

Hello Giovanni and community.

Can you provide few simple lines of code demonstrating how to:

- initialize memory pool
- allocate some memory (from memory pool), sizeof( BasicMessage )
- create new instance of BasicMessage struct
- put this instance into this allocated memory
- then free memory ...
by kermitas
Tue Mar 27, 2012 1:04 pm
Forum: General Support
Topic: Is there any book/ebook about ChibiOS?
Replies: 10
Views: 12657

Is there any book/ebook about ChibiOS?

Hello,

is there any book or eBook about ChibiOS?

It is very hard to complete knowledge about system jumping on forum, reading /demo and /test codes and reading online html documentation m that looks like API.

I saw my friends FreeRTOS book "Using the FreeRTOS Real Time Kernel - A Practical Guide ...