Re: 80186 free C compiler



"John Wilkinson" <john.wilkinson@xxxxxxxxxxx> wrote in message news:ff0yg393dw7q$.x6somhk77uvk$.dlg@xxxxxxxxxxxxx
Hi,
I am new to all this but I am about to try my first embedded design using
an 80C186 processor.
Is there a free C compiler available?
Am I correct in thinking gcc can't target the 80186 processor?

I understand I need a locator as well?
Again is there a free one?

Where can I get startup code? The book I have is Programming Embedded
Systems by Michael Barr, and he says that you could use libgloss, but I
can't find it anywhere on the internet!!

My first choice -- because I have it -- is the ancient Borland C++ v3.1 which you can probably find on eBay for a song or two. I've used it in years past to create stand-alone programs that ran on an 80188 but it takes some custom startup code to get rid of the dependency on DOS. Second choice would be Microsoft C++ v1.5x with the same caveats. You might even be able to get by with the DJGPP MS-DOS compiler if you can limit the processor target to 8086/186. Again you'll have to write your own startup code.


As for startup code, decades ago the company I worked for bought a product called C_Thru_ROM which was a library of startup and simple CRTL-substitutions to enable writing embedded software for x86 processors with commercial (MS-DOS) compilers. It was rare then and I haven't seen any in the years since but you might find a copy. Also, the company that makes it -- http://www.datalight.com -- now makes a ROM-able MS-DOS emulator.

   Norm

.



Relevant Pages

  • Re: compiling m-files (graphical interface)
    ... Are you sure you've purchased the compiler add-on ... the structure in the startup code using the loadfunction. ... Now that you've read in the settings from the prior run, you use the setfunction to send those checkbox values, popupmenu strings, etc. to the controls that need them. ... Anytime you click on a control that you wish to save the settings for, in its callback function, you need to update the settings structure with the new value of the control and save it to the mat file using ...
    (comp.soft-sys.matlab)
  • Re: Startup code
    ... In my opinion, startup code is code executed from the reset of the CPU, ... things that need to be done before the main part of a program can run - setting up critical hardware, setting up the stack, clearing out bss, copying initial data segments, copying program data from flash to ram, calling C++ constructors, starting main, initializing other hardware and software. ... Code for setting up the stack, clearing bss, and copying the initial data segment is generally part of the "crt0" module that comes with your C compiler. ... It's frequently written in assembler, ...
    (comp.arch.embedded)
  • Re: mixing C and assembly
    ... standard one that comes with the compiler you will never need to see it. ... support processor register access. ... Our initial startup code was written ... memory chip selects and block remapping to do. ...
    (comp.arch.embedded)
  • Re: mixing C and assembly
    ... and that was based on a 6805 mistral compiler we had written ... Our initial startup code was written ... in C on a compiler that would support it. ... This is not C, but an extension. ...
    (comp.arch.embedded)
  • 80186 free C compiler
    ... I am new to all this but I am about to try my first embedded design using ... Is there a free C compiler available? ... Systems by Michael Barr, and he says that you could use libgloss, but I ... can't find it anywhere on the internet!! ...
    (comp.arch.embedded)