8051 on-chip debugging

I'm under the same impression. A commercial tool always has a limited budget and therefore the quality in amount of bugs and innovations of the solution is limited to what is economically viable with the workforce at hand. Opensource has much less problems with these limits. If a project is succesfull, better programmers will step in. If not, development will halt. Kind'a like evolution.

OpenOCD is a nice example. I needed faster loading for MIPS platforms so I optimized the MIPS support by approx 30%. Someone else came along and he optimized it even further.

--
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
Loading thread data ...

I rather do that as I go along. Sometimes you're lucky. I like the way the headers files are organized for NXP's LPC2000 series. Except for some inconsequent naming conventions between different family members. However, for the LPC1000 (Cortex) series they used structs which I don't like (too much can go wrong) and it killed existing code. I ended up converting most of the LCP2000 headers to LPC1000.

The cmsis library is not bad as it is. Its one of the very few times I actually kept code which came from NXP's website. Keil wrote a lot of generic drivers for the LPC2000 series but its all a bunch of incomplete, overcomplicated and flaky crap.

--
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

@Chris:

I'm not slaggingat Keil. I said: "The Raisonance toolkit has the same level of performance/features, but has excellent support and is less expensive !" Keil is a very respectable Company, I don't want to bash them. What I meant is that there are some limitations in their model.

Bruno

94
n
e
Reply to
Bruno Richard

In message , Bruno Richard writes

That I don't believe. The Keil system supports virtually all the 8051's out there. It's performance as a compiler I have not seen beaten anywhere. It's Simulator is generally accepted as the best in the business.

Yes it costs less.

What limitations?

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

In message , Albert van der Horst writes

From being involved in independent verification of compilers. Yes. We were discussing compilers.

Then your definitions are wrong :-)

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

Your suggesting in the background that a commercial project is better in rigorous control. A dogma.

This is simply not true by definition. Have you ever looked into Debian? That may be the largest project in the world barring military ones. I've never worked in any commercial environment ever, with such tight effective control as Debian. Bureaucratic burdens, yes. Effective quality, no.

Groetjes Albert

--

--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
 Click to see the full signature
Reply to
Albert van der Horst

Perhaps you could provide evidence to explain why, otherwise, it's just another opinion :-)...

Regards,

Chris

Reply to
ChrisQ

I first got turned on to Linux in the mid-1990's. I was looking around at various distros, and finally settled on Slackware, because I liked the name - hey, I'm a Slacker, it's only appropriate, right? ;-P

I've been 100% satisfied ever since.

Cheers! Rich

Reply to
Rich Grise

Dear all,

thanks so far for contributing to this fruitful discussion. I finally bought the MDE 8051 Trainer Board populated with the MAXIM DS89C4xx 8051 derivate. It features the ability to being programmed via HyperTerminal by means of a hex file. Since this is my first encounter with microcontrollers, let me ask you for advice how to generate a hex file for this device. Is there any freeware or open source tool for this purpose of how should I proceed? Thank you.

"Michael Kellett" schrieb im Newsbeitrag news: snipped-for-privacy@bt.com...

Reply to
Schueler

I don't want to start another battle here about terminal emulators. Everyone seems to have their favourite - but there is a solid consensus that HyperTerminal is the worst option. I'd recommend you get Tera Term Pro - it's free, and works well. If you want to know what's wrong with HyperTerminal, or what alternatives there are, /please/ search the comp.arch.embedded archives before posting anything on the subject. And if anyone else wants to recommend a different program, and really feels it is worth the time and effort to go through the subject /again/, please start a new thread.

As for how to generate a hex file, you get that from your compiler. The top-class compiler for the 8051 is Keil, with a matching price. There are a number of mid-level commercial tools at varying prices and functionality (in particular, they vary as to which 8051 devices they support directly). Then there is the open source SDCC. My understanding (without having used any of these tools) is that SDCC generates good, sensible code, but is not nearly as clever as Keil at re-using and merging memory. But then, if you were interested in writing efficient code that runs quickly, you wouldn't be using an 8051 in the first place.

Be prepared for another battle here, by the way. There will be people who reject the idea of using anything other than Keil as heresy and false economy, and others that recommend different tools. After all, if a tool is good enough, then it is good enough - you don't need the best, you only need something that will do the job required.

Reply to
David Brown

[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

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

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.