scilent-project scrobe on the papyrus:> I want to port an exisitng C++ code from windows into a > microcontrollerYou are more likely to find a C compiler rather than c++ for your chosen microcontroller.> > > hi > > I 'm a newbie to the topic and frankly I'd like to know how C++ or > even C can run on a microconroller itself since those high level > languages needs a O/S.No they don't. A compiled C program will run on a microcontroller without needing an O/S. However if you insist on using one, then look at Salvo or uCosII.> > Cheers. >-- John B
Selecting microcontroller
Started by ●June 8, 2006
Reply by ●June 17, 20062006-06-17
Reply by ●June 17, 20062006-06-17
scilent-project wrote:> > I want to port an exisitng C++ code from windows into a > microcontroller > > I 'm a newbie to the topic and frankly I'd like to know how C++ > or even C can run on a microconroller itself since those high > level languages needs a O/S.Where did you get such an idea? An OS is just a convenience, and one for which you have to pay in some form. These include money, overhead, space, etc. -- "A man who is right every time is not likely to do very much." -- Francis Crick, co-discover of DNA "There is nothing more amazing than stupidity in action." -- Thomas Matthews
Reply by ●June 19, 20062006-06-19
Scilent-project, A compiler for embedded usually includes a file called crt0.s (c runtime) which handles initialization and calls the main() function. It's true you will have no OS services but frequently this is not required. Things like printf can work with an attached c library which hacks a block allocator function (see the last chapter of K&R for an idea), you can also have libraries which provide file support, etc etc. -SGS scilent-project wrote:> hi > > I 'm a newbie to the topic and frankly I'd like to know how C++ or even > C can run on a microconroller itself since those high level languages > needs a O/S. > > Cheers. >