Reply by Kadir Solid Gold Suleyman●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.
>
Reply by CBFalconer●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 John B●June 17, 20062006-06-17
scilent-project scrobe on the papyrus:
> I want to port an exisitng C++ code from windows into a
> microcontroller
You 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
Reply by scilent-project●June 17, 20062006-06-17
I want to port an exisitng C++ code from windows into a 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.
Cheers.
Donald wrote:
> eziggurat@gmail.com wrote:
> > Hi,
> >
> > I want to port an exisitng C++ code from windows into a microcontroller
>
> Please re-write all you c++ code into turbo C.
>
> Run it on a PC. ( 8088 @ 4.77Mhz)
>
> If you can still run your wonderful code on this platform, will you be
> ready to understand microcontrollers.
>
> Good Luck
>
> > Cheers
> > Paul
> >
>
> Donald
Reply by ●June 9, 20062006-06-09
Thank you for your wonderful your advice:)
Donald wrote:
> eziggurat@gmail.com wrote:
> > Hi,
> >
> > I want to port an exisitng C++ code from windows into a microcontroller
>
> Please re-write all you c++ code into turbo C.
>
> Run it on a PC. ( 8088 @ 4.77Mhz)
>
> If you can still run your wonderful code on this platform, will you be
> ready to understand microcontrollers.
>
> Good Luck
>
> > Cheers
> > Paul
> >
>
> Donald
Reply by ●June 9, 20062006-06-09
I have Virtex2 Pro eval board which I can possibly convert the C++ code
(written by a thrid-party) into C and find out how much resources it
uses and determine the type of microcontroller required for my
application. If the dsp algorithm is too slow, I can translate the
algorithm into VHDL/verilog and use the PowerPC or Microblaze to act as
the controller. Hopefully I can use a Spartan chip to carry out my
application if the DSP require an FPGA.
I like to thanks everyone for replying.
Cheers
Paul
Tim Wescott wrote:
> eziggurat@gmail.com wrote:
>
> > Hi,
> >
> > I want to port an exisitng C++ code from windows into a microcontroller
> > to carry out real-time processing. I guess the problems are the
> > processing speed and size of code. I guess I can resolve the code size
> > by using external memory to store the code but processing speed might
> > be an issue. What other factors would I have to consider when selecting
> > a microcontroller for my project? I would have other device connected
> > to the microcontroller; an ADC, network chip. Should I consider a CPLD
> > for the real-time processing and microcontroller as a controller.
> >
> > The cost is a main factor for my project. I would like to get the cost
> > down to $100 dollars. I am also considering the Maxim Tini chip as it
> > has a built-in ethernet. Any guidance will be very useful.
> >
> > Cheers
> > Paul
> >
> Since you haven't said what you're doing, how fast 'real time' is in
> this case, how big your code actually is or what part of Windows it
> depends on to work your questions are a bit hard to answer. I _can_ say
> that unless your real time task is very simple a CPLD probably won't cut
> it -- but if it does fit on a CPLD that may just be the right way to go.
>
> Generally when I select a processor I look at how much code must execute
> in how much time, then I choose a general processor type (8-bit, 16-bit,
> 32-bit, perhaps DSP depending on the code). Unfortunately this requires
> some experience to get right the first time, but overkill is rarely a
> bad thing for prototypes.
>
> Once I have a general idea of the core I need I look at the peripherals
> and memory I need. Then I go out and check all the processor
> manufacturers to see how close I can get to what I need with what's
> available, looking to reduce or eliminate the complement of external
> chips in the system.
>
> This study then induces a long period of requirements juggling, out of
> which comes a processor decision. At this point (if I haven't already
> done so) I try to get my hands on an eval board and benchmark some code
> to make sure I've estimated speeds correctly.
>
> Then I go build stuff.
>
> --
>
> Tim Wescott
> Wescott Design Services
> http://www.wescottdesign.com
>
> Posting from Google? See http://cfaj.freeshell.org/google/
>
> "Applied Control Theory for Embedded Systems" came out in April.
> See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by Donald●June 9, 20062006-06-09
eziggurat@gmail.com wrote:
> Hi,
>
> I want to port an exisitng C++ code from windows into a microcontroller
Please re-write all you c++ code into turbo C.
Run it on a PC. ( 8088 @ 4.77Mhz)
If you can still run your wonderful code on this platform, will you be
ready to understand microcontrollers.
Good Luck
> Cheers
> Paul
>
Donald
Reply by Tim Wescott●June 8, 20062006-06-08
Bob wrote:
> In article <Yuidne1KZ9QH3RXZnZ2dneKdnZydnZ2d@web-ster.com>, Tim Wescott
> <tim@seemywebsite.com> writes
>
>>Generally when I select a processor I look at how much code must execute
>>in how much time, then I choose a general processor type (8-bit, 16-bit,
>>32-bit, perhaps DSP depending on the code). Unfortunately this requires
>>some experience to get right the first time, but overkill is rarely a
>>bad thing for prototypes.
>>
>>Once I have a general idea of the core I need I look at the peripherals
>>and memory I need. Then I go out and check all the processor
>>manufacturers to see how close I can get to what I need with what's
>>available, looking to reduce or eliminate the complement of external
>>chips in the system.
>>
>>This study then induces a long period of requirements juggling, out of
>>which comes a processor decision. At this point (if I haven't already
>>done so) I try to get my hands on an eval board and benchmark some code
>>to make sure I've estimated speeds correctly.
>>
>>Then I go build stuff.
>
>
> Then you find two months later that the manufacturer has discontinued
> the part, or bottled it and just shoved the MOQ up to 10000 and the
> lead-time to 36 weeks ;-)
>
Well, yes. But that would happen even if I screwed up the selection --
I might as well messed up just once.
I forgot to mention that very often the best choice is something that
you've used before, like, have tools for, and trust the supplier of.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Posting from Google? See http://cfaj.freeshell.org/google/
"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by Jim Granville●June 8, 20062006-06-08
eziggurat@gmail.com wrote:
> Hi,
>
> I want to port an exisitng C++ code from windows into a microcontroller
> to carry out real-time processing. I guess the problems are the
> processing speed and size of code. I guess I can resolve the code size
> by using external memory to store the code but processing speed might
> be an issue. What other factors would I have to consider when selecting
> a microcontroller for my project? I would have other device connected
> to the microcontroller; an ADC, network chip. Should I consider a CPLD
> for the real-time processing and microcontroller as a controller.
Use a CPLD when
a) Your uC of choice lacks the peripheral details
or
b) You need distributed IO expansion, or fast-protection reactions etc
> The cost is a main factor for my project. I would like to get the cost
> down to $100 dollars. I am also considering the Maxim Tini chip as it
> has a built-in ethernet. Any guidance will be very useful.
You need to check your Code/Data footprint, but the Tini is a valid
choice, if your application fits.
Others in the sub $100 Ethernet-Module business, are
RabbitSemiconductor, and Zilog.
-jg
Reply by Ulf Samuelsson●June 8, 20062006-06-08
eziggurat@gmail.com wrote:
> Hi,
>
> I want to port an exisitng C++ code from windows into a
> microcontroller to carry out real-time processing. I guess the
> problems are the processing speed and size of code. I guess I can
> resolve the code size by using external memory to store the code but
> processing speed might be an issue. What other factors would I have
> to consider when selecting a microcontroller for my project? I would
> have other device connected to the microcontroller; an ADC, network
> chip. Should I consider a CPLD for the real-time processing and
> microcontroller as a controller.
www.iotech.dk will provide you an ARM9 + Spartan 3 FPGA for about $100
in a nice module format.
If your code is using the Windows API, you maybe want to look into using
Windows CE?
>
> The cost is a main factor for my project. I would like to get the cost
> down to $100 dollars. I am also considering the Maxim Tini chip as it
> has a built-in ethernet. Any guidance will be very useful.
>
> Cheers
> Paul
--
Best Regards,
Ulf Samuelsson
ulf@a-t-m-e-l.com
This message is intended to be my own personal view and it
may or may not be shared by my employer Atmel Nordic AB