Clifford Heath <no.spam@please.net> writes:> 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.Circuit Python? https://www.adafruit.com/product/3501 I haven't tried it yet but it doesn't look that desktop-ish.
Embedded platforms for beginners?
Started by ●September 1, 2017
Reply by ●September 2, 20172017-09-02
Reply by ●September 3, 20172017-09-03
On 03/09/17 11:21, Paul Rubin wrote:> Clifford Heath <no.spam@please.net> writes: >> 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. > > Circuit Python? https://www.adafruit.com/product/3501 > I haven't tried it yet but it doesn't look that desktop-ish.* No need to allocate or manage memory (it's GC'd) * API access to all port pins, audio, touch, etc * No need to touch a peripheral device directly * No need to initialize the chip or devices In other words, it's fairly highly-managed. That's a fine thing, but the skills are not easily transferable to other MCUs. Clifford Heath.
Reply by ●September 3, 20172017-09-03
Clifford Heath wrote on 9/3/2017 12:26 AM:> On 03/09/17 11:21, Paul Rubin wrote: >> Clifford Heath <no.spam@please.net> writes: >>> 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. >> >> Circuit Python? https://www.adafruit.com/product/3501 >> I haven't tried it yet but it doesn't look that desktop-ish. > > * No need to allocate or manage memory (it's GC'd)What is GC?> * API access to all port pins, audio, touch, etc > * No need to touch a peripheral device directly > * No need to initialize the chip or devices > > In other words, it's fairly highly-managed. > That's a fine thing, but the skills are not easily > transferable to other MCUs.I'm not sure that is really true. There are many other skills that are learned in this process which *are* transferable. Just learning to use the tools and debug a program is the most important skill of all I think. The rest is just details that differ largely between targets. -- Rick C Viewed the eclipse at Wintercrest Farms, on the centerline of totality since 1998
Reply by ●September 3, 20172017-09-03
Clifford Heath 於 9/2/2017 4:25 PM 寫道:> On 02/09/17 13:57, Elof Huang wrote: >> Thank you for so much information, I have saved it >> >Clifford Heath 於 9/1/2017 7:49 PM 寫道: >>> 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.All I need to do is learning C, and do not need to worry about Embedded part and Arduino?
Reply by ●September 3, 20172017-09-03
On 03/09/17 16:14, rickman wrote:> Clifford Heath wrote on 9/3/2017 12:26 AM: >> On 03/09/17 11:21, Paul Rubin wrote: >>> Clifford Heath <no.spam@please.net> writes: >>>> 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. >>> >>> Circuit Python? https://www.adafruit.com/product/3501 >>> I haven't tried it yet but it doesn't look that desktop-ish. >> >> * No need to allocate or manage memory (it's GC'd) > > What is GC?Garbage collection. Make new objects and just lose them, the GC will pick them up. You never know when the GC will run, and you need a *lot* more memory, so it's not a good way to get the most out of an MCU.>> * API access to all port pins, audio, touch, etc >> * No need to touch a peripheral device directly >> * No need to initialize the chip or devices >> >> In other words, it's fairly highly-managed. >> That's a fine thing, but the skills are not easily >> transferable to other MCUs. > > I'm not sure that is really true. There are many other skills that are > learned in this process which *are* transferable. Just learning to use > the tools and debug a program is the most important skill of all I > think. The rest is just details that differ largely between targets.Yes. But all those skills can also be learned in a desktop environment. If you actually want to learn embedded, the primary need is to learn how to control hardware, especially to deal with fine-grained real-world timing constraints (timer/capture hardware, etc). Clifford Heath.
Reply by ●September 3, 20172017-09-03
On 03/09/17 17:37, Elof Huang wrote:> Clifford Heath 於 9/2/2017 4:25 PM 寫道: >> On 02/09/17 13:57, Elof Huang wrote: >>> Thank you for so much information, I have saved it >>> >Clifford Heath 於 9/1/2017 7:49 PM 寫道: >>>> 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. > > > All I need to do is learning C, and do not need to worry about Embedded > part and Arduino?Arduino is a development platform and a set of C/C++ libraries to talk to the hardware. If you use an Arduino device, you'll want to start with the Arduino platform. You might move beyond it, but not soon. You don't need to worry about Embedded C. I've been writing embedded C for over 20 years, and until you mentioned it, never even knew that "Embedded C" existed. Clifford Heath.
Reply by ●September 3, 20172017-09-03
Elof Huang wrote on 9/3/2017 3:37 AM:> Clifford Heath 於 9/2/2017 4:25 PM 寫道: >> On 02/09/17 13:57, Elof Huang wrote: >>> Thank you for so much information, I have saved it >>> >Clifford Heath 於 9/1/2017 7:49 PM 寫道: >>>> 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. > > > All I need to do is learning C, and do not need to worry about Embedded part > and Arduino?Then use C tools on your computer or phone and play away! Nothing is simpler (in terms of getting the tools up and running) and 90% of what you learn will be useful no matter what your target is. I actually recommend that you learn Forth though. It is *much* easier to ramp up with and runs on nearly any target. MPE in Europe and Forth Inc in the US supply eval versions you can learn with and there are many open source versions. I used Win32Forth for a commercially used test fixture which has made me a lot of money for very little hassle. -- Rick C Viewed the eclipse at Wintercrest Farms, on the centerline of totality since 1998
Reply by ●September 3, 20172017-09-03
Clifford Heath wrote on 9/3/2017 3:52 AM:> On 03/09/17 16:14, rickman wrote: >> Clifford Heath wrote on 9/3/2017 12:26 AM: >>> On 03/09/17 11:21, Paul Rubin wrote: >>>> Clifford Heath <no.spam@please.net> writes: >>>>> 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. >>>> >>>> Circuit Python? https://www.adafruit.com/product/3501 >>>> I haven't tried it yet but it doesn't look that desktop-ish. >>> >>> * No need to allocate or manage memory (it's GC'd) >> >> What is GC? > > Garbage collection. Make new objects and just lose them, > the GC will pick them up. You never know when the GC will > run, and you need a *lot* more memory, so it's not a good > way to get the most out of an MCU.Why didn't you write garbage collection? It's not like "GC'd" is a commonly used abbreviation. -- Rick C Viewed the eclipse at Wintercrest Farms, on the centerline of totality since 1998
Reply by ●September 3, 20172017-09-03
On Sun, 3 Sep 2017 17:52:42 +1000, Clifford Heath <no.spam@please.net> wrote:>On 03/09/17 16:14, rickman wrote: > >> >> What is GC? > >Garbage collection. Make new objects and just lose them, >the GC will pick them up. You never know when the GC will >run, and you need a *lot* more memory,Those are misconceptions: there are systems that are completely deterministic, others that are very predictable (e.g., GC is schedulable in particular time slots, won't exceed given percentage of CPU time, etc.), and systems that don't need much additional memory. There even are systems that combine predictability with low memory overhead. It is absolutely true that GC requires *some* extra room and *some* extra CPU cycles wrt a non-GC system ... but the notion that GC is something unpredictable is a misconceived generalization of behavior that is implementation dependent. You may dislike GC and that is fine, but please don't go spreading FUD. Many GC runtimes are intended for desktop/server use, and those are inappropriate for small or RT systems - but that doesn't mean all of them are.>so it's not a good way to get the most out of an MCU.I would say it it depends on the system. My position is that GC has no place in a small system. OTOH, if you're talking about a complex system with 32-bit controller and 100s of KB (or more) of RAM ... George
Reply by ●September 3, 20172017-09-03
On 04/09/17 05:58, George Neuner wrote:> On Sun, 3 Sep 2017 17:52:42 +1000, Clifford Heath <no.spam@please.net> > wrote: > >> On 03/09/17 16:14, rickman wrote: >>> What is GC? >> >> Garbage collection. Make new objects and just lose them, >> the GC will pick them up. You never know when the GC will >> run, and you need a *lot* more memory, > > Those are misconceptions: there are systems that are completely > deterministic, others that are very predictable (e.g., GC is > schedulable in particular time slots, won't exceed given percentage of > CPU time, etc.), and systems that don't need much additional memory. > > There even are systems that combine predictability with low memory > overhead.All that is true. None of it invalidates what I said.>> so it's not a good way to get the most out of an MCU. > > I would say it it depends on the system. > My position is that GC has no place in a small system.Thanks for confirming my position.> OTOH, if you're talking about a complex > system with 32-bit controller and 100s of KB (or more) of RAM ...Then you have resources in such excess that *you don't need* to get the best out of it. Exactly what I said, in other words.