EmbeddedRelated.com
Forums

Embedded platforms for beginners?

Started by Elof Huang September 1, 2017
On 08/09/17 12:40, Tom Gardner wrote:
> On 08/09/17 11:07, David Brown wrote: >> On 08/09/17 09:42, Tom Gardner wrote: >>> On 08/09/17 01:23, Phil Hobbs wrote: >>>> On 09/06/2017 03:45 AM, Tom Gardner wrote: >> >>>>> As for MCU/memory not being a cost driver, that means >>>>> they no longer preclude GC. >>>> >>>> The primary thing that precludes GC in my embedded projects is me. >> >> My main reasoning for not using garbage collection, is that my code does >> not generate garbage :-) > > Lucky you; usually my code /is/ garbage :) > >>> And that's an incontestable reason :) >>> >>> Personally I've never included GC in my embedded projects >>> (although I use it everywhere else). But my reason is >>> different: I'm interested in the /hard/ realtime behaviour. >>> >>> That frequently makes it difficult for me to include things >>> like caches and interrupts. Fortunately there /are/ alternatives. >>> >> >> Usually in that kind of project, you are avoiding dynamic memory and not >> using any kind of malloc/free equivalent. > > Agreed, although I don't object to using malloc > during startup.
Yes, that's fair enough (though I prefer static allocation when possible - it makes it easier to see memory usage in map files. And for less capable microcontrollers, it can be more efficient). I have used systems where the malloc/free system is implemented as something like : static uint8_t heap[HEAP_SIZE]; static uint8_t * heapPointer; void * malloc(size_t size) { if ((&heap[HEAP_SIZE] - heapPointer) < size) { die_horribly(); } uint8_t * p = heapPointer; heapPointer += size; return p; } void free(void * ptr) { die_horribly(); }
> > I've always liked (and usually been able to achieve) > almost complete separation between the hard realtime > code and the "other stuff". Frequently the "other stuff" > is coded in whatever is convenient, which usually > includes GC.
On 08/09/17 12:24, David Brown wrote:
> On 08/09/17 12:40, Tom Gardner wrote: >> On 08/09/17 11:07, David Brown wrote: >>> On 08/09/17 09:42, Tom Gardner wrote: >>>> On 08/09/17 01:23, Phil Hobbs wrote: >>>>> On 09/06/2017 03:45 AM, Tom Gardner wrote: >>> >>>>>> As for MCU/memory not being a cost driver, that means >>>>>> they no longer preclude GC. >>>>> >>>>> The primary thing that precludes GC in my embedded projects is me. >>> >>> My main reasoning for not using garbage collection, is that my code does >>> not generate garbage :-) >> >> Lucky you; usually my code /is/ garbage :) >> >>>> And that's an incontestable reason :) >>>> >>>> Personally I've never included GC in my embedded projects >>>> (although I use it everywhere else). But my reason is >>>> different: I'm interested in the /hard/ realtime behaviour. >>>> >>>> That frequently makes it difficult for me to include things >>>> like caches and interrupts. Fortunately there /are/ alternatives. >>>> >>> >>> Usually in that kind of project, you are avoiding dynamic memory and not >>> using any kind of malloc/free equivalent. >> >> Agreed, although I don't object to using malloc >> during startup. > > Yes, that's fair enough (though I prefer static allocation when possible > - it makes it easier to see memory usage in map files. And for less > capable microcontrollers, it can be more efficient). > > I have used systems where the malloc/free system is implemented as > something like : > > static uint8_t heap[HEAP_SIZE]; > static uint8_t * heapPointer; > > void * malloc(size_t size) { > if ((&heap[HEAP_SIZE] - heapPointer) < size) { > die_horribly(); > } > uint8_t * p = heapPointer; > heapPointer += size; > return p; > } > > void free(void * ptr) { > die_horribly(); > }
Yes indeed. In one system I built, the client looked through squinty eyes (but also had a wry smile) at a function of mine called void expire().
On 09/08/2017 07:24 AM, David Brown wrote:

> void free(void * ptr) { > die_horribly(); > }
My big brother used to say that the tape drives on the IBM System/360 at his school had an undocumented instruction: SST, for Stop and Stretch Tape. Other systems were rumoured to have HCF, for Halt and Catch Fire. ;) Of course back then there were Real Programmers like Mel Kaye. http://www.catb.org/jargon/html/story-of-mel.html 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
A Raspberry PI 3 should work fine. It is VERY cheap. There is a thriving Maker community associated with it. Some use it with Arduino.

It is the size of a pack of playing cards.

It is powered by Micro USB and has the following :

   + Broadcom BCM2837 Arm7 Quad Core Processor powered SBC running at 900MHz
       In 64 bit mode it becomes a Arm8
       Can be overclocked pretty easily
   + 1GB RAM
   + 40pin extended GPIO
   + 4 normal USB 2
   + 1 Ethernet
   + built-in wifi
   + CSI camera port for connecting the RPI camera
   + DSI display port for connecting the RPI touch screen display
   + HDMI
   + Micro SD card as disk. 

Operating systems :  Primarily Raspbian, other Linuxes, FreeBSD, HardenedBSD, RiscOS and Windows 10 IOT core.

It is both a normal computer and have an I/O expansion port for whatever you try to make.

It is difficult to see a more ideal start system for somebody who want to start with embedded systems.

Adafruit seems to like it a lot.
www.adafruit.com/raspberrypi&lrm;

https://www.raspberrypi.org/

Phil Hobbs wrote:
> On 09/08/2017 07:24 AM, David Brown wrote: > >> void free(void * ptr) { die_horribly(); } > My big brother used to say that the tape drives on the IBM System/360 > at his school had an undocumented instruction: SST, for Stop and > Stretch Tape. Other systems were rumoured to have HCF, for Halt and > Catch Fire. ;) >
Now a major cable network series on a station near you: http://www.imdb.com/title/tt2543312/
> Of course back then there were Real Programmers like Mel Kaye. > > http://www.catb.org/jargon/html/story-of-mel.html > > > Cheers > > Phil Hobbs > >
-- Les Cargill
tarjei99@gmail.com wrote:
> A Raspberry PI 3 should work fine. It is VERY cheap. There is a > thriving Maker community associated with it. Some use it with > Arduino. > > It is the size of a pack of playing cards. > > It is powered by Micro USB and has the following : > > + Broadcom BCM2837 Arm7 Quad Core Processor powered SBC running at > 900MHz In 64 bit mode it becomes a Arm8 Can be overclocked pretty > easily + 1GB RAM + 40pin extended GPIO + 4 normal USB 2 + 1 Ethernet > + built-in wifi
... and you can bridge the WiFi and Ethernet... > + CSI camera port for connecting the RPI camera +
> DSI display port for connecting the RPI touch screen display + HDMI > + Micro SD card as disk. > > Operating systems : Primarily Raspbian, other Linuxes, FreeBSD, > HardenedBSD, RiscOS and Windows 10 IOT core. > > It is both a normal computer and have an I/O expansion port for > whatever you try to make. >
The 4 USB ports mean you can add Ardiunos for hard realtime capability, or for protocol conversion. There is a small eternity of other USB peripherals. The Arduino is generally seen as a serial port, so you might be constrained to 115,200 bits/sec per.
> It is difficult to see a more ideal start system for somebody who > want to start with embedded systems. > > Adafruit seems to like it a lot. www.adafruit.com/raspberrypi&lrm; > > https://www.raspberrypi.org/ >
-- Les Cargill
kristoff <kristoff@skypro.be> wrote:

> My advice usually is, start with one of these arduino-starter kits to > get your feet wet, and -once you have done that- you can then descide on > what your next step will be: native AVR + gcc, mbed, STM32 + libopencm3, > LPCxpresso (indeed, also very nice), PIC, MSP430, ...
There's also languages other than C if you want. AVR-Ada is available for a higher level language. Although I would advise looking at this after you've checked out the basics of Arduino.
On 10.9.2017 &#1075;. 16:53, Les Cargill wrote:
> Phil Hobbs wrote: >> On 09/08/2017 07:24 AM, David Brown wrote: >> >>> void free(void * ptr) { die_horribly(); } >> My big brother used to say that the tape drives on the IBM System/360 >> at his school had an undocumented instruction: SST, for Stop and >> Stretch Tape. Other systems were rumoured to have HCF, for Halt and >> Catch Fire. ;) >> > > Now a major cable network series on a station near you: > > http://www.imdb.com/title/tt2543312/ >
The show is not bad, I like it. Last season is too much web oriented though. Dimiter ====================================================== Dimiter Popoff, TGI http://www.tgi-sci.com ====================================================== http://www.flickr.com/photos/didi_tgi/
On 09/10/2017 09:53 AM, Les Cargill wrote:
> Phil Hobbs wrote: >> On 09/08/2017 07:24 AM, David Brown wrote: >> >>> void free(void * ptr) { die_horribly(); } >> My big brother used to say that the tape drives on the IBM System/360 >> at his school had an undocumented instruction: SST, for Stop and >> Stretch Tape.&nbsp; Other systems were rumoured to have HCF, for Halt and >> Catch Fire. ;) >> > > Now a major cable network series on a station near you: > > http://www.imdb.com/title/tt2543312/
Well, I suppose that was inevitable. I haven't watched TV in thirty years except on rare occasions when I'm stuck in some hotel room that's even bleaker than the Vast Wasteland, so I'm not au courant with the latest offerings. 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
Phil Hobbs wrote:
> On 09/10/2017 09:53 AM, Les Cargill wrote: >> Phil Hobbs wrote: >>> On 09/08/2017 07:24 AM, David Brown wrote: >>> >>>> void free(void * ptr) { die_horribly(); } >>> My big brother used to say that the tape drives on the IBM >>> System/360 at his school had an undocumented instruction: SST, >>> for Stop and Stretch Tape. Other systems were rumoured to have >>> HCF, for Halt and Catch Fire. ;) >>> >> >> Now a major cable network series on a station near you: >> >> http://www.imdb.com/title/tt2543312/ > > Well, I suppose that was inevitable.
It's not bad.
> I haven't watched TV in thirty > years except on rare occasions when I'm stuck in some hotel room > that's even bleaker than the Vast Wasteland, so I'm not au courant > with the latest offerings. >
I had little choice - reading or TV - because of little kids underfoot. The revolution begin with David Lynch's "Twin Peaks." Which you night oughta see. Or maybe not. And one John Kricfalusi came up with "Ren and Stimpy" and thereby all the DNA for the next generation was stored. Click on the link. But only if your dare. http://www.dailymotion.com/video/x3hlree It's gone beyond torrent into raging flood. We're in a golden age of the medium. Here's what's bizarre about it - the entire edifice is built in the ability of people to comment on fora about what they think of the shows. This has caused TV to overflow the banks of the restrictions of the Neilsen box. As with all things, it is a measurement problem. A modest and noisy improvement in the measurements produces, as always, an astounding result.
> Cheers > > Phil Hobbs >
-- Les Cargill ( a card-carrying member of a measurement-constrained species )