Embedded platforms for beginners?

Started by Elof Huang September 1, 2017
    I want to learn Embedded systems, but don't know how to start it,
do you recommend any platform to start?
Il giorno venerdì 1 settembre 2017 08:08:48 UTC+2, Elof Huang ha scritto:
> I want to learn Embedded systems, but don't know how to start it, > do you recommend any platform to start?
mbed.org. They have cheap hardware, an online IDE (bleah), tutorials, demo, etc. IMHO it's better if you choose the hardware, and then download the official IDE from the producer. Bye Jack
Elof Huang wrote on 9/1/2017 2:07 AM:
> I want to learn Embedded systems, but don't know how to start it, > do you recommend any platform to start?
"Embedded systems" is a pretty general term. I would recommend any of the many ARM eval boards. TI has a few that are pretty cheap with free tools. Their MSP430 boards are pretty interesting as well. Do you have any particular goals? -- Rick C Viewed the eclipse at Wintercrest Farms, on the centerline of totality since 1998
On 01/09/17 16:07, Elof Huang wrote:
> I want to learn Embedded systems, but don't know how to start it, > do you recommend any platform to start?
If you're really a beginner, there is really nothing better than the Arduino system. So much code, blogs, forums, etc, no matter what you want to do, someone will have done it... ... mostly badly, but they will have done it, and it'll give you time to learn how to do better. I suggested the following shopping list for my son (the only one why didn't major in computer programing!) to start just recently: As discussed, the best tutorial ecosystem for learning this stuff is Arduino, and the easiest "getting started" because of the huge number of projects you can just copy from. The C language is close to the machine, so you'll learn things that you can apply to other CPU types, not just the AVR, without hiding what's really going on. The downside is that before you go too far you should read an introductory book on C. If you can borrow a not-ancient version of this it'd be good: <https://en.wikipedia.org/wiki/The_C_Programming_Language> I tried to find everything from the same AliExpress store to make the ordering easier. This stuff runs off USB or a power pack. I don't think you should buy Chinese power packs, they are often unsafe. Start with just USB power. The Arduino I started with is this "Uno" (the name refers to the CPU type and connection layout). Get two or three. You'll need a USB cable, which is included in the second link here (from the same store) (one of those and one or two of the others, unless you already have the right cable): <https://www.aliexpress.com/item/Free-shipping-UNO-R3-MEGA328P-with-usb-cable-for-Arduino-Compatible-Dropshipping/32241074510.html> <https://www.aliexpress.com/store/product/UNO-R3-MEGA328P-new-and-original-ATMEGA16U2-Good-Quality-USB-Cable/912692_1442349460.html> To wire up projects in a similar way to many you'll see online, get a couple of each proto-board and jumper wires. <https://www.aliexpress.com/store/product/Free-Shipping-Quality-400-point-mini-bread-board-breadboard-8-5CM-x-5-5CM-400-holes/912692_32325177584.html> <https://www.aliexpress.com/store/product/Free-Shipping-male-breadboard-cable-Breadboard-Wires-male-to-male-2-54pitch-20cm-in-stock/912692_711782213.html> They make bigger ones too: <https://www.aliexpress.com/store/product/MB102-Bread-plate-experiment-socket-plate-165-x-55-x-10-mm-MB-102-experiment-for/912692_1444529207.html> This board seems to provide a lot for very little money and no soldering. It plugs directly on top of the UNO and gives you buttons, lights, a numeric display, buzzer, infrared receiver (for a TV remote), and a servo interface for controlling hobby servos: <https://www.aliexpress.com/store/product/Multifunctional-expansion-board-kit-based-learning-for-arduino-UNO-r3-LENARDO-mega-2560-Shield/912692_1891771170.html> Clifford Heath.
Thank you for so much information, I have saved it


 >Clifford Heath &#26044; 9/1/2017 7:49 PM &#23531;&#36947;:
> As discussed, the best tutorial ecosystem for learning this stuff > is Arduino, and the easiest "getting started" because of the huge > number of projects you can just copy from. The C language is close > to the machine, so you'll learn things that you can apply to other > CPU types, not just the AVR, without hiding what's really going on. > The downside is that before you go too far you should read an > introductory book on C. If you can borrow a not-ancient version > of this it'd be good: > <https://en.wikipedia.org/wiki/The_C_Programming_Language>
I manage to learn C, but I want to know which should I start, C or Embedded C? Having checked Arduino site several times, its forum says it uses C++, I don't know how to program in C while the libraries are not C. >Do you have any particular goals? Still looking for it, but I am interested in making an open source hardware correspond to close source hardware like OBD.
On 02/09/17 13:57, Elof Huang wrote:
> Thank you for so much information, I have saved it > >Clifford Heath &#26044; 9/1/2017 7:49 PM &#23531;&#36947;: >> As discussed, the best tutorial ecosystem for learning this stuff >> is Arduino, and the easiest "getting started" because of the huge >> number of projects you can just copy from.
> I manage to learn C, but I want to know which should I start, C or > Embedded C?
C is C. Embedded C is a small set of mostly unnecessary extensions to C, which in any case are not well-supported by tools. Ignore it. The things you might eventually need (like fixed-point arithmetic) can be handled in regular C through libraries, with no need of language extensions.
> Having checked Arduino site several times, its forum says it uses C++, > I don't know how to program in C while the libraries are not C.
Although C++ is a fairly large set of (mostly) compatible extensions to C, very little of the Arduino API uses the features. Arduino is mostly C, with just a few C++ features used mostly to manage namespaces. If you know C at all, you'll quickly get to grips with the C++ features that are used in Arduino standard APIs and most projects. Clifford Heath.
On 09/01/2017 07:49 AM, Clifford Heath wrote:
> On 01/09/17 16:07, Elof Huang wrote: >> I want to learn Embedded systems, but don't know how to start it, >> do you recommend any platform to start? > > If you're really a beginner, there is really nothing better than > the Arduino system.
Unless you actually want to learn to build systems. Arduino is sort of embedded-Python-lite, and (last time I looked) has horribly archaic development tools. I've had source-level debugging since Microsoft 5.2 for DOS, circa 1989. Arduino? Not last time I checked.
> So much code, blogs, forums, etc, no matter > what you want to do, someone will have done it... ... mostly badly, but they will
have done it, and it'll give you
> time to learn how to do better.
If they have the time and the discipline. The percentage of code I see that is stitched together from sample code and snippets of stackexchange is mind-boggling. For instance, my son and I are in the midst of fixing one of those right now, re-doing a customer's instrument that the contract engineering firm botched. The customer paid us to demonstrate the concept and write the HDL but had the board and firmware done for cheap overseas. (That was nearly three years ago--an expensive mistake.) I'm a big fan of the LPCxpresso ecosystem myself. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 03/09/17 01:41, Phil Hobbs wrote:
> On 09/01/2017 07:49 AM, Clifford Heath wrote: >> On 01/09/17 16:07, Elof Huang wrote: >>> I want to learn Embedded systems, but don't know how to start it, >>> do you recommend any platform to start? >> >> If you're really a beginner, there is really nothing better than >> the Arduino system. > > Unless you actually want to learn to build systems. Arduino is sort of > embedded-Python-lite,
C has so little resemblance to Python that I can't understand why you said that. I know that you know both languages.
> and (last time I looked) has horribly archaic > development tools. I've had source-level debugging since Microsoft 5.2 > for DOS, circa 1989. Arduino? Not last time I checked.
I must agree with that. But is there another simple architecture with such a broad supportive beginner community? I'm not counting cases where you never need to see the machine, like RPi, the various micro-Python or Node things; they're just desktop-lite.
>> So much code, blogs, forums, etc, no matter >> what you want to do, someone will have done it... ... mostly badly, >> but they will have done it, and it'll give you >> time to learn how to do better. > > If they have the time and the discipline. The percentage of code I see > that is stitched together from sample code and snippets of stackexchange > is mind-boggling.
Yes, but there is some quite nice stuff too. It's worth being exposed to both good and bad practices, and learning to distinguish them.
> For instance, my son and I are in the midst of fixing > one of those right now, re-doing a customer's instrument that the > contract engineering firm botched.
That's pretty sad. However, the error was not because the contractor chose Arduino, but because the customer chose that contractor. Clifford Heath
On 09/02/2017 07:44 PM, Clifford Heath wrote:
> On 03/09/17 01:41, Phil Hobbs wrote: >> On 09/01/2017 07:49 AM, Clifford Heath wrote: >>> On 01/09/17 16:07, Elof Huang wrote: >>>> I want to learn Embedded systems, but don't know how to start it, >>>> do you recommend any platform to start? >>> >>> If you're really a beginner, there is really nothing better than >>> the Arduino system. >> >> Unless you actually want to learn to build systems. Arduino is sort >> of embedded-Python-lite, > > C has so little resemblance to Python that I can't understand why > you said that. I know that you know both languages.
It's not the language I mean, it's the ethos of bolting stuff together from giant libraries made of code you couldn't write yourself. Obviously there are limits--I'm not going to try reimplementing the C++ standard library any time soon--but one of the good things about learning on embedded systems is that you're closer to the metal. It's sort of like Montessori schools--the children learn that glass things break if you drop them, for instance. Reality obtrudes into the process a bit more.
> >> and (last time I looked) has horribly archaic >> development tools. I've had source-level debugging since Microsoft >> 5.2 for DOS, circa 1989. Arduino? Not last time I checked. > > I must agree with that. But is there another simple architecture > with such a broad supportive beginner community? I'm not counting > cases where you never need to see the machine, like RPi, the various > micro-Python or Node things; they're just desktop-lite. > >>> So much code, blogs, forums, etc, no matter >>> what you want to do, someone will have done it... ... mostly badly, >>> but they will have done it, and it'll give you >>> time to learn how to do better. >> >> If they have the time and the discipline. The percentage of code I >> see that is stitched together from sample code and snippets of >> stackexchange is mind-boggling. > > Yes, but there is some quite nice stuff too. It's worth being exposed > to both good and bad practices, and learning to distinguish them.
Agreed. Rubbing a puppy's nose in its mistakes, and all that. ;)
> >> For instance, my son and I are in the midst of fixing >> one of those right now, re-doing a customer's instrument that the >> contract engineering firm botched. > > That's pretty sad. However, the error was not because the contractor > chose Arduino, but because the customer chose that contractor.
It wasn't Arduino--they actually cloned the LPCxpresso board for the LPC1769. That isn't a bad start at all except that it's massive overkill for the job. But then they didn't use the 12-MHz crystal oscillator they specified--in fact they didn't set up the clock at all, so this nice 120 MHz MCU is running at its default 4 MHz on the internal RC oscillator. We'll probably use an LPC1764 running at 96 MHz on the RC, which is way better than good enough. (We, or at least I, don't do enough embedded stuff to get good at more than one or two MCU families. I can find my way round ATmegas and NXP ARMs, but that's about it these days. My son Simon does big-ass FPGAs and manly stuff like that, whereas I've done exactly one Verilog project on a CPLD.) Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 03/09/17 10:39, Phil Hobbs wrote:
> On 09/02/2017 07:44 PM, Clifford Heath wrote: >> On 03/09/17 01:41, Phil Hobbs wrote: >>> On 09/01/2017 07:49 AM, Clifford Heath wrote: >>>> On 01/09/17 16:07, Elof Huang wrote: >>>>> I want to learn Embedded systems, but don't know how to start it, >>>>> do you recommend any platform to start? >>>> If you're really a beginner, there is really nothing better than >>>> the Arduino system. >>> Unless you actually want to learn to build systems. Arduino is sort >>> of embedded-Python-lite, >> C has so little resemblance to Python that I can't understand why >> you said that. I know that you know both languages. > It's not the language I mean, it's the ethos of bolting stuff together > from giant libraries made of code you couldn't write yourself.
Ahh, I see. Well, that's not my practice. I detest many aspects of the standard Arduino APIs, and have a plan to completely rewrite them and all the other libraries I use, from the GPIO pin level up. But for a newb, I think it's an acceptable approach.
> Obviously there are limits--I'm not going to try reimplementing the C++ > standard library
I've always used as little as possible of the C++ stdlib, even when writing million-line products. It encodes and hides too many assumptions about what might be "good for me". I'll be the judge of what is good for me, thanks all the same! We used libraries we wrote ourselves, in almost all cases.
> one of the good things about > learning on embedded systems is that you're closer to the metal.
Exactly. And for a beginner, it needs to be as little metal as possible, consistent with running an HLL. STM32 is great, but you couldn't expect a beginner to configure the clock chains, for example. I don't imagine that many ARM chips are as simple as an AVR (talking peripherals here; the instruction set is the domain of the compiler). I really liked the MSP430, but it doesn't have the support that AVR has. I tried to build an Arduino-style platform for it once - big job though. I had also tried the same thing earlier with the 68HC11 - got a good toolchain going using gcc and my own debugger DL11, but never packaged it for newbs. Insufficient RAM and no hardware breakpoints were its downfall, but the MSP430 solved that. Clifford Heath.