Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Generally, you're working at a lot lower level than general purpose computers.</p> <p>Each CPU will have certain behaviour on power up, such as clearing all registers and setting the program counter to 0xf000 (everything here is non-specific, as is your question).</p> <p>The trick is to ensure your code is at the right place.</p> <p>The compilation process is usually similar to general purpose computers in that you translate C into machine code (object files). From there, you need to link that code with:</p> <ul> <li>your system start-up code, often in assembler.</li> <li>any runtime libraries (including required bits of the C RTL).</li> </ul> <p>System start-up code generally just initialises the hardware and sets up the environment so that your C code can work. Runtime libraries in embedded systems often make the big bulky stuff (like floating point support or printf) optional so as to keep down code bloat.</p> <p>The linker in embedded systems also usually is a lot simpler, outputting fixed-location code rather than relocatable binaries. You use it to ensure the start-up code goes at (e.g.) 0xf000.</p> <p>In embedded systems, you generally want the executable code to be there from the start so you may burn it into EPROM (or EEPROM or Flash or other device that maintains contents on power-down).</p> <p>Of course, keep in mind my last foray was with 8051 and 68302 processors. It may be that 'embedded' systems nowadays are full blown Linux boxes with all sorts of wonderful hardware, in which case there'd be no real difference between general purpose and embedded.</p> <p>But I doubt it. There's still a need for seriously low-spec hardware that needs custom operating systems and/or application code.</p> <p><a href="http://www.spjsystems.com/" rel="nofollow noreferrer">SPJ Embedded Technologies</a> has an <a href="http://www.spjsystems.com/sc51.htm" rel="nofollow noreferrer">downloadable evaluation</a> of their 8051 development environment that looks to be what you want. You can create programs up to 2K in size but it seems to go through the entire process (compiling linking, generation of HEX or BIN files for dumping on to target hardware, even a simulator which gives access to the on-chip stuff and external devices).</p> <p>The non-evaluation product costs 200 Euro but, if all you want is a bit of a play, I'd just download the evaluation - other than the 2K limit, it's the full product.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload