EmbeddedRelated.com
Forums

simulator/emulators for 8051/8085 on linux

Started by Hemant Mohapatra May 3, 2005
In article <1115144369.316158.124240@o13g2000cwo.googlegroups.com>,
Hemant Mohapatra <hemant.mohapatra@gmail.com> writes
>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).
That is the best Keil compiler for the 8051. It is limited by size only. As it is rather efficient you will find it is going to be as good as some of the less restricted compilers. Due to it's aggressive data overlaying it can outperform some of the free unrestricted compilers. You can download a later version than is on the book. The version on the CD is now quite old. I think It was a V6?
>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.
You won't get a better sim than the Keil sim. As for GCC you will be better of in some cases with the limited Keil 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.
Ignore the 8085. The 8051 is old but it is an expanding family (some 600 variants from 40+ silicon companies) Philips and Infineon added new ranges this year.
> 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)?
Yes... still by a LONG way. Also there are plenty of cheap dev kits around for it. Other choices are PIC and AVR. However these are both single source and in the case of the PIC a bit strange. You could go to ARM which has a lot of variants, cheap dev kits and many tools. Also it uses JTAG to debug so you can get a complete professional dev system quite cheaply.
>Any specific online reference that you guys found useful in learning >assembly from scratch (uptill a good level)? I will just go google >anyway..
C and the 8051 by Thomas Schultz. 3rd Editon Despite the name it does cover assembler. It is based on a Silicon Labs kit that is not expensive and uses a JTAG debugger. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Ian Bell wrote:
> 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 >
I wouldn't assume that. About once a year, I get the urge to try Wine using Windows programs I commonly use, and once a year they all fail in some way. Its a noble project, but it never seems to complete its goals.
Grant Edwards wrote:


> The book must have been written about 20 years ago.
Oh no, the book ("Embedded C") is a 2002 edition. I guess the author uses 8051 for the reasons of simplicity, if nothing else.
> 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.
I will try diversifying my reads and include ARM and PIC (they seem to be the most commonly mentioned). Thanks for the suggestions. ./h
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)?
The 80C51 is certainly, by far, the most widely sourced. It also tends to lead the 8 bit pack, on analog performance, and models are available at 25/33/50/100 (peak) MIPS see http://www.designtools.co.nz/overview.htm You are making things _much_ harder for yourself in the training dept, by mandating Linux. I'd get a minimal 2nd hand Win2000 PC, and use that as a devel box. You do not need GHz CPUs for Compilers/Emulators. You'll spend all of your time in an editor, or debug Sw, anyway, so you can ignore the windows boot screen..:) re simulation, I would suggest you sidestep that, and simply get an 80C51 with inbuilt emulation. Best current devices for that are from SiLabs, and their C8051F604DK is the lowest price. (less than a book) - and I'd also check into the develop kits for their new Si8250 80C51, with 200MHz PWMs, 10MHz loop ADC, & 50 MIPS core. That way, you test/learn with real silicon, in a real environment... Winbond, Gencore, Goal, and Atmel also have inbuilt debug 80C51's comming/in release. -jg
Hemant Mohapatra wrote:

<snip>
 > Any specific online reference that you guys found useful in learning
> assembly from scratch (uptill a good level)? I will just go google > anyway..
I'd get a Compiler that has good Assembler Report output, and scan that for various simple code examples, so you will see how the compiler maps onto the core. Another usefull training tool, is a disassembler (free on the net), - feed the final HEX file into it, and you get right down to the iron, and can see all the INT vectors, and startup codes etc, a true 'bottom up' view of your code. Most debug systems include a window that has this view dis-asm as well. -jg
On 2005-05-03, comp.arch.embedded <hemant.mohapatra@gmail.com> wrote:

>> The book must have been written about 20 years ago. > > Oh no, the book ("Embedded C") is a 2002 edition. I guess the author > uses 8051 for the reasons of simplicity, if nothing else.
The 8051 I can understand. It's popular (though not an easy architecture to learn on). The choice of the 8085 baffles me. They were considered obsolete for new projects 20 years ago. They haven't made them for years.
>> 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. > > I will try diversifying my reads and include ARM and PIC (they seem to > be the most commonly mentioned). Thanks for the suggestions.
The PIC is another quirky architecture that doesn't have good free or Linux hosted tools. If you want high-quality free, linux-hosted tools, I'd recommend the H8, AVR, or ARM. My advice: if this is a learning experience, pick one that's cheap and easy to learn rather than the one that's the most popular in industry. After you've got one architecture under your belt, move on to the next one. AVR and ARM are both quite popular. H8 not quite as much, but it is an easy part to work with. Professional grade tools for all three are free. -- Grant Edwards grante Yow! I selected E5... but at I didn't hear "Sam the Sham visi.com and the Pharoahs"!
Chris Hills wrote:

 
> But no tools that compare with the commercial windows based tools.
I notice you conveniently ignored the last sentence of my post: "Not to mention that there are commercial Linux based IDEs too. Ian
Hemant Mohapatra wrote:

> > 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? >
I currently have several on my machine which run under wine. O tried many and as expected some work well and others not. The ones I have currently are: 535 Simulator http://personales.mundivia.es/hvasquez/sim535/ PDS52 Simulator http://phyton.com WSIM51 from SPS Sogtware Simulate 2003 from FST Soft Emulator 8051 from TS Controls TopView Simulator JSIM http://home.t-online.de/home/Jens.Altmann The Linux distro does not really matter but I am using Slackware 10.0 Ian
Grant Edwards wrote:

> The PIC is another quirky architecture that doesn't have good > free or Linux hosted tools.
Agreed it is quirky but there is quite extensive Linux support for it. Ian
Scott Moore wrote:

> Ian Bell wrote: >> 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 >> > > I wouldn't assume that. About once a year, I get the urge to try Wine > using Windows programs I commonly use, and once a year they all fail in > some way. Its a noble project, but it never seems to complete its goals.
I was making no assumptions. I was speaking from personal experience. I have half a dozen windows 8051 simulators running successfully under wine on my Linux box. Ian