Live data from Hacker News

So you want to build an embedded Linux system?

jaycarlson.net

51–60 of 113 posts

Re: So you want to build an embedded Linux system?

#52

I have been doing embedded for a number of years. I'm the only fulltime SWE at my company and it just gets exhausting managing 5 different products on completely different code bases/technologies. Plus a web portal that does device management and reporting. So a big thing people should consider when building something to scratch. Am I making something I can use again when I make my next product. Its a much higher men…

So true. Switching from one vendor to another is a huge deal. Documentation, code bases, tool chains, etc. require a huge investment in time. It's easy to do a quickie hobby project on a new micro but for a product you really want to internalize the details.

The fact that almost everything is ARM now makes it a lot easier but the on-chip peripherals and tools are usually still very idiosyncratic.

Re: So you want to build an embedded Linux system?

#53
post #21

I have been doing embedded for a number of years. I'm the only fulltime SWE at my company and it just gets exhausting managing 5 different products on completely different code bases/technologies. Plus a web portal that does device management and reporting. So a big thing people should consider when building something to scratch. Am I making something I can use again when I make my next product. Its a much higher men…

Sounds like a nightmare. At a casual glance it looks like your products are mostly [processor] connected to a network of CAN and/or 4-20mA devices. Not possible to back-port newer control modules to older product lines? That said, impressive that you are handling all of it on your own. Hire somebody!

I have a couple contractors I bring in part time when I need some heavy lifting on the embedded or web side.

I have back-ported somethings, but really a large chunk of the products had terrible technical decisions before I started. I spent the first couple years just dragging the company back from the technical and financial brink. I'm slowly eliminating old products from our sales sheet in favor of ones I engineered. So it will eventually be ok.

Re: So you want to build an embedded Linux system?

#54

Earlier quoted context omitted.

There is lots of embedded that uses x86 or arm. Lots of embedded isn't significantly power or size constrained and volumes are very low so software development costs dominate over hardware costs. But agreed, those aren't the point of the article. "Embedded" is a big space.

Something that is not power nor size constrained doesn't really fit most people's definition of "Embedded."

Example: the computer in a CNC machine.

Re: So you want to build an embedded Linux system?

#55

How does he find the time? I thought maybe it was very surface evaluation given the number of parts but I scrolled down to the part I have recent experience with (STM32MP1) and his summary was spot on. Bookmarked!

Guessing from his update frequency: in fits and spurts, over many, many months.

He's posted some stuff on twitter that alluded to this work - lots of debugging DRAM and swapped bit signals.

Re: So you want to build an embedded Linux system?

#56
post #43

Earlier quoted context omitted.

The part not discussed is how many PCB layers (signal, ground, more signal, more ground, etc) you need when laying down DDR. If you are playing with a 2x2" EVK then 8 or 10 layers isn't a budgetary problem. When the board starts getting larger it's now it's a huge cost adder as opposed to low speed 2-layer PCB. This is why designers switch to doing it with SOMs. The SOM can be a high-speed part and the carrier PCB is…

He mentioned all the PCB designs were using 4 layer, which is pretty cheap even in prototype quantities.

Choosing a four layer stackup was a really instructive point for the purposes of his blog post, but kind of a bad rule of thumb to carry forward on a professional level.

PCBs are built in a sandwich stack. The middle dielectric layer, or "prepreg", is way thicker than the dielectric layers in the outer layers. This doesn't seem like a big deal, but for the speeds that a DDR interface runs at, it creates a higher impedance return loop for whatever you end up routing on layer 3. (Typically DQs, in my experience.)

You can avoid this entirely by building with a six layer stackup, and routing your DRAM signals on layers 1/2/3, keeping layer 2 as an unbroken ground plane. The result: nice, low impedance return tracks.

Yes, Jay is right - most of the time, this doesn't create problems. But when it does, it's pretty challenging to fix without a board spin, and when you're doing this professionally, that loses you time, creates risk, and is generally hella stressful.

Re: So you want to build an embedded Linux system?

#57
post #11

I especially liked the section on DDR memory PCB routing and how it is less complicated than people make it out to be. At least for this application. Makes one want to try something like this

The important caveat of that claim: it's less complicated than you think, for point to point topologies. I strongly prefer point to point designs just for their simplicity. It makes it way easier to fix any SI or timing issues through write leveling/launch calibration adjustments.

Once you get into flyby or T-routing topologies - good luck!

Re: So you want to build an embedded Linux system?

#58
post #49

Shouldnt you avoid malloc and free (after the startup phase of your application) completely in long running applications?

If your system is basically one long-running process, why would you need Linux? Maybe something lighter weight, like FreeRTOS, would be a better fit?

Re: So you want to build an embedded Linux system?

#59
post #58
post #49

Shouldnt you avoid malloc and free (after the startup phase of your application) completely in long running applications?

If your system is basically one long-running process, why would you need Linux? Maybe something lighter weight, like FreeRTOS, would be a better fit?

well the article was mentioning long running. But I agree, I shd use FreeRTOS.
Post reply on HN