Why is nobody implementing ARM Cortex MCU's in their projects? - Page 1
Forum section: electronics / general

author: Dijital
author_rank: Contributor
timestamp: January 11, 2017, 02:02:50 am
content: ~~~~Edit: I am talking mostly about the Cortex Ax series. The crazy 400 ball BGA chips. I don't really know much in this area so sorry if I wasn't clear about that or botched my nomenclature.~~~~I should start by stating that I have very little knowledge in this area. I have done lots of work with 8 bit micros, but never anything beyond that. What I really love about them though is the ability to slap them on my own designs. It seems like with bigger micros though, this isnt the case. Everyone seems to use an auxiliary Cortex dev board.Digging around online it seems that nobody is spinning their own boards using these SoCs, yet all the components are readily available off the shelf. What is it that is preventing people from using these SoCs in their own projects, outside of the need for a custom multilayer PCB (or is that the biggest barrier?). I have seen a bazillion projects with a raspberry pi or other arm board slapped on, but I can't find any where someone did their own implementation. I can't even find info to help those who would want to do their own implementation.Raspberry pi even offers a compute module that seems like a dead simple implementation, yet it seems no one has attempted to make their own compute module with any other cortex based SoC. Whats going on? Is the software end incredibly complex? Are the chips available from digikey crippled without paying some license fee?I feel like with the advent of high powered SoCs there would be an explosion of people building their own mini computers, whatever the cost, just for the fun of it. Instead there seems to just be this giant void outside commercial products.Edit: Should say I am talking mostly about the Cortex Ax series. Like I said I don't really know much in this area so sorry if I wasn't clear about that or botched my nomenclature.

author: Scrts
author_rank: Frequent Contributor
timestamp: January 11, 2017, 02:10:44 am
content: It is complex indeed. Especially high speed memory stuff, BGA components, etc. This will bring the PCB price up and it becomes cheaper to buy a ready-made PCB.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 11, 2017, 02:21:22 am
content: I make my own boards and use ARM Cortex MCUs on them. It's not too hard with modern tools and loads of companies offering very inexpensive PCBs. I do up to 4-layer boards routinely.

author: timb
author_rank: Super Contributor
timestamp: January 11, 2017, 02:31:55 am
content: Uhh, the ARM processor on a Raspberry Pi is *very* different from an ARM Cortex-M...The ARM SoCs used in RPi's, BeagleBone's and your iPhone are CPUs, whereas the ARM Cortex-M series are microcontrollers...I routinely make boards with ARM Cortex-M chips on them, whereas I wouldn't even attempt to do a full ARM SoC design from scratch for a personal project. It's so complex that my time is better spent just using a ready to go BeagleBone Black and integrating it into my project.(That said, I *am* capable of doing a full ARM SoC design and would do so for a client's project, if required. But in that case I'm being paid for my time.)

author: rs20
author_rank: Super Contributor
timestamp: January 11, 2017, 02:33:50 am
content: You probably want to be more specific, ARM encompasses a huge range of chips range from cheap, easy to use microcontroller style chips to full-on PC CPUs (e.g. RPi).I use NXP ARM Cortex M0+ chips quite often now (LPC11U37H and friends) -- not specifically endorsing NXP btw, it's just that's what I'm familiar with now -- thanks to their affordable dev boards.QFN packages, which is no problem, and it's no more difficult to code for than a 32-bit AVR. Easy decoupling requirements, built-in USB, nice peripherals.

author: JPortici
author_rank: Super Contributor
timestamp: January 11, 2017, 02:53:30 am
content: "lazyness"?actually i have yet to make something that i can't do with an 8 or 16 bit micro with acceptable tradeoffs in performance, let it be a commercial product or hobby project. It's I who have to say ok let's do it with a 32 bit mcu just because, as the degree of added complexity for simple stuff is, huh, discouraging.Most of the time 16 bit to me is enough. i usually wish i had more 32 bit timers in dspics but that's it, i can always get around these things and the little 32/64 bit integer math i have to useLet me tell you, i got much more excited when microchip presented the two newest pic18 (Added among others 12 bit adc + computation... AND AN INTERRUPT VECTOR TABLE! WOOOO! don't need to respin my board to use a pic24/dspic anymore*) than when the STM32F7 line came out*and the rest is also very exciting.. a really flexible 8 bit mcu

author: Dijital
author_rank: Contributor
timestamp: January 11, 2017, 03:13:34 am
content: I guess I should be more clear.Look at the raspberry pi compute modulehttps://www.raspberrypi.org/wp-content/uploads/2014/04/Untitled.pngIs it really that difficult to make something like that for any other Cortex A series SoC? I feel like homebrew (well minus the PCB) analogs of this should be pretty common, but it seems no one does them. Why are there no "Here's my little pocket linux pc I made from scratch" projects?

author: ataradov
author_rank: Super Contributor
timestamp: January 11, 2017, 03:26:00 am
content: They need 6-8 layer board and cost of doing one-off is going to be astronomical.

author: rs20
author_rank: Super Contributor
timestamp: January 11, 2017, 03:55:45 am
content: +1, and the thought of single-handedly wrangling linux to run on your custom-design board is a giant unknown (from my personal perspective, at least).

author: Bud
author_rank: Super Contributor
timestamp: January 11, 2017, 04:04:44 am
content: Beside, you need an adult PCB design package and perhaps a fair knowledge of high-speed design.

author: capt bullshot
author_rank: Super Contributor
timestamp: January 11, 2017, 08:06:35 am
content: Quote from: Dijital on January 11, 2017, 03:13:34 amThere's one:https://pyra-handheld.com/boards/pages/pyra/and it's predecessor:https://pyra-handheld.com/boards/pages/pandora/Both are great devices if you like to own a "little pocket linux pc". The development process of these things took many years, Pandora is out of stock, Pyra waiting to finish. They have to solve many problems associated with these chips: BSP (drivers for the actual hardware), various hardware issues like power supply decoupling, ...It is way (a hundred times, I guess) much easier to build your own little pocket Cortex-M based toy than such a monster ...

author: vealmike
author_rank: Regular Contributor
timestamp: January 11, 2017, 08:31:43 am
content: The bigger PSoCs have Cortex processors and are excellent hobby jobbers. An oversized USB stick with an embedded micro and CPLD / programmable analogue all in one package for less than a tenner, what's not to like?

author: MK14
author_rank: Super Contributor
timestamp: January 11, 2017, 08:43:35 am
content: Take the Raspberry PI as an example.It has taken MANY released production versions, even to get as far as we have so far. (I'm NOT 100% sure, but there have been something like 5 or so versions so far, including the small intermediate versions, such as B+).It has also taken (I estimate) many years (and longer), and a huge team of engineers and software guys (I have been led to believe), to release some of the significant later linux (and similar) OS's for the Raspberry PI.The main guy who did the Raspberry PI (Eben Upton,http://www.itv.com/news/anglia/2016-06-10/man-behind-the-raspberry-pi-is-among-the-honours-in-cambridgeshire/) is NOT some small time electronics hobbyist. He actually use to work at the Arm chip manufacturer, (Broadcom), in a very significant position, for a somewhat long time. Which gave him the knowledge/experience and influence at Broadcom, to get the project done.Broadcom don't even sell their arm chips to small (quantity) time players.tl;drLook at an early PC (e.g. Pentium), especially all the electronics on the motherboard, inside the cpu and chipset. Then look at all the the effort/work needed to create the software for it.So in very rough terms, basically all of that has been crammed into a Raspberry PI, plus all the software into the Raspberry PI's Linux (or similar) releases.Although Linux already existed. That was for X86 processors (and some others). The work to bring it into the Arm realm (not just for the raspberry PI), is still an ongoing process. Then there are all the hardware drivers, and all sorts of other issues which need sorting out.Even now, the Raspberry PI with latest OS's, is still not a complete functioning PC, by a long chalk.E.g. Try Playing GTA5 on it or getting a x86 windows 10 application/program, which you DON'T have the source code for, to run on it.These things can be done, but it is not a 5 minute task.My understanding is that there is a team of 60 people, who are working full time on the Raspberry PI project. Under the employ of the Raspberry PI foundation.

author: ebclr
author_rank: Super Contributor
timestamp: January 11, 2017, 09:54:16 am
content: A lot of profissional products use arm M0, a lot of amateurs product use mega328 why ?Arduino is easy to cut and paste from internet, Arm need a litle more google for that

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 11, 2017, 10:59:07 am
content: For Cortex A class, we are really talking desktop PC level complexity. I don't recall many hobbyist projects making their own PC motherboards. Generally speaking, even hobbyists have an application they want to implement rather than simply re-invent wheels.4 reasons:1) level of difficulty. 6 layer board, BGA escape routing, DDR timing, 32 bit busses.2) small volume cost. expensive to get 1 or 2 off prototypes3) software complexity. Linux is not trivial.4) opportunity costs. For all the time spent doing the above, you could spend $15 and get on with something more interesting.I can't really imagine any reason why a hobbyist would design a CortexA system rather than buy an off the shelf module. Raspberry Pi has been the best selling thing ever made.

author: Kjelt
author_rank: Super Contributor
timestamp: January 11, 2017, 11:30:22 am
content: You need to be a HW guru and SW linux guru to pull it of on your own.If you take the raspberry pi or beaglebone as example it took probably twenty times as much software engineering effort to adapt the specific linux version for this platform than it took to design and produce the hardware. A lot of people worked on it.Beaglebone is open HW if you make your own version of it and use the exact same components you are in business within a month.If you change the processor, you change the Phy chip and change some other peripherals you will be spending a year with three SW engineers to get the platform as stable and working as the free to download software that is now available.It is no longer a "one man can do it all within weeks" kind of project even if you use standard linux versions where you custom choose the needed modules, integration can be a long PITA.

author: westfw
author_rank: Super Contributor
timestamp: January 11, 2017, 11:24:29 pm
content: Two more reasons:1) many projects do not need the complexity of a cortex A processor.2) The "payback" for designing that class of board is very low or negative. When the Arduino was $30, but I could design an ATmega328p into my project for $4, that made a lot of sense. But for a CortexA-complexity design, it's extremely difficult to design and build one yourself for the cost of a Raspberry Pi. (manufacturing efficiencies are pushing the use of modules even at the low end, what with Arduino Pro Mini, STM32f103 and STM8 reference design clones selling for less than the sum of the parts. not to mention various cheap manufacturer "eval boards.)To some extent, the fact that a Beagleboard is "Open Source Hardware" is rather academic, because my chances of being able to modify the design slightly and build it myself (which is one of the big goals of OS, right?) are very slim :-(

author: AlfBaz
author_rank: Super Contributor
timestamp: January 11, 2017, 11:49:09 pm
content: I did a design using a bga micro-controller, ddr memory, flash, ethernet, usb, LCD etc, etc just for kicks. I learnt a hell of a lot with regards to breaking out BGAs, signal integrity and the huge cost of doing one off 8 layer boards.It's also not just the number of layers that's costly it's also defining the layer stack up and hoping that after spending all that money on making the thing, the impedances turn out to be what you thought and you don't end up with crud on your transmission lines.All up I was looking at well over $1000AUS and countless hours to build the thing with very good chance the thing would fail or I could simply buy a SBC for sub $100

author: nctnico
author_rank: Super Contributor
timestamp: January 12, 2017, 12:14:18 am
content: Quote from: Bud on January 11, 2017, 04:04:44 amNot really. In one of the projects I was involved I guided someone through the PCB design and he used Geda and PCB for a 6 layer board with an iMX5x SoC.Still count on 100 to 200 hours for a board (depending on space constraints) and another 200 hours to get Linux up & running reliably.

author: Dijital
author_rank: Contributor
timestamp: January 12, 2017, 04:21:34 am
content: Quote from: AlfBaz on January 11, 2017, 11:49:09 pmDid it work? Did you do a write up anywhere on the project?

author: mac.6
author_rank: Regular Contributor
timestamp: January 12, 2017, 10:34:47 am
content: It's quite difficult, if not impossible, to do a one sided populated board with big cortex A bga package, as most designs require heavy decoupling between bga balls.Then you have DDR trace length matching/impedance control (or going to the POP route), so either good PCB package or design help from manufacturer.You also need good pmic design, as most cortex-A cores need multiple package, this means following manufacturer "blessed" design with matched component, ie you need FAE support.

author: legacy
author_rank: Super Contributor
timestamp: January 12, 2017, 01:19:00 pm
content: Quote from: Sal Ammoniac on January 11, 2017, 02:21:22 amWhat do you use ? Altium?

author: nctnico
author_rank: Super Contributor
timestamp: January 12, 2017, 05:22:41 pm
content: Quote from: mac.6 on January 12, 2017, 10:34:47 amIt is possible (been there, done that) but only if you see the circuit board as a component which needs very careful planning. In case of the designs I have worked on the first order of business was doing placement of key components versus power distribution planes, matched impedance signals and grounding. That alone can be a very challenging puzzle (before even starting on the schematics).

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 14, 2017, 12:18:33 am
content: Quote from: legacy on January 12, 2017, 01:19:00 pmKiCad

author: AlfBaz
author_rank: Super Contributor
timestamp: January 14, 2017, 08:20:57 am
content: Quote from: Dijital on January 12, 2017, 04:21:34 amDon't know if it worked as I didn't build it 4 or 5 years ago the bare 6 layer board was going to cost around 700AUD for 5 boards from PCBcart. I did end up making just the power supply section it worked but I never got around to load testing it. It alone was a behemoth, 3 voltage rails 3.3V, 2.6V and 1.2V switchable to 0.8 for low power mode to the core. A boost converter for the LCD backlight LEDS and a LiIon charger that was dual purposed so that it could act as a pre-regulator if the battery wasn't used. This needed some load switching so that the charger IC would come out of battery testing mode and supply the rest of the circuit

author: that_guy
author_rank: Contributor
timestamp: January 16, 2017, 02:18:23 pm
content: Generally yes it's the cost of producing a PCB that can support the fine pitch BGA package that the high end Cortex A series usually comes in. I say 'usually' because if you're feeling adventurous you can buy the Allwinner A13 (Cortex A8 core) on AliExpress for $6 or so. It comes in an impressively large TQFP package. I wonder how well matched the bond wire lengths are inside that thing? But for hobby use buying a PI or similar on a proven PCB has to be the way to go.

author: tszaboo
author_rank: Super Contributor
timestamp: January 16, 2017, 02:55:16 pm
content: Quote from: nctnico on January 12, 2017, 12:14:18 amGetting the linux ready its more like infinite time and then some. If you have a linux computer in a product, you can preatty much assign someone for that board soldering the code and the kernel full time.

author: XynxNet
author_rank: Regular Contributor
timestamp: January 16, 2017, 08:09:11 pm
content: Speaking for myself. Learning curve vs. benefit is to high.I'am a hobbyist, not a professional circuit designer.The more i have to outsource manufacturing etc, because i can't do it myself or it's to expensiv, the more changes my focus from electronics to application.If application is the focus it is easier to use existing dev-boards.Same goes for my professional activities. If science is the focus, why should i custom build electronics as long as there are reasonable affordable existing solutions and specific measurement equipment is not integral to my research goal.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 16, 2017, 11:26:21 pm
content: Quote from: nctnico on January 12, 2017, 12:14:18 amI'm sure you could do it with MSPaint.With the project I mentioned I hit altiums limitations with regards to high speed design. I explored most of its offerings at the time even the ones touted as "useless" and hit birck walls everywhere.Even matched length routing was difficult because termination resistors split the net into 2 different lengths and there was no accounting for bond wire lengths within the package. Allegro's cadence had the works plus some really good routing aidsEven exporting to hyperlinx format for signal integrity analysis was problematic. Planes and polygon pours wouldn't export unless you ran 3rd party scripts and you could forget about layer stack info in altium making it through to hyperlinx

author: nctnico
author_rank: Super Contributor
timestamp: January 16, 2017, 11:36:26 pm
content: What kind of SoC did you use in your project? That must be some very exotic part because the SoCs I have used so far (Freescale and TI) didn't need all that fancy stuff to get a PCB designed for it.

author: Spikee
author_rank: Frequent Contributor
timestamp: January 17, 2017, 01:10:51 pm
content: I have done a 4 and 6 layer quad core ARM A64 core with DDR3 and MIPI / LVDS before.Find out what busses you need (LVDS , DDR3 , USB ...) and find the relevant design rules / guides for that -> follow the design rules.For decoupling just follow whatever the manufacturer recommends and you will be safe.As for high speed "interactive length tuning" features are nice to have but not necessary. For DDR2/3 the altium length tuning feature-set is not sufficient and you will have to write your own program to check or excel (manual work is necessary). Generally the IC MFG has some guidelines for DDR(3) routing -> follow that.It is not rocket science. First try took about 2 months with no prior DDR3/BGA design experience. Second design took a month. I could re-do it now in less than a week for a new board (depending on how many footprints need to be made, if from scratch ~2-3 weeks).Generally a big IC like that has much more features than you actually need. So that simplified routing a lot (you might just have 150 disconnected balls on your 400 ball bga).Also most big arm's are optimized to work on 4 layer designs due to cost.Also the major reason why you might go >4 layers is because of power routing. Could fit it in four but that's not ideal.

author: senso
author_rank: Frequent Contributor
timestamp: January 19, 2017, 01:24:40 am
content: There was a router/switch that was designed in Eagle, some Buffalo or maybe some MIPS based thingy, and it was a comercial effort..I might be painfull, but it can work, also, those nice clusters used in BMW's, VAG group and what not where designed in Eagle, and they used the auto-router....Also, why is using Atmel bad?I'm using an Atmega256RFA2 in a big project, I'm a noob because its atmel and thus it must have some Arduino connection?...

author: nctnico
author_rank: Super Contributor
timestamp: January 19, 2017, 01:33:45 am
content: Atmel is on my blacklist for lying in their datasheets. It is just too tedious to read between the lines in order to get the REAL limits of a device (or worse: find out when it is too late).

author: AlfBaz
author_rank: Super Contributor
timestamp: January 19, 2017, 01:40:56 am
content: Quote from: nctnico on January 16, 2017, 11:36:26 pmNothing exotic at all, just an arm using ddr1 which doesn't have the nice little extras to ease routing/impedance matching pains that ddr2 and 3 have. That and I wanted to study signal integrity, high speed pcb design and the tools used for it in depth

author: Scrts
author_rank: Frequent Contributor
timestamp: January 19, 2017, 04:42:32 pm
content: Well DDR1 does not have ODT like DDR2 has... So for me DDR1 routing was more painful.

author: jnz
author_rank: Frequent Contributor
timestamp: January 19, 2017, 05:42:55 pm
content: Quote from: nctnico on January 19, 2017, 01:33:45 amThat's a bummer to hear. I'm interested in their SAM CortexM0+ for a project.Any details about what to watch for? My application will be digital buss only.

author: nctnico
author_rank: Super Contributor
timestamp: January 19, 2017, 05:52:13 pm
content: Just walk away and choose a microcontroller from NXP or maybe the newer ones from TI if you value your sanity.

author: james_s
author_rank: Super Contributor
timestamp: January 23, 2017, 05:42:36 am
content: I haven't used them simply because I haven't needed to. For the microcontroller based projects I've built, the 8 bit AVR series has met all my needs, I know how to use them, they're familiar and I haven't had any reason to look elsewhere.

author: Kjelt
author_rank: Super Contributor
timestamp: January 23, 2017, 06:33:05 am
content: From a friend I found out that porting an existing "Linux" variant for their HW platform that was supported by the variant, including hardening such as killing all unneeded services, updating and employing security and making it stable (production ready), took them almost a year with four experienced software engineers and an architect. So his best guess for a mature development cycle would be around 3 man years at least. My question why it took so long: many many hidden time consuming issues if you want it to get right and stable. This is for devices that stay on 24/7 and are internet connected. After one month they had it up and running. The rest of the time was getting it lean, secure, and stable and the remote firmware update also took them quite a while.

author: Howardlong
author_rank: Super Contributor
timestamp: January 23, 2017, 10:12:07 am
content: Quote from: Kjelt on January 23, 2017, 06:33:05 amInteresting, because this reflects my own experiences about three or four years ago, it seemed like a great idea to use something where everything was already implemented, including integrated WiFi with reasonable speed, and both Ethernet and USB stacks. What wasn't so great was finding bugs for various bits and pieces, particularly in the USB stack, slow boot times and being terribly power hungry. Getting fixes re-integrated into the build proved difficult because I wasn't in the clique. It was a case of the grass apparently being greener, but in the end it wasn't. Getting a PoC up and running was reasonably easy, but making it into something that would be reliable, lean and ready for production use proved to be just too demanding in terms of time and effort.

author: jnz
author_rank: Frequent Contributor
timestamp: January 23, 2017, 04:54:56 pm
content: Quote from: Howardlong on January 23, 2017, 10:12:07 amMakes me really glad I walked away from this idea. It almost seemed to easy to "just have" wifi, file system, usb, high level programs like http server, etc.

author: tszaboo
author_rank: Super Contributor
timestamp: January 23, 2017, 07:00:11 pm
content: Quote from: Howardlong on January 23, 2017, 10:12:07 amYes, reliability and production readyness is my biggest issue. I am working with a custom linux SBC, without real network, and it is a pain. I had to implement a support for an extra USB feature, you know, the type you plug in in windows and it works.OK, plug in, nothing happens. OK, is it supported in the kernel? Recompile the thing and the linux a dozen times to work (that is a few hours every time). Ok lets find a program that uses it. Ah, there is two dozen, but only one in the distro. Ok, lets try to add it. Few weeks later I realised two different version of the program is on the distro, and the files are strangely mixed. Ok, so unmix them, apply a bunch of patches from random internet forums. Compile the linux another dozen times.The information about any Linux related stuff seems to be randomy organised. Forums and blogs and mailing lists going crazy. "ah your software is not working, just get another one with apt-get..." I have no network (by design), and I dont want to do it on every machine we make from now on, and I'm using a different distro.And this was one issue. And I'm a hardware engineer.This is the definition of not having fun at work.

author: nctnico
author_rank: Super Contributor
timestamp: January 23, 2017, 07:12:03 pm
content: Quote from: Kjelt on January 23, 2017, 06:33:05 amI guess they started with a desktop/server Linux distribution and not an embedded device distribution like Buildroot or Openembedded. I'm not saying there isn't a learning curve using Buildroot and Openembedded but at least you have better control over what runs on your device and what does not. Also having a read-only root filesystem is much easier with Buildroot (and I assume Openembedded) so a sudden power failure can't affect the filesystem.

author: Dijital
author_rank: Contributor
timestamp: January 25, 2017, 07:19:21 am
content: Quote from: NANDBlog on January 23, 2017, 07:00:11 pmMini rant just because it feels nice to get it off my chest. Not quite at the same level as you guys, but same general experience.I have made 3 forays into linux in my life. First was about 10 years ago and lasted a month. Quit because every single little thing would need research and tweaking to work. Second was a year or so ago. Lasted a good 4 months. Really tried to stick with it, and the UX had imporved. But quit because again, I got so fucking sick of having to deal with broken stuff constantly, and deal with them in the seemingly foreign language of terminal. Now my third foray has been the beaglebone black wireless I got 2 weeks ago. At 20 hours in, and and extra $15 spent on a display adapter (which shouldn't be need, but HDMI is broken on the BB), I finally got it connected to my wifi and displaying the desktop. 20 hours to get where I thought I would be in 20 minutes. (this should be linux's slogan) I have probably reflashed it 30 times now, because every other command you find online to fix an issue was a crapshoot of soft-bricking. Even when i got users to help me on the IRC channel, many left me with "hmm, never seen that before, well i dunno then". To get things working I had to cobble together commands and .configs from a variety of random posts scattered over the last few years, and use an image compiled by a contributor, not the official one. Most things, especially for the newer BBBW, have no documentation at all. The whole thing has been a nightmarish exercise in frustration and head banging.I love the idea behind linux. And I'll keep supporting it. But jesus fucking christ is it a fragmented confusing mess, filled with people who would rather tell you why writing your own config file, after fishing with obscure commands in terminal for network information in order to connect to wifi is better than having a program where you double click on your network and then enter the password to connect. Or even just a terminal command where you enter the network name and then the password.Ok I feel a bit better now.

author: Monkeh
author_rank: Super Contributor
timestamp: January 25, 2017, 07:26:52 am
content: Quote from: Dijital on January 25, 2017, 07:19:21 amAnd yet, Linux has both of those (and several options of both), and they work.

author: filssavi
author_rank: Frequent Contributor
timestamp: January 25, 2017, 08:50:55 am
content: My experience with Linux is exactly opposit with the ones here, ok granted that i have been using Linux ad my main Workstation OS for 3/4 years so I have done experience...I user Linux in a zynq processor/FPGA to do hardware Image filtering (coursework at uni), i have a flask web frontend (non hardened) that takes the Image and with the help of a c++ shim and a custom DMA driver (in kernel) sennds it to the FPGA, and then does all of this in reverse and serves the outputTo get up and running i used yocto/openembedded to get a custom Linux environement with the packages i needed, while there is a little bit of learning curve it's not that base (the thing i gate the most is that yocto is python2 only and so i must use venv's ti get it going)The most difficult part was editing the driver since the documentation is quite poor and scattered around (the LDD3 book that is regarded ad the bible of diverse is outdated in this case, that was the hardware thing), but i can say that it is a little bit like FPGA developement, once you wrapped your head around the logic of how the kernel is written it's quite easy to navigate

author: AlfBaz
author_rank: Super Contributor
timestamp: January 26, 2017, 03:56:20 am
content: Somebody on another thread recommendedthis bookon linux in embedded systems, which I duly purchased and not readApparently quite good

author: Dijital
author_rank: Contributor
timestamp: January 26, 2017, 04:41:12 am
content: Quote from: Monkeh on January 25, 2017, 07:26:52 amTrue, but when your image doesn't come with them and you are trying to get online, the task becomes a bit more daunting. Especially when no one else has documented the process.

author: filssavi
author_rank: Frequent Contributor
timestamp: January 26, 2017, 08:32:27 am
content: Quote from: Dijital on January 26, 2017, 04:41:12 amI font know where you were starting from but it seems it was not the best starting point ever.Ad I said there are system (i am familiari with yocto, but i know at Leasys of another One: bitbake) that can generare a fully functional (bother cli and GUI) Linux system from sources, by changing config files you can specifico which packets di you want, it installs also a package manager of your choice (APT yum etc) ant it is quite well documented(ti be anche FOSS project anyway)

author: brucehoult
author_rank: Super Contributor
timestamp: January 29, 2017, 01:09:40 pm
content: Quote from: MK14 on January 11, 2017, 08:43:35 amThe Raspberry Pi 3 has been out for a year now, with a 64 bit cpu. There is still not a supported 64 bit OS for it! You're limited to treating it as a slightly faster Pi 2 with regular old ARM 32 software (and actually I found that both Mono and CoreCLR run faster on the Pi2 than on the Pi3).

author: MK14
author_rank: Super Contributor
timestamp: January 29, 2017, 01:53:51 pm
content: Quote from: brucehoult on January 29, 2017, 01:09:40 pmI did not realize that 64 bit OS's were not available for the Raspberry PI3. I'm speculating, but would guess that it is needing to exceed 2/4 Gb of Ram, is what especially pushes people to want/need the 64 bit mode. Even though it has other advantages as well, such as speed and integer maths precision.So when they want the Raspberry to come with more than 4 Gb of Ram, e.g. 8 Gb (in some cases 2 Gb is the limit, because the 32 bits is signed and/or other reasons). Then it will be vital (unless a horrible memory expansion scheme is used) to have a proper 64 bit OS, in order to use all the available on-board ram.Hopefully at some point, 64 bit "PCs", based on 64 bit Arm chips, will become much more commonplace in the future. Then proper 64 bit Arm OS's are likely to follow. I think they are already available (I assume), but not used much as the hardware is not common yet (except on mobile phones and some notepads).

author: julianhigginson
author_rank: Frequent Contributor
timestamp: January 29, 2017, 11:22:58 pm
content: 64 bit OS is common for desktop linux, and even some other A53 based embedded linux boards already have 64 bit linux available.... But something major seems to be holding back the Pi. I guess it's something to do with drivers for the peripherals, but, really, no idea why they are having such a hard time making a 64 bit OS.I also have a love-hate with linux. I can't use it for my daily computing environment (mostly because stuff like Altium doesn't run on it) but do use it for compilers and embedded system development... I also tend to find that I spend a fair bit of time hacking about just to make something work. Not so much at the getting started point, my experience of modern linux is it's mostly plain sailing, but the issue for me, is once I have something working, eventually something weird happens and I have to drop what I'm actually wanting to do, go into research mode. then I find the answer, and it's good again, till the next weird thing... And most of these weird things are caused by tribalism and so many different people with huge tech egos all building stuff their own way rather than building stuff to just work with everything else.I imagine that if you love tinkering with computers, linux is probably fun (as long as you're not on a deadline) but I'd rather have my embedded computer and its standard services just work, and spend my time making useful things with it... I'm not 100% sure embedded linux is there yet, as amazing as it is, and as much as you get for free when you use it...

author: Monkeh
author_rank: Super Contributor
timestamp: January 29, 2017, 11:32:53 pm
content: Quote from: julianhigginson on January 29, 2017, 11:22:58 pmCompatibility with all the precompiled software and horribly badly written scripts by people with no concept of mixed userspaces. IOW, everything people like about the Pi.

author: nctnico
author_rank: Super Contributor
timestamp: January 30, 2017, 12:00:38 am
content: Quote from: julianhigginson on January 29, 2017, 11:22:58 pmEmbedded Linux is the defacto standard. Look at all the routers, setop boxes, VOIP phones, mobile phones (billions of them!), PABXs, test equipment, etc, etc running Linux. However, getting yourself up to speed to deploy Linux in an embedded environment takes a serious amount of effort to learn. You can't become a brain surgeon overnight either.

author: julianhigginson
author_rank: Frequent Contributor
timestamp: January 30, 2017, 12:26:46 am
content: Quote from: nctnico on January 30, 2017, 12:00:38 amLOL... sure... huge multinational enterprises with entire divisions setup to just keep linux under control manage to do it so it must be possible for anyone as long as they are a genius and completely perfect in every way and have nothing else important to do, and if they can't well they must just be lazy failures and terrible engineers. right.Plenty of other OSes manage to just work... you set them up once, and you perform updates as software packages upgrade, and generally, things just keep running.With linux, you set things up again and again, over and over. Often you need to update something and find out there's something else that needs changing to keep compatibility. This happens with my compiler VMs, and it happens with embedded linux installs. Yes with effort I can always sort it out, but what it is, is an unnecessary waste of time compared to how things could be if everything was just developed to work.And it makes having a linux based product a continuing project. You can't just hand over a linux based product that's "finished" for all intents and purposes to operations, being manufactured and shipped and customer supported... If you have a linux based product out in the world you always need some resource who knows everything about the kernel build and all the modules, who can adjust/rebuild whenever a major problem is discovered, and fix anything whenever the updates break something. And we're not talking about the application code, but a standard basic platform that you just want to run the application on!Linux gives so many features and possibilities, but at the same time it adds so much inertia to the products it enables. This is why we have a massive embedded linux botnet problem now.Yes you can offload the responsibility to one of the embedded linux providers, and that will save a lot of time and work for a small team, but then you're limited to what kind of hardware they support, and dependent on them forever, and always hoping that any particular problem you have with whatever packages you particularly need to run on it is significant enough to make them want to fix it in a timely manner...

author: james_s
author_rank: Super Contributor
timestamp: January 30, 2017, 02:10:08 am
content: Have you ever even used a flavor of embedded linux? Your post makes me think not. Why would you set it up over and over? I set up my raspberry pi as a general purpose web and FTP server with temperature monitoring and an RTL SDR dongle several years ago and it's just worked ever since. The only time it's ever gone down is during power outages or a few times when I added something else to it. It just works, and what other choices are there? Some of the machine tools at my friend's shop run WinXP embedded and it's a pain in the butt from a relative standpoint. Linux just works, in the embedded field it's a very mature product that is used practically everywhere in products from companies of all sizes. My router is a commercial product but I run an open-source firmware on it that works much better than what came on it.At my day job I work with embedded linux and we spend our time on the application level and user interface, the base OS only changes to support new hardware platforms.

author: westfw
author_rank: Super Contributor
timestamp: January 30, 2017, 06:48:17 am
content: Please enlighten me: what's the point of a 64bit OS on a system with a hard limit of 1G of memory?Isn't the OS-level functionality of "64bit" almost exclusively associated with managing more than a 32bit address space?RPi can't have more memory than that, and you really don't want it to page/swap to alternate storage, either...

author: Monkeh
author_rank: Super Contributor
timestamp: January 30, 2017, 06:49:28 am
content: Quote from: westfw on January 30, 2017, 06:48:17 amIf you're doing any math involving larger than 32-bit numbers, it helps a lot.

author: westfw
author_rank: Super Contributor
timestamp: January 30, 2017, 07:55:40 am
content: QuoteAh. I see. I was assuming that there would be cascaded registers like x86 or something, so 64bit math would be possible whether or not the operating system was 64bit. But ARM does a whole "execution state" thing where you only have the 64bit instructions when you're operating in the AArch64 state, and you can't have an AArch64 user process with a 32bit OS. Sort-of ugly and annoying, actually...Quote(https://developer.arm.com/docs/den0024/latest/3-fundamentals-of-armv8/33-changing-execution-state)

author: Dijital
author_rank: Contributor
timestamp: January 30, 2017, 08:48:58 am
content: Quote from: james_s on January 30, 2017, 02:10:08 amSure if you set up an embedded system and get it to its final state, then it will work great for years. I think the difficulty he is talking about, and the difficulty I have experienced, is when you need to make changes/adjustmants. Obviously it's easier when you have tens of thousands of hours of experience working with linux/embedded linux. However when you are someone who just wants a few things to work, and has no interest in learning the entirety of linux, it is often a daunting and time consuming process. I have used linux on and off for about a decade, mainly desktop but some embedded too, and probably have 500 hours collectively using it over that time. I still feel like I have idea what is going on when using it and constantly have to rely heavily on the internet or just give up on what I was trying to do.

author: Kjelt
author_rank: Super Contributor
timestamp: January 30, 2017, 10:12:25 am
content: If you use it for yourself on a closed inhome network and get it running so you are satisfied, yeah you can probably let it run for years without any problem.If you use it as a public internet facing device, even one port, oh man you better make sure you update the libs every week, keep logs of who is knocking on your ports and what they are doing and be an expert on the matter.People that say that they do not have to update their embedded Linux public internet facing device have absolutely no clue what they are doing. Too many raspberri pi camera projects out there of amateurs that will be used in DOS attacks and it won't suprise me if in a few years legislation will lay the responsibility of having your systems up to date with the owner of the device.

author: nctnico
author_rank: Super Contributor
timestamp: January 30, 2017, 10:57:24 am
content: Quote from: Kjelt on January 30, 2017, 10:12:25 amBut still you have to be sensible: only run the bare minimum amount of software and only fix what is broken. If you are going to update everything to the latest version then you'd be creating a new board support package for every minor update and that will be a lot of work. Over a decade ago I maintained a couple of Linux based web servers. Ofcourse I subsribed to a mailing list which announced security updates. 99.99% of those (daily) messages didn't apply to the servers I maintained and patched versions of the software versions already running where available.

author: Kjelt
author_rank: Super Contributor
timestamp: January 30, 2017, 12:11:26 pm
content: Quote from: nctnico on January 30, 2017, 10:57:24 amYes correct, part of the "hardening" process should be to disable and/or remove any unneeded modules, ports and services.How many people that buy a RPI and hang it on the internet do you thing know that or do that? It will be scary to see how many RPI's there are connected to the internet with ssh enabled with the default password.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 30, 2017, 01:05:32 pm
content: Quote from: nctnico on January 30, 2017, 12:00:38 amYes, and now all that equipment has huge security problems. Also webcams, printers, home thermostat, light bulbs. Yes, your printer can take part in a DDOS attackObviously, this is not the fault of Linux, but the fault of badly configured Linux. But that is the point,embedded Linux is hard to get right. You can't just drag and drop a desktop OS onto things like these guys do, and then hope for the best.The same would apply if Windows was used in embedded devices.

author: tszaboo
author_rank: Super Contributor
timestamp: January 30, 2017, 04:06:35 pm
content: Quote from: james_s on January 30, 2017, 02:10:08 amSure. You only need to do the following to have your experience compared to us:Design a board, with DDRx memoryChange stuff in UBOOTChange stuff in kernelCustomize the distro that you haveAdd custom programs to the distroBuild it, bebug itUpdate the kernel 2-3 times because they found security holes the size of the moonWrite (hardware) test scripts,software patch release system for simultaneously updating multiple systemsDoing stuff with the rPi is not comparable. They made the system, that even a 12 year old can use. So congratulations for comparing project blinky to the moon landing.

author: james_s
author_rank: Super Contributor
timestamp: January 30, 2017, 04:46:46 pm
content: Quote from: Kjelt on January 30, 2017, 10:12:25 amWhat is the alternative though? Windows embedded? It's not as if that's any more secure. For any system based around a general purpose operating system if it's exposed on the internet it's going to have to be set up sensibly and updated occasionally. I update my rpi's somewhat regularly but that's just running apt-get to update the packages, it's not like I have to go through all the setup or spend hours tinkering. Updating is as painless as my Windows laptop except I don't generally have to worry about the OS provider slipping in malware and crapware as Microsoft has recently become infamous for doing.

author: Monkeh
author_rank: Super Contributor
timestamp: January 30, 2017, 05:02:04 pm
content: Quote from: Kjelt on January 30, 2017, 10:12:25 amOr, instead of blindly updating 'weekly' and introducing problems, you could determine what actually needs security fixes and introduce.. only security fixes.Nah. Too easy to think about it. Just update all the things and complain it breaks.

author: nctnico
author_rank: Super Contributor
timestamp: January 30, 2017, 05:07:15 pm
content: Quote from: Kjelt on January 30, 2017, 10:12:25 amI think so too but I'm wondering how that would be implemented legally and practically. In the EU it likely becomes part of the CE (self) certification but the biggest question is how the tests and requirements are defined and how long updates are to be made available. Either way it will have a huge impact on manufacturers of all kinds of devices.

author: Kjelt
author_rank: Super Contributor
timestamp: January 30, 2017, 09:43:10 pm
content: Practically if your ip address was part of a DOS attack or other attack, your ip address would get on a blacklist , probably by your internet provider who gets a complaint. Perhaps if you remove the offending device and be retested you are cleared again.

author: Kjelt
author_rank: Super Contributor
timestamp: January 30, 2017, 09:48:37 pm
content: Quote from: Monkeh on January 30, 2017, 05:02:04 pmYes if you are one in a thousand that knows their stuff. Honestly I don,t know exactly which parts need to be updated and which do not on a linux distro, there is a need for a maintenance team perhaps with some subscription fees. Vulnerability reports are made on almost a dayly basis, do you have time to read them all? Do you have time to figure out which of the 100+ packages need an update? I like to compare it to for instance the Synology DSM solution, they have a team and continuously produce updates for bugs and new security vulnerabilities. The NAS can install it automatically. This works for people.

author: nctnico
author_rank: Super Contributor
timestamp: January 30, 2017, 11:59:39 pm
content: Quote from: Kjelt on January 30, 2017, 09:43:10 pmThis is already done by some internet providers if they detect you have a heavely infected PC (or other device) connected to internet. Still blacklisting needs to be done with care because doing it too rigorously can cause more problems than it solves and it can be used as a means of a DOS attack.Quote from: Kjelt on January 30, 2017, 09:48:37 pmAs I wrote before: if a device is sensitive to security then you'd typically know or have a list with installed software + versions. The amount of software which runs should be minimal so checking this list against a security bulletin takes a minute at most. 99.9% of the security bulletins won't affect a device anyway.

author: brucehoult
author_rank: Super Contributor
timestamp: January 31, 2017, 03:19:17 pm
content: Quote from: westfw on January 30, 2017, 06:48:17 amPlenty of reasons...- doing something where 64 bit integers is the performance limiter- doing something where more than 16 registers avoids memory spills (well, 11 or 12 really)- putting things at random places in a large address space for security, even if you're using less than 4 GB (or 1 GB) total- developing software for other Aarch64 devices with more memory but less convenient to work on (I recently used an Odroid C2 to develop a linux kernel extension for my company's 64 bit Android phones)As mentioned above, I use an Odroid C2 which has the same quad A53 as the Pi3, but clocked a little faster (1.5 GHz), with 2 GB RAM instead of 1 GB, with gigE instead of 100, and with eMMC and much faster SD card interface too. It has 64 bit Linux available and has had for a year I guess (i.e. since it came out). It's very nice. It's also only $5 more than the Pi3.I also run 32 bit programs on it. I find that the same program often runs 15% faster compiled for Aarch64 than for Thumb2 (and Thumb2 is often faster than A32, due I guess to more program fitting into L1 cache).

author: julianhigginson
author_rank: Frequent Contributor
timestamp: February 01, 2017, 10:40:15 am
content: Quote from: james_s on January 30, 2017, 02:10:08 amawww, bless.I don't read this thread for a few days, and all the magic happens.Anyway, yeah. I'm talking about proper custom designed products here, for mass production. About needing to have something that doesn't just "work OK for me" on my bench, but something that as well as possible is designed to not fail under any reasonable circumstance, foreseen or unforeseen.

author: nctnico
author_rank: Super Contributor
timestamp: February 01, 2017, 11:38:41 am
content: Most people in this thread work with the same assumption about reliability et al but just aren't so negative about using Linux.

author: julianhigginson
author_rank: Frequent Contributor
timestamp: February 01, 2017, 10:51:49 pm
content: I'm not negative about it. I can and do use it. (Most days if you count VMs in my PC)All I'm saying is there *is* a downside and a cost in time to using linux in a repeatable and reliable and properly updated way, and if you don't want to try and understand and manage that then you are going to fall into a big hole eventually...My experience with VMs isn't too bad any more, because I just make sure I only have one purpose/job for one VM then I have way less dependency incompatibilities than when I tried just adding everything I ever needed to one install...And for embedded projects I'm actually optimistic about containers as a way to mitigate package dependency clashes at a small cost of a bit of efficiency and object size. Though haven't had a reason to try them out in embedded linux yet so I'm not sure how it'll go...But you know what? I chuck everything I need in my windows install and it keeps on chugging along (though to be fair, a few years ago I got to the point where I had done too many compiler installs/uninstalls and win7 PATH variable ended up bigger than 1000 (or was it 1024?) characters.. which somehow in some piece of windows guts, got truncated to 0... and everything that relied on having something in PATH stopped working... that was a bad day)

author: nctnico
author_rank: Super Contributor
timestamp: February 01, 2017, 11:31:21 pm
content: Quote from: julianhigginson on February 01, 2017, 10:51:49 pmThat is certainly true for both Windows and Linux for many reasons. Sometimes you just can't install certain software versions side by side and have both of them work.A lot has to do with logistics: what I often see with 'pure' software developers is that they upgrade to the latest & greatest environment/libraries for some reason and obsolete every old software product or at least turn an old software product into an upgrade project so a simple change which could have made within an hour (and some time for testing & packaging) suddenly becomes a project of a week. All this assuming the source for the older version is still available but don't get me started on that!