??? 10/05/09 15:49 Read: times |
#169442 - uVision & 89v51RD2 - stack problem? |
Hello,
I am trying to switch from Atmel to NXP's 89v51RD2 (64kb flash, 768b xram).... Obviously I have a problem with device settings. It doesn't work right in "compact" and "large" memory model. If code is straightforward, works ok, but when calling a function, uC seems to can't return back. I guess this is a stack problem? Since this chip was not in Keil's device database, I copied reg file from their site. In the device database, I copied 89C51RD2 and created 89V51RD2. My settings are: BOOK0=DATASHTSPHILIPSP51_PG.PDF("80C51 Family Programmer's Guide") BOOK1=DATASHTSPHILIPSP89C51RX2XX_DS.PDF("Data Sheet") CPU=IRAM(0-0xFF) IROM(0-0xFFFF) XRAM(0-0x2FF) CLOCK(12000000) MODP2 MON=S8051.DLL TP51.DLL("-p51R2") REGFILE=p89v51rx2.H("Philips") SFILE="LIBSTARTUPRD2.A51" SIM=S8051.DLL DP51.DLL("-p51R2") FLASH="FM.EXE" (DEVICE(89C51RD2xx, $X) HEXFILE(#H,NOCHECKSUMS, NOFILL) COM(1,57600)) DEV_ID=3216 VEN_ID=11 FAM_ID=5 Under "target options" I have selected memory model "large", code rom size "large", operating system "none". "use onchip rom", "use onchip ram" and "use dual DPTR" are all checked. I also copied a file startup.a51 and modified like written below. Also modified file name in device database (see up). startuprd2.a51 settings: IDATALEN 0X0080 XDATASTART 0X0100 XDATALEN 0X02FF PDATASTART 0X0000 PDATALEN 0X00FF IBPSTACK : enable IBPSTACKTOP 0XFF XBPSTACK : enable XBPSTACKTOP 0X01FF PBPSTACK : enable PBPSTACKTOP 0X00FF Don't have anymore ideas...... please help :( regards, Damjan |
Topic | Author | Date |
uVision & 89v51RD2 - stack problem? | 01/01/70 00:00 | |
when calling a function, uC seems to can't return back | 01/01/70 00:00 | |
my debugging technique | 01/01/70 00:00 | |
incomplete | 01/01/70 00:00 | |
it works now | 01/01/70 00:00 | |
That's a huge leap! | 01/01/70 00:00 | |
It doesn't work right in "compact" and "large" memory model | 01/01/70 00:00 | |
it wasn't me - dwarfs did it :) | 01/01/70 00:00 | |
Source code repository | 01/01/70 00:00 | |
One step at a time | 01/01/70 00:00 | |
cool advice | 01/01/70 00:00 | |
no, you didn't![]() | 01/01/70 00:00 |