Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

One person's error is another person's data.


devel / comp.arch.embedded / Re: FREE RTOS

SubjectAuthor
* Re: FREE RTOSDavid Brown
`- Re: FREE RTOSDavid Brown

1
Re: FREE RTOS

<uj2a2r$1nh6t$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1702&group=comp.arch.embedded#1702

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: FREE RTOS
Date: Wed, 15 Nov 2023 12:29:31 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uj2a2r$1nh6t$1@dont-email.me>
References: <e98aace5-7e94-41b9-8b31-250a63c411f2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Nov 2023 11:29:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a4b83aa270a9af19ab4273cf02ad8d1";
logging-data="1819869"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Tmrfr2BNUlGMdA8OoYd1YOk9ILEI4+zg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:gOV7QYX7GADO1ORsqYNnQvmdGAI=
Content-Language: en-GB
In-Reply-To: <e98aace5-7e94-41b9-8b31-250a63c411f2n@googlegroups.com>
 by: David Brown - Wed, 15 Nov 2023 11:29 UTC

On 14/11/2023 21:34, Ed Prochak wrote:
> Any opinions about FREE RTOS?
> I like a priority scheduling kernel for the product that I
> about to work on, but are there any significant
> issues or just annoying features?
>
> I am checking out the Free RTOS documentation and other resources.
> Just curious if anyone has experienced any undocumented issues with it.
>
> That's all.
> Ed

I've used it on a couple of projects. It works fine.

My biggest complaint with it is the old-fashioned style. It uses the
hideous "systems Hungarian notation" naming, has lots of macros, opaque
void* pointers, and the like. Many RTOS and library developers seem to
view "pure ANSI C" (by which they mean C89/C90) as a good thing for
portability and compatibility - to me, it means coding styles that went
out of fashion 20 years ago for good reasons.

But FreeRTOS is not alone in that, and many alternative RTOS's have the
same sort of thing. At least it does not use insane cmake or kconfig
configuration and build systems.

It is supported on a wide range of target architectures - that is both
an advantage and a disadvantage.

It's not perfect, but I don't know of anything better, and I will
happily use it in the future.

Re: FREE RTOS

<uj4j9u$26bn5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1704&group=comp.arch.embedded#1704

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: FREE RTOS
Date: Thu, 16 Nov 2023 09:19:09 +0100
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <uj4j9u$26bn5$1@dont-email.me>
References: <e98aace5-7e94-41b9-8b31-250a63c411f2n@googlegroups.com>
<uj2a2r$1nh6t$1@dont-email.me>
<109a655d-4ece-40d6-ab21-96f0060704e5n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 16 Nov 2023 08:19:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5dd2d9ab28c4154cdd8cf766000fa436";
logging-data="2305765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vdwKFueW59Ijkrc8Y5bgYCTym79oG45I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:OXZDdQOFlgcX60EE9/tGTHOIRVk=
In-Reply-To: <109a655d-4ece-40d6-ab21-96f0060704e5n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Thu, 16 Nov 2023 08:19 UTC

On 16/11/2023 05:09, Ed Prochak wrote:
> On Wednesday, November 15, 2023 at 6:29:38 AM UTC-5, David Brown wrote:
>
>> I've used it on a couple of projects. It works fine.
>>
>> My biggest complaint with it is the old-fashioned style. It uses the
>> hideous "systems Hungarian notation" naming, has lots of macros, opaque
>> void* pointers, and the like. Many RTOS and library developers seem to
>> view "pure ANSI C" (by which they mean C89/C90) as a good thing for
>> portability and compatibility - to me, it means coding styles that went
>> out of fashion 20 years ago for good reasons.
>
> Oh I HATE Hungarian notation. hate, Hate HATE!
> Well I'll deal with it.
>

/Real/ Hungarian notation, as proposed by the Hungarian Charles Simonyi,
was to give additional information that was not part of the variable's
type. Thus "usInputString" might be a char* that holds an "unsafe
string" (not yet checked for weird characters, SQL injection attacks,
etc.), while "ssQueryString" would indicate that this is a "safe
string". Calling these "pchInputString" and "pchQueryString" is,
however, pointless, distracting, and harder to maintain. (In untyped
languages, it could be useful.)

It's also fine to have, say, "mutBusLock" and "semDataReady" naming a
mutex and a semaphore, since the types of these variables (in FreeRTOS)
will be the same.

Basically, Hungarian notation - like any other convention - is a good
thing if it adds helpful information in a convenient manner without
distracting from the code, and without imposing a maintenance burden.
It is a bad thing when it duplicates something that is better expressed
in a different manner (such as types), makes code harder to read, or
harder to maintain.

However, it's not uncommon to have your own wrapper functions anyway.
For example, you don't want things like this in your main code :

void do_bus(...) {
if (!xSemaphoreTakeRecursive(bus_mutex, pdMS_TO_TICKS(100))) {
panic("Can't get the lock - something is badly screwed!);
} else {
start_bus_transaction();
...
end_bus_transaction();
xSemaphoreGiveRecursive(bus_mutex);
}
}

Your main code will look like :

void do_bus(...) {
get_bus_lock();
start_bus_transaction();
...
end_bus_transaction();
release_bus_lock();
}

Or, if you work in C++ (and this is a good idea, IMHO), you will have :

void do_bus(...) {
Bus_locker lock;
start_bus_transaction();
...
end_bus_transaction();
}

The ugly raw FreeRTOS calls are hidden inside your wrappers. Then you
only have one place to pick the lock type. (Remember, it's C, and
old-fashioned C at that - the compiler can't help you if you mix up
mutexes, recursive mutexes, semaphores, or queues of any kind. They are
all just handles and there is no type safety.)

>
>> It's not perfect, but I don't know of anything better, and I will
>> happily use it in the future.
>
> Thanks.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor