How to debug AT89C5131?

Status
Not open for further replies.

chipxsd

Newbie level 6
Joined
Mar 11, 2004
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Slovenia
Activity points
183
at89c5131 keil

What is the best way to debug AT89C5131? Since this microcontroller has no ICD or a JTAG connector, debugging is only possible through USB (or UART - with some special libraries), right?
Atmel did release Flip (FLexible In-sistem Programmer) application, and it supports debugging with USB, but only through command line...

Has anyone managed to build a project with AT89C5131? And how? (which compiler, debugging method...)
Any information, schemes, source codes would be very useful!

Thanks!
 

debugging throgh atmel flip

Anyone? Please, help?
 

at89c5131 so

Yes, i've seen Keil and its support for AT89C5131.

But I would like to know how do you set up your whole system to debug this device.
What other hardware do you need (a specific ICD / ICE)?
How to connect the debugger to device, when there's no ICD nor JTAG connectivity?
Is just USB connection enough?

I know you can load code with FLIP (Atmel's programming application):
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2767

I asked for support on Atmel.com (here's my quote):

And here's their reply:

As i said, i would really appreciate any help with this micro controller.
 

at89c5131 jtag

mon51 from Keil and a debug HW with VNM Ram at 0x8000 would do that.
At least thats working for me.
You need to build the monitor with a start address of 0x0000 and link the app code to 0x8000.

usbman
 

compiler for at89c5131

usbman: Tell me more. What exactly do i have to build?

Let me tell you some of my experiences with other micro controllers. I've done some projects with PIC16F876 and its ICD. At work, i'm coding a TI DSP (5509) with JTAG ICE. I've done some little 8051 projects in high school, but that's a long time ago... I remember we used a programmer in school...

I have never done anything with Keil, but i'd like to give it a shot. So, let me get this straight: MON51 is a serial port debugger, which is included (.A51) in my project?

How do i set it up? I will use an external 32kiB RAM, so that shouldn't give me any difficulties, right? Did you use FLIP to upload the code (and how)?

usbman: If this is something we shouldn't discuss on this forum, please PM or email me. Thanks for help!!
 

mon51 keil problem

hi chipX
i used FLIP to download the code into AT89C5131A.
if u need any help regarding FLIP i can help you out.
- srinivas
 

at89c5131 compiler

vasureddym: Thanks! I appreciate any help i can get.

So FLIP is only used to transfer code on to device. Is it possible to use FLIP in Keil environment - so every time code is compiled, is automatically uploaded to AT89C5131?

vasureddym: Did you have to debug AT89C5131? Which compiler did you use?

usbman: If i understand it right. You used external RAM memory in your project (that explains the 0x8000 address). And you configured Mon51 to be loaded in 0x0000 address? That's all?
 

at89c5131a + applications + projects

chipxsd said:
So FLIP is only used to transfer code on to device. Is it possible to use FLIP in ke*il environment - so every time code is compiled, is automatically uploaded to AT89C5131?

FLIP has command-line utility for programming (batchisp.exe). It can be assign as external programming tool in Keil (look under Tab Utilities in Target Options).

chipxsd said:
If i understand it right. You used external RAM memory in your project (that explains the 0x8000 address). And you configured Mon51 to be loaded in 0x0000 address? That's all?

I think, you can use FlashMon for AT89C5131, because it has internal Flash program memory. Also, you can configure any of these monitors to be loaded to any address, not exactly 0x0000. For example, I used 0xE000 in one of my project. This solution is much better, because you don't have to maintain 2 copies of your program: one for debug and one for release. Look for documentation on FlashMon in folder /C51/Hlp of your Keil installation.

One more option includes ISD51 - it should be added and compiled with your project. Again, read documentation on ISD51 in /Hlp folder.
 

at89c5131 debugging

I am using flip to load the configured mon51 into the internal flash.
You need to build a special HW with an external Ram (32k) mapped to 0x8000
accessible with PSEN and read (VNM).
UV2 + Mon51 loads the code to the ram and you can debug in realtime.
Debugging is done via serial.

FlashMon and ISD51 is another option (but not realtime)
You realy need to read the Keil docs and help files

usbman
 

at89c5131 debug

Oh, now i get it! (damn i'm slow) Thanks everyone for help.
 

at89c5131 iap

usbman said:
UV2 + Mon51 loads the code to the ram and you can debug in realtime.
....
FlashMon and ISD51 is another option (but not realtime)

The note from official FlashMon documentation:
FlashMon51 is an extended version of MON51.

Actually, FlashMon is much more advanced than Mon51, because you don't need external HW, your program under FlashMon runs near in the same environment as in release, it takes less resources, and you can put it anywhere in program memory. The only difference: FlashMon is suited for uC with internal Flash program memory with IAP support, but this is exactly what AT89C5131 has.
 

compiler at89c5131


you should consider also the limits.
1. Every time when you have set a break you are writing to the flash memory.
2. If you are stepping through the code Flashmon will always set a break in Flash
so with will be only a matter of time until your flash breaks down.
3. You know about the bugs in Atmels IAP? Read the config and you will see some of them
4. You need to modify the bootvector with Flip If you are making a mistake you will lose the controller.
6.Flashmon neets one page of the internal XRAM which is not accesseible to the app.

Since I have to use all the internal XRAM for my own app Flashmon is not an option in my case.
I have tried Flashmon ISD51 and Mon51 in my app and and only Mon51 worked.
Try it and you will see....

usbman
 

at89c5131 flip

Actually, my post was about your note that Mon51 can be used to debug in real-time, but FlashMon not. This is not true. As to your additional notes:

usbman said:
1. Every time when you have set a break you are writing to the flash memory.
2. If you are stepping through the code Flashmon will always set a break in Flash
so with will be only a matter of time until your flash breaks down.

Modern Flash technology guarantees 100K write cycles. This is too big number to worry about such issue.

usbman said:
3. You know about the bugs in Atmels IAP? Read the config and you will see some of them

And how this related to FlashMon? FlashMon works OK, so why bother?

usbman said:
4. You need to modify the bootvector with Flip If you are making a mistake you will lose the controller.

You can leave it at 0, if you don't know how to set hardware condition to get to IAP loader.

usbman said:
6.Flashmon neets one page of the internal XRAM which is not accesseible to the app.

Agree. Any cheap solution has limitations.

usbman said:
I have tried Flashmon ISD51 and Mon51 in my app and and only Mon51 worked.
Try it and you will see....

I worked with both. FlashMon has one unbeatable advantage over Mon51 - it can be used in-application without any additional stuff.
 

at89c5131 project

Did you have to debug AT89C5131? Which compiler did you use

Hi ChipX!
Sorry, I was not online these days, so how are you doing with your project?
I'm using SPj compiler for compiling the code and burning the hex file into the at89c5131 chip with help of FLIP.
As you said, FLIP is only used for burning the code, i don't think that FLIP can be used for further debugging.
For Debugging we had writen our own code (dubugging module) along with the actual code. The dubugging module uses serial port which responds to the commands sent from the PC. With this we could see the register (SFRs & iRAM) contents of AT89C5131.
Can you let me know what exartly is your requirement.

regards,
srinivas
 

at89c5131a starter kit how to start

I USED this AT89c5131a mcu to convert the USB-RS232.

I have application code and you can get firmware code (Sample) from atmel site

best of luck
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…