larger and more complex embedded systems - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: September 21, 2023, 05:04:19 pm
content: Many experts suggest that using an RTOS like FreeRTOS can be beneficial for larger and more complex embedded systems. Have you had experience developing larger and more complex projects, and if so, could you share which project you consider to be the most larger and complex in your experience. Why do you think it's larger and more complex projects where you could try RTOS?

author: MK14
author_rank: Super Contributor
timestamp: September 21, 2023, 05:57:54 pm
content: Quote from: Kittu20 on September 21, 2023, 05:04:19 pmWhy are you repeating this (or rather similar) for apparently the third time?Also, why are there apparently no responses from you, to all the kind, replies?SPAM bot, time-wasting, ChatGPT, etc ideas, come to mind.Quote from: Kittu20 on August 09, 2023, 04:49:39 pmQuote from: Kittu20 on August 08, 2023, 04:53:53 pm

author: nctnico
author_rank: Super Contributor
timestamp: September 21, 2023, 06:08:49 pm
content: More homework questions from ChatGPT!

author: AVI-crak
author_rank: Regular Contributor
timestamp: September 21, 2023, 11:12:56 pm
content: One evil character created a female nickname on a Russian technical forum, put pictures of boobies on his avatar, filled out his profile (with mistakes).And began to pour questions on the forum for help.And all the questions were with a trick, + errors as a blonde with a sixth-sized bust. But to answer correctly - you need to be at least a genius. I do not remember what it was in the beginning, but it looks like:Code:var = 5 + var % 5;.And then came things where you could easily break your legs.There were many people willing to help, even too many. Even if a person did not understand the question, he was obliged to mark his presence.The evil character was spotted with just one phrase, after which all his branches were erased. But it was fun.Can I invite him to this forum?

author: radiolistener
author_rank: Super Contributor
timestamp: September 21, 2023, 11:58:11 pm
content: Quote from: Kittu20 on September 21, 2023, 05:04:19 pmit doesn't depends on "larger or more complex embedded system". Using RTOS has it's own pros and cons. You can use it for small and easy project and you can use it for large and complex project.

author: Kittu20
author_rank: Regular Contributor
timestamp: September 22, 2023, 02:25:28 am
content: I've asked questions because I'm genuinely curious and eager to understand a particular concept. English is not my first language, so I used AI to format my question. However, I know that ChatGPT can't replace the real-time work experience and expertise that individuals in the industry have earned through their careers.

author: lingna
author_rank: Newbie
timestamp: September 22, 2023, 02:42:52 am
content: Using an RTOS can help manage system complexity and ensure that tasks run in the correct order and time, thereby improving system stability and performance.

author: hans
author_rank: Super Contributor
timestamp: September 22, 2023, 07:01:05 am
content: A system doesn't have to be large or complex to require a FreeRTOS.The biggest selling point of a RTOS is its preemptive nature. High priority tasks instantly get CPU time. Because its preemptive, it can halt other tasks and resume later.There are other multi-threading strategies as well. In theory the superloop in main() can also get you far, but only if you acknowledge its limitations (e.g. perform real-time stuff in interrupts) and/or implement cooperative multi-threading (like coroutines).Another way could be event driven programming, where blocking calls are forbidden and thus there is no need for preemptions (although it can still introduce latency issues if events are processed in order of arrival).Now why a RTOS then? It can start with because its easy to program. The aforementioned 2 other solutions can be harder to write, for example, by not using blocking calls at all (typically embedded programs are filled with spinlocks and such). A RTOS will just trade RAM (in the form of stack space) on device target for ease-of-use.There are of course legitimate uses for a RTOS when it comes to real-time behaviour. But IMO again here it comes down to modeling complexity; its a lot easier in a preemptive environment where better schedulers are allowed. It doesn't mean a system cannot be real-time if it doesn't use a RTOS (it may actually be, while using less RAM, CPU and FLASH). But that doesn't void the pros of a RTOS.

author: tggzzz
author_rank: Super Contributor
timestamp: September 22, 2023, 07:31:21 am
content: Quote from: Kittu20 on September 22, 2023, 02:25:28 amI presume you asked the chatbot whether it had written a good question, and it replied "yes it is".https://www.bbc.com/news/world-us-canada-65735769If you can't create thesubtlequestion, what makes you think you will be able to understand the subtle answers? Better to find a text book in your native language.

author: tggzzz
author_rank: Super Contributor
timestamp: September 22, 2023, 07:34:38 am
content: Quote from: hans on September 22, 2023, 07:01:05 amAn RTOS or other implementation library is a small (arguably trivial) part of creating a "complex embedded system". Much more difficult and important is understanding what the system must do and how it can fail.

author: MK14
author_rank: Super Contributor
timestamp: September 22, 2023, 08:53:21 am
content: Quote from: Kittu20 on September 22, 2023, 02:25:28 amMy understanding is that UNMARKED (uncommented) use of ChatGPT on here is against the forum rules.Have you got a number of accounts on here, such as this one, which seems to have injected another ChatGPT response, shortly after your post?Quote from: lingna on September 22, 2023, 02:42:52 am

author: Kittu20
author_rank: Regular Contributor
timestamp: September 22, 2023, 10:34:36 am
content: Quote from: tggzzz on September 22, 2023, 07:31:21 amPlease don't derail the thread topic.

author: tggzzz
author_rank: Super Contributor
timestamp: September 22, 2023, 10:56:05 am
content: Quote from: Kittu20 on September 22, 2023, 10:34:36 amPlease take account of forum member's concerns, as noted in several replies in this thread.Depending on how you ask a question, you may get better or worse responses. You may find this useful:https://entertaininghacks.wordpress.com/library-2/good-questions-pique-our-interest-and-dont-waste-our-time-2/

author: eutectique
author_rank: Frequent Contributor
timestamp: September 22, 2023, 11:32:20 am
content: Quote from: Kittu20 on September 22, 2023, 02:25:28 amWhich concept, exactly?

author: gnif
author_rank: Unknown
timestamp: September 22, 2023, 12:42:38 pm
content: @Kittu20it is unwise to report a member here for trolling even though they most accurately pointed out that you are using an Ai to word your questions without stating so, which is against the forum rules. You are also double posting and looking at your post history shows a trend of questions and answers that seem to be copied from an Ai directly.I suggest you stop using an Ai entirely, do your best to ask your question using English, or find a resource where you can ask these questions in your native language. As you are asking rather technical questions, there will be errors in any translation an Ai would provide, a lot of information will be lost, altered or skewed based on the primitive understanding by the Ai model.

author: nctnico
author_rank: Super Contributor
timestamp: September 22, 2023, 01:22:44 pm
content: Quote from: Kittu20 on September 22, 2023, 02:25:28 amFor these kind of questions reading a book on the subject is far better compared to getting snippets of information from a forum.

author: Kittu20
author_rank: Regular Contributor
timestamp: September 22, 2023, 01:31:44 pm
content: I'm particularly interested in hearing from those who have used RTOS for commercial projects, not just for hobby purposes, I'd like to hear about your experiences. Could you please share your experiences into why you chose to use an RTOS for your projects? Was it primarily due to project size and complexity, or were there other factors ?I also see many use RTOS in projects even when they don't have real-time tasks. Is this primarily due to personal comfort with the RTOS, or are there other advantages?I want to gain knowledge from your practical experiences and understand the reasoning behind your choices. Just to clarify, this is not a homework assignment; it's a genuine curiosity. I am not demanding any code.This is my best attempt. if my intent is still unclear, I may need to stop here.

author: rstofer
author_rank: Super Contributor
timestamp: September 22, 2023, 02:21:16 pm
content: Using an RTOS almost always leads to clean modularity with no, or very limited, crosstalk between the tasks. Task communication is handled by semaphores (flags) and queues.When I started programming in '70, I noticed that all my programs had the same structure: Read some data, calculate some results, print the results. Repeat until the card reader went empty and print a summary. Programs of that era didn't tend to be interactive. But the modularity was obvious: Read, compute, print.With an RTOS, each of those modules would be a separate task with data passed through queues.

author: tggzzz
author_rank: Super Contributor
timestamp: September 23, 2023, 07:45:17 am
content: Quote from: gnif on September 22, 2023, 12:42:38 pmStopping using AI/ML/LLM/ChatGPT is, of course, averygood idea.I would suggest that the OP could write their question in their native language, and use gurgle translate to turn it into English. That will avoid the LLM's content-free general bullshit.Bonus points for reverse translating the English back into their native language, to avoid the "out of sight, out of mind" => Russian => "invisible idiot" type traps.

author: hans
author_rank: Super Contributor
timestamp: September 23, 2023, 07:55:32 am
content: Personally, as I said, my go-to reason for a RTOS is to make writing code easier. Especially the preemption is a killer feature, because if say you have a long task running (e.g. something that goes over TCP/IP or SD card) with variable delays, then you can write that code with blocking calls everywhere, and still have the more important housekeeping go untouched. That is of course taking into account priority inversion, etc. But generally, this kind of design makes it much easier.Especially for hobby I only work on small quantity projects (max units 10-50). But professionally I have yet to work on projects that are produced by more than thousands. If a bigger MCU with more RAM (to support RTOS stacks) costs 2-3$ more, and my time for the company is say 75$ an hour (which is not much), then each hour I save is paying for 25 bigger MCUs. Assuming that a RTOS vs cooperative multitasking is going to save me dozens of hours (if not more) in writing and debugging code, then it will pay off.If a project is going to produced in the 10k's or more, then my reasoning may not be valid anymore. There may still be other reasons to use a RTOS though. But "laziness" is not one of them.For example, in some projects there are some aspects that I need to run real-time. I'm working on software defined radios, and the processing of incoming data symbols is a very high priority task. You could do this in an IRQ or perhaps a RTOS task at the highest priority where both have pros and cons.

author: peter-h
author_rank: Super Contributor
timestamp: September 23, 2023, 11:54:18 am
content: The mods should delete these stupid chatgpt threads.Even if the question is reasonable, it is way too bland. It is like chucking a bit of bread into a duckpond and watching the ducks fight over it.We could have a much better debate on RTOS etc if somebody started a thread where they describe a real application.I could do it of course but as you all know I have already started a huge number of threads

author: Perkele
author_rank: Regular Contributor
timestamp: September 23, 2023, 12:32:29 pm
content: Someone from India not knowing to ask a simple four-sentence question in English? Yeah, right.As a part-time job I am working as a prince in Nigeria, and I have some good news for you folks.

author: nctnico
author_rank: Super Contributor
timestamp: September 23, 2023, 12:36:57 pm
content: Quote from: rstofer on September 22, 2023, 02:21:16 pmThat may seem easy until you need to pass error states between those processes. Typically you see a software engineer going through 3 stages: first stage is to write software in a single process, 2nd stage is to use seperate processes for everything, 3rd stage is to only use seperate processes when absolutely necessary.