305 points · by lproven · 3y ago · 136 comments
Bill Lamie left to start PX5 and work on a new lightweight embedded RTOS and took most of the talent with him. If Microsoft is doing this, they're pretty much walking away from their roadmap for Azure RTOS and IoT nodes along those lines.
I call it a win, ThreadX had a lot more ecosystem behind it than FreeRTOS ever did. And it does run on things other than Raspberry Pis. Renesas used to give it away for free if you bought their SoCs.
I never understood why they got it, when they already had Azure Sphere OS.
At least they are open sourcing it, instead of leaving it in some digital vault.
Azure Sphere OS is based on Linux, thus needs much more powerful hardware than ThreadX.
Having two OSes for the same space, even if ThreadX is less resource hungry makes marketing and developer support more complex.
Taking stewardship of FreeRTOS allows them to develop a SDK, with or without a hardware kit included, to encourage IoT developers to lock into the Amazon ecosystem.
https://docs.aws.amazon.com/freertos/latest/userguide/c-sdk....
Microsoft saw this chain of events and panicked, buying up ThreadX to create Azure RTOS. I believe MS is now abandoning this path and focusing on other green fields...the recent events with OpenAI being a huge signal.
A "software defined vehicle" [1].
Those R&D teams spend a small fortune on devboards with each new generation and only use them for ~a couple years or so. So renting time on AWS is appealing because it's not depreciating capital and because they can be more flexible in how they adjust spending to suit development cycle phases where they need more/fewer concurrent units.
Having freertos allows them to have credible experts in the space their customers are working in, and they can make design changes to freertos to suit this SDV concept.
[1] https://aws.amazon.com/automotive/software-defined-vehicle/
By buying FreeRTOS and building up the ecosystem, they were hoping to own the OS for IOTs.
The article says ThreadX used to be what Intel Management Engine ME ran on? How do I configure the ME / AMT VNC auth in there?
"currently running on over 12 billion devices around the world"
Is this like another baseband processor?
They say they want to maintain the certifications - that will be tricky unless there's some investment coming from somewhere. It's a lot of fairly bureaucratic work to understand the safety standards, put the right development processes in place and maintain those as your software changes. It's not nearly as simple as just writing code and running it. It's definitely not the kind of software development someone would do as a hobby. I hope Microsoft are going to fund some of that development effort.
Interestingly although FreeRTOS isn't safety certified, SAFERTOS (https://www.highintegritysystems.com/safertos/) is - which is a commercial implementation with the same APIs.
It was super light weight and quite nice to get stuff done. You call tx_thread_create or some such and then tx_malloc and so on and then they have tx queues and semaphores and mutexes and so on.
Neat to see it's still living on.
In our case we were doing real-time power/fan/thermal control loops so we needed control over when certain actions were happening and needed to be able to guarantee that we could sense a problem and then (within X ticks) issue commands to respond, or make the system safe to prevent damage.
Yes, that's called an RTOS.
The Azure branding makes little sense, beyond maybe that IoT things communicate with the cloud or something.
:(
(This is the RPi boot blob)
> Now, there is at least some hope that the Raspberry Pi Foundation might be able to get permission to release the source code for its version.
Indeed that would be something!
Opening up any GPU code, from any maker, invites patent lawsuits from competitors. And then the injunctions start flying.
I'm 95% sure that if AMD released their firmware and/or their drivers source code, NVidia wouldn't learn anything of value, they wrote the same stuff anyway. That's just sad \o/
It might not even be realistic that some jerk is going to search through 10 million lines of driver code looking for patent violations, but these are corporations we're talking about. They're twitchy when it comes to risk. So the source of insanity here is the broken patent system, isn't it? (I agree that while you get to write vaguely clever code, even specialized software dev is 99% perspiration.)
It died ~2011
I think though they're finally realized trying to charge people for drivers has made them a hated name & gotten them no where. GMA500 is a long awful wound on everyone & held Intel back from being much better at embedded than they could have been. Powervr has been one of those living embodiments of the phrase "expensive chips without good drivers are just expensive sand", or however it goes. So now this stuff hypothetically is going to start to be broadly usable (only on Linux underimited architrctures I guess? Since it's mostly binary blobs?).
> Broadcom when they developed the original Videocore firmware bought a licence for ThreadX from the writer. AIUI, a lifetime licence, it never expires. No royalties or anything like that. Raspberry Pi have modified that firmware many many times over the last 10 years, but no royalties to pay. Many years later the writer of ThreadX sold the thing to Microsoft.
So sounds like the RPi folks have a free hand over this firmware and they might be able to open it now?
It's one step closer to an open Pi firmware in some ways, but probably not a meaningful step.
"the Pi5 has a massively reduced firmware (as much as possible is moved to ARM/kernel space). It now does very little."
I did a quick search and came up empty. Does anybody have any more info about this?
It's really something I would only use for an extremely simple safety-critical device, one that absolutely needed Real Time.
Microsoft deserves praise and even adulation for this, but time will tell how well supported the project is. They have a good track record so I'm very optimistic, but this is going to require a lot of ongoing support. That shouldn't be and isn't on Microsoft alone now, but they may have to shoulder a larger burden while getting things moving.
Many projects seem to be ditched by corporations and kind of orphaned in Eclipse and Apache
I'm assuming that every dev ends up consumed by endless rewrites of the Azure client libraries.
Example.
In file threadx-master/ports/cortex_a7/gnu/src/tx_thread_schedule.S
in this code
/* Increment the run count for this thread. */
LDR r2, [r0, #4] // Pickup run counter
LDR r3, [r0, #24] // Pickup time-slice for this thread
ADD r2, r2, #1 // Increment thread run-counter
STR r2, [r0, #4] // Store the new run counter
the indexes to the data structures are really hard to modify, so you can't make modifications to the structures easy, the C structures and the assembly code indexes must be in sync, or the system will crash. And there are literally 100s of files with assembly indexes in the code.But it can be made it easier, with another layer and macro preprocessing. So make a header one for the assembly and one for the C code, and define the struct with the macro. The assembly code can be compiled with C preprocessor, so the macros will work.
This way the C and the ASM stay sync. Only drawback, that the struct must be defined with this macros. But this is only for the structures that are used both in assembly and C or higher level.
Anyway if the indexes in the assembly code would be macros, that would be also much easier to modify.
At the end of the day, I end up often using microchip studio because that is my board and it just works nicely. However, I have tons of tiny personal projects I'll spin up with vscode and platformIO and knock stuff out. Heck, even when I was merely playing around with it, I was able to FOSS my way to building and sending everything with various software.
I cannot imagine embedded pre ardunio. You'd think it would have created a scarcity of workers.
The development experience was miserable. The embedded code was in C, and, when something went wrong, there was about a 50% chance that the bug was in the proprietary compiler from the vendor and not in the C code at all.
There was probably some way to debug the live system, but I never found it. I’m not sure where was any way to simulate the system well enough to run our code short of actually uploading it to the device.
The world has come a long way :). An RPi or Arduino or anything else along those lines would likely also survive the treatment we gave this thing as long as all the connectors were very well secured.
That made it a useful market to be in (as a developer.) My first embedded task was on a PDP 11/23 sans OS (despite the fact that DEC had suitable RTOSs like RSX-11M)
https://github.com/azure-rtos/threadx/blob/master/LICENSE.tx...
https://github.com/azure-rtos/threadx/blob/master/LICENSED-H...
This is out of date; the announcement was only days ago, which is why I wrote TFA, and they've not updated the licence files on Github yet.
Right ?
This is incorrect. Microsoft does not have free license to change the code and retain certification.
The certification is handled by a separate entity. The certification rules apply to contributions from everyone, including Microsoft.
There's genuinely good parts of the standards, but a lot of the rituals are just checklist items to assure certification authorities you have a defined process similar to what they've seen before, regardless of whether that's actually effective at issue reduction/detection. In many cases, they're actually counterproductive and encourage people to focus on minute, obscure error sources rather than addressing significantly more common issues like memory safety and undefined behavior.
Either way, Microsoft can afford to do that if they want to. But I would (naively) expect the rules to apply to anyone who wants to modify the code base, I don't think Microsoft has any privileged position when it comes to that.
Raspberry Pi is probably one of the less notable users.
This news about Azure RTOS has been posted to HN a few times over the last week or so, even once by me, but I didn't realize you had to put "Raspberry Pi" in the headline to get traction.
> I didn't realize you had to put "Raspberry Pi" in the headline to get traction.
Yes, this was my theory. I was guessing most people hadn't heard of ThreadX and didn't know what it was or that it was used in devices they already owned. That is the sort of info that gets stuff read and shared.
This is something that always irked me about RPi's. How the fuck, you, the hardware vendor, that's suppose to know the inner guts of your product, do not have full production for its software? That you need it to rely on undisclosed 3rd party blobs!! Yes, yes, I know about the politics and the business logic that led to this situation but that was at beginning, when money were need it. Nowadays they are in a good place in that regard, might wanna pivot so they fully control everything, but I guess once you go with a bad design, the complacent around that just grows.
> RPi foundation could probably have their own SoC made at this point
"Could have"? The RP2040 chip in the Pi Pico is their own silicon. The RP1 "south bridge" chip in the new Pi 5 is also their own silicon.
https://www.theregister.com/2021/01/21/pi_pico/
This is nothing new. They've been doing it since 2016-2018.
Custom silicon is hard and few would accept significant a step down in raw power compared to the previous generation while the transition occurs.
"Every once in a while, a revolutionary product comes along that changes everything" - steve jobs announcing the iPhone in 2007
Like running a sample on a supported board with Zephyr is pretty trivial. With ThreadX it seems to be included in the vendor sdk much like freertos might be. Some pros and cons to each certainly.
> A corresponding open source project has not yet been created
(via https://news.ycombinator.com/item?id=38445039, but we merged that thread hither)
[1] https://www.investopedia.com/news/blackberry-shares-jump-mic...
Very interesting factoid - I had no idea.
Or "open sourcing" with money and commitment and developers behind it?
Could they run, say, Doom?
Define "very recently". It was nearly 5Y ago now. I'd not call that very recent, no.
Anyway, I wrote this version and I did explain what an RTOS is. I think the other submission used to link to the Eclipse announcement, and they didn't. (A bad sign.)
This publication was literally founded by a boomer, so I don't think your conclusory whining is particularly well-targeted.
A foundation so bureaucratic that there is OSS that new people can't take over because it requires years of bureaucratic process.
Seems like it's a win-win. If there's a group that can't abide whatever constraints exist with Eclipse, then they can fork. If not, it's still better off being open than not. I don't really see a downside here.
How it something OSS if you cannot fork?