Hi again,

On 08/03/2015 04:39 PM, Kaspar Schleiser wrote:
Hey,

On 08/03/2015 03:51 PM, jerome wrote:
- 2 queues
- 3 Timers
- 1 thread + main one
Is it possible to run such design on small devices? Not too ambitious?
That should well be possible!


Nice...
Is there somewhere an abacus with typical application complexity for a
given hardware ?
Usually you will run into memory problems first, as every thread needs it's own stack.

Simple threads might be OK with a 200byte stack (like our idle thread), printf needs ~1k of extra stacksize. So in ~2k stack, you can do a lot. If you've got 16k to spare, 10 threads is not ambitious, depending on what exactly they're doing.


In fact most of the functions are quite simple....
The only difficult thing done is in one thread where data should be archived (between 2 synchronizations) and triggering (or not) alarms.... I will be obliged to implement a kind of diff between structures entries to avoid filling arrays with identical data and sending it over the GSM to the back-end platform...This is algorithm so I may find a solution...
4) I saw somewhere in the source code a strange excerpt dealing with
message-queue where there 's  a problem if 2 messages come (the message
queue is sized to one only message) so a new one is created...
Strange, why not sizing the queue to 2 ?
IIRC that is taken from one of the test cases.

The issue is that a thread in that test is waiting for messages from an ISR. The ISR cannot block on sending a message, so if it tries to send a message while the thread is busy, that message gets lost. By design of the test that thread can at most miss one message, so it set's up a message queue that can hold exactly that message.

Ok Kaspar ,thanks for clarification...
I find one of the limits seen in Mbed or FreeRtos with ISR ....

Kind regards
_______________________________________________
users mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/users

Reply via email to