8051 on-chip debugging

[Please don't top-post.]

The Small Device C Compiler (aka sdcc) is free open-source software and is reasonable to start out with. You're probably best to begin poking around with getting your first "Hello, world!" program (i.e., get a selected pin to toggle at a selected rate) in assembler so that you get accustomed to the 8051 architecture before moving on to C programming.

formatting link

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb
Loading thread data ...

In message , David Brown writes

I have used this one and it supports only the mainstream 8051's The Dallas parts are not mainstream and use a non standard core with additional non standard SFR's

SDCC does not generate good or sensible code. Last time we had this discussion and it got heated someone (no names to protect the guilty) who was arguing very strongly for the SDCC was going to produce a comparison between the two. Some two years later and we are still waiting....

Keil used to recommend the Dunfield 8051 compiler for hobby users with no money.

There is the option of course of the Keil evaluation compiler. The biggest problem with the 8051 is the very small amount of RAM. You usually run out of this first rather than program memory. The Keil uses a rigorous calling tree analysis to do data overlaying. Something you should not do manually! I have seen 120 bytes of data shrink to 19 bytes in the Keil compiler.

It also comes with a large number of example programs.

The other point of the Keil system is the extremely good simulator debugger. It will also mate with the

formatting link
PCB design software which also has a spice simulator. SO you can actually simulate the hardware and software. The Lancenter SW is not expensive.

NOTE it is worth looking around at come of the 8051 dev kits as the limit on their eval Keil compilers is twice the normal one.

Ouch! Be fair the 8051 is very cost effective for a lot of things. Not everything warrants a PPC :-)

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris H

That's something we can agree on :-). I worked on a project where the client was immovably opposed to hw platform change and insisted on using a legacy platform that resulted in over 6 banks of code and data. The way the bl51 linker overlayed everything seemed almost like magic. We did have the benefit of generous external xdata ram space, which no doubt helped. It's a very good toolchain indeed, if you need that sort of capability...

Regards,

Chris

Reply to
ChrisQ

It is too expensive for hobby users however the eval version is FREE and the point is the restriction on the executable size is not the restriction you may think. There are lots of programs that will build in the restricted version of the Keil compiler that simply won't build at all in the SDCC

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
 Click to see the full signature
Reply to
Chris H

Well, I'm not going to argue for or against tools I haven't used, and don't intend to use - I was merely passing on what I've heard, with some predictions on how this thread would proceed.

The 8051 is a good choice if you have a lot of legacy code, or if you want a weird chip that happens to contain an 8051 core. Otherwise there are much better choices in almost every way - both in terms of the chips themselves and the tools around them. I fully agree that not every project warrants a PPC - you don't buy a chip that is more expensive, requires more power, or is more difficult to use than necessary. But you are talking about an architecture that is stuck in the land that time forgot - if you drop the 8051 requirement, then you can always find better chips.

Reply to
David Brown

Well, having different SFRs doesn't hurt the compiler. As long as the controller can run 8051 code you can use SDCC. The term support for microcontroller families is always a bit vague. The people maintaining GCC for the MSP430 finally agreed not to have a command line option which specifies the controller. Instead you select the proper link file and header files.

Sorry, but the Dunfield 8051 compiler is a real piece of crap. CRAP! CRAP! CRAP! CRAP! Yes, I admit I'm one of the dumb suckers who actually bought the Dunfield 8051 compiler. If you have no money use SDCC. Even the very first versions of SDCC will outperform the code generated by the Dunfield compiler at 1/4 the clock rate.

I'd rephrase that as: if you want to use good quality free tools, the

8051 is a really bad choice.
--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
 Click to see the full signature
Reply to
Nico Coesel
[...]

No consensue because I disagree. HyperTerminal is by far _not_ the worst option.

Oliver

--
Oliver Betz, Muenchen (oliverbetz.de)
Reply to
Oliver Betz

ght

t

hex

you

are

You can move from a DS89C4xx, to a more modern device, and make up any compiler differences in the silicon.

So the SiLabs C8051F581 for example, has 128KF, and 8KRam, and has OnChip debug that works with SDCC.(not a terminal download-and-hope)

Search for TOOLSTICK582DC, and TOOLSTICKBA, for the low cost pair to develop.

-jg

Reply to
malcolm

Then don't bring it up. The trouble with hyperterminal is that in the end of the day it can do everything including releasing the serial port without closing the program (which AFAIK Tera term can't do).

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
 Click to see the full signature
Reply to
Nico Coesel

The bad thing about hyperterminal was that it locked up or even could blue screen the machine on older versions and the user interface is just so clunky. The advantage of terraterm is that it is easy to use, works on the network for telnet as well as serial lines. Also, the source is available, in C and Pascal, so you can modify the code if your not happy with it.

Terraterm just works, whereas hyperterminal seems to obstruct everything you want to do...

Regards,

Chris

Reply to
ChrisQ

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.