EmbeddedRelated.com
Forums

simulator/emulators for 8051/8085 on linux

Started by Hemant Mohapatra May 3, 2005
Hello Everyone,

Is there a good simulator for 8051/8085 muCs on linux? I checked out
sourceforge/freshmeat but was not satisfied with the available
projects. Most of the currently available limit the stack size. Also,
is there a simulator with C compiler bundled together? I am new to
embedded programming and would like to start coding in C (and not
assembly). 

Thanks in advance
./h

Hemant Mohapatra wrote:
> Is there a good simulator for 8051/8085 muCs on linux? I checked out > sourceforge/freshmeat but was not satisfied with the available > projects. Most of the currently available limit the stack size. Also, > is there a simulator with C compiler bundled together? I am new to > embedded programming and would like to start coding in C (and not > assembly).
The free C Compiler for 8051 mcus, SDCC, comes with some sort of simulator. However it is badly documented and I never got anywhere with it. http://sdcc.sourceforge.net/ Beside that I have never ever found a suitable emulator for 8051 running under Linux. HTH, Matthias -- Matthias Arndt <marndt@asmsoftware.de> <matthias.arndt@tu-clausthal.de> PGP-Key: http://www.asmsoftware.de/marndt.pgp ICQ: 40358321 >>> Jabber: simonsunnyboy@jabber.ccc.de <<<
Hemant Mohapatra wrote:

> Hello Everyone, > > Is there a good simulator for 8051/8085 muCs on linux? I checked out > sourceforge/freshmeat but was not satisfied with the available > projects.
For stuff about the 8051 the best place to start is 8052.com.
> Most of the currently available limit the stack size.
That might be because the stack size in the 8051 *is* limited.
> Also, > is there a simulator with C compiler bundled together? I am new to > embedded programming and would like to start coding in C (and not > assembly).
Keil (keil.com) do a well respected C complier and simulator. If you are new to embedded programming then *not* learning assembler is as unwise as not reading the device data sheet. Ian
In article <1115093562.732655.281750@o13g2000cwo.googlegroups.com>,
Hemant Mohapatra <hemant.mohapatra@gmail.com> writes
>Hello Everyone, > >Is there a good simulator for 8051/8085 muCs on linux?
8051 or 8085? They are VERY different.
>I checked out >sourceforge/freshmeat but was not satisfied with the available >projects. Most of the currently available limit the stack size.
The best 8051 compilers have a compiled stack and the 8051 is very limited in stack space anyway. The better 8051 compilers and AFAIK all the simulators run on Windows. If you want to do any serious 8051 development you won't be doing it on Linux.
>Also, >is there a simulator with C compiler bundled together? I am new to >embedded programming and would like to start coding in C (and not >assembly).
Don't start. If you are not interested in doing assembly level programming don't do embedded. It is as simple as that. Most embedded programing is in C but you still need to understand the hardware and the assembly language for the part. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills wrote:

> > The better 8051 compilers and AFAIK all the simulators run on Windows. > If you want to do any serious 8051 development you won't be doing it on > Linux. >
Can't let that go unchallenged Chris. Most of the Windows based simulators run fine on linux using wine and there very soon will be a very good cross platform 8051 simulator - watch this space. There are several assemblers with a native Linux port and of course the SDCC compiler, all of which are free. Not to mention that there are commercial Linux based IDEs too. Ian
On 2005-05-03, Hemant Mohapatra <hemant.mohapatra@gmail.com> wrote:

> Is there a good simulator for 8051/8085 muCs on linux?
You do realize that the 8051 and 8085 are completely different architectuers? There are several 8080/8085/Z80 simulators for Linux. Most of them were set up to run the CP/M OS.
> I checked out sourceforge/freshmeat but was not satisfied with > the available projects.
Twenty years and five employers ago there was an excellent 8051 simulator written in C that ran under v7 on a PDP-11. It simulated all of the standard 8051 peripherals as well as the basic CPU/memory. It was an in-house program we used to test/debug embedded stuff we were writing. I'm sure it would run fine on Linux, but that's a moot point since I don't have a copy.
> Most of the currently available limit the stack size.
Huh? The 8051 limits the stack size in hardware, so a simulator had better limit the stack size or it would be much of a simulator.
> Also, is there a simulator with C compiler bundled together? I > am new to embedded programming and would like to start coding > in C (and not assembly).
1) Unless you've got really good reasons to use an 8051 or 8085, you'd be much better off picking a modern processor. If you want to do development under Linux, you're probably best off with something supported by GCC. I'd recommend either the Renesas H8 family or the Atmel AVR. 2) If you want to do embedded stuff, you'll have to learn assembly. -- Grant Edwards grante Yow! Loni Anderson's hair at should be LEGALIZED!! visi.com
Grant, Ian, Chris and Matthias:

Thanks a lot for the information. I agree with you (and others who
replied) about the assembly part. I am currently working with the Keil
compiler that came with the book "Embedded C - by Michael J Pont"
although its a demo compiler (and thus, limited in a few ways).

Ian: do let me know if you have personally used a windows based 8051
simulator that you used in linux via wine. Also, which distro of linux?


Matthias: I have tried SDCC from sourceforge but unfortunately, did not
get anywhere much. I am basically looking for a something that is
primarily a  simulator; am happy with GCC being the compiler.

Grant: Yes, I do realise the differences b/w 8051 and 8085. It's just
that the book I am reading (see above) recommends a newbie start with
these archs since they are relatively simpler. I do not have much of a
personal opinion on this though. Basically, the books have example code
pertinent to 8051. Btw, what is the most commonly used mu-C in embedded
industry these days (I was told, its 8051)?

Any specific online reference that you guys found useful in learning
assembly from scratch (uptill a good level)? I will just go google
anyway.. 

Thanks a lot for the replies,
Hemant

On 2005-05-03, Hemant Mohapatra <hemant.mohapatra@gmail.com> wrote:

Regarding the choice of the 8051/8085.

Yes, the 8051 is still pretty popular.  There are a lot of
vendors selling a lot of different varieties. The 8051
architectuer is also pretty quirky -- especially if you want to
program in C or you need to use external data memory.  The 8085
was considered obsolete 25+ years ago when the Z80 came out.
Forget about the 8085.

> Grant: Yes, I do realise the differences b/w 8051 and 8085. > It's just that the book I am reading (see above) recommends a > newbie start with these archs since they are relatively > simpler.
The book must have been written about 20 years ago.
> I do not have much of a personal opinion on this though. > Basically, the books have example code pertinent to 8051. Btw, > what is the most commonly used mu-C in embedded industry these > days (I was told, its 8051)?
That depends on how you measure it. If it's design wins, it's probably PIC or 8051, though the AVR and various flavors of ARM are coming on pretty strong the past couple years. If it's units sold, it's probably a Chinese/Taiwanese 4-bitter (or possibly one of the 6501-subset parts) that goes into toys. -- Grant Edwards grante Yow! Maybe we could paint at GOLDIE HAWN a rich PRUSSIAN visi.com BLUE --
In article <d57pfs$kt9$1@slavica.ukpost.com>, Ian Bell
<ruffrecords@yahoo.com> writes
>Chris Hills wrote: > >> >> The better 8051 compilers and AFAIK all the simulators run on Windows. >> If you want to do any serious 8051 development you won't be doing it on >> Linux. >> > >Can't let that go unchallenged Chris. Most of the Windows based simulators >run fine on linux using wine and
As I said you the serious tools run under windows not Linux. To run them on Linux you will need a windows emulator.
>there very soon will be a very good cross >platform 8051 simulator - watch this space. There are several assemblers >with a native Linux port and of course the SDCC compiler, all of which are >free.
But no tools that compare with the commercial windows based tools. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Hemant Mohapatra wrote:
> Grant, Ian, Chris and Matthias: > > Thanks a lot for the information. I agree with you (and others who > replied) about the assembly part. I am currently working with the
Keil
> compiler that came with the book "Embedded C - by Michael J Pont" > although its a demo compiler (and thus, limited in a few ways). > > Ian: do let me know if you have personally used a windows based 8051 > simulator that you used in linux via wine. Also, which distro of
linux?
> > > Matthias: I have tried SDCC from sourceforge but unfortunately, did
not
> get anywhere much. I am basically looking for a something that is > primarily a simulator; am happy with GCC being the compiler. > > Grant: Yes, I do realise the differences b/w 8051 and 8085. It's just > that the book I am reading (see above) recommends a newbie start with > these archs since they are relatively simpler. I do not have much of
a
> personal opinion on this though. Basically, the books have example
code
> pertinent to 8051. Btw, what is the most commonly used mu-C in
embedded
> industry these days (I was told, its 8051)? > > Any specific online reference that you guys found useful in learning > assembly from scratch (uptill a good level)? I will just go google > anyway.. > > Thanks a lot for the replies, > Hemant
There is no assembly course in general, it is specific to the architecture of the micro you choose. You will need to learn the assembly language for every core. That's where C is preferable when you can afford it, but others will argue, forget that... They are all similar, though, from a distance, moving data to and from registers, branching, etc... If you need an intro, you could try this: http://search390.techtarget.com/sDefinition/0,,sid10_gci211604,00.html