* sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 25 Nov 2001 01:39:52 +0000 (01:39 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 25 Nov 2001 01:39:52 +0000 (01:39 +0000)
* sim/ucsim/s51.src/port.cc: Port 4 and 5 added.

* sim/ucsim/s51.src/regs51.h: DS390 SFRs added.

* sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.

* sim/ucsim/s51.src/uc390cl.h: Work in progress.

* sim/ucsim/sim.src/uccl.h: 6 ports for DS390.

* support/regression/fwk/lib/testfwk.c: Run with tinibios.

* support/regression/ports/mcs51/spec.mk: Fine tuninig.

* support/regression/ports/ds390/support.c: Use tinibios.

* support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1639 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
support/regression/fwk/lib/testfwk.c
support/regression/ports/ds390/spec.mk
support/regression/ports/ds390/support.c
support/regression/ports/mcs51/spec.mk

index a315314b8c3c7212d1f95e9cf56bcca5f8f995bc..024e28e8160673be685b6ff970488e28e840bb17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,26 @@
-2001-11-23  Michael Hope  <michaelh@juju.net.nz>
+2001-11-25  Bernhard Held  <bernhard@bernhardheld.de>
+
+       * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
+
+       * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
+
+       * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
+
+       * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
+
+       * sim/ucsim/s51.src/uc390cl.h: Work in progress.
+
+       * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
+
+       * support/regression/fwk/lib/testfwk.c: Run with tinibios.
+
+       * support/regression/ports/mcs51/spec.mk: Fine tuninig.
+
+       * support/regression/ports/ds390/support.c: Use tinibios.
+
+       * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
+
+2001-11-23  Michael Hope  <michaelh@juju.net.nz>support/regression/tests/bug-460010.c
 
        * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
        (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
index aa52d87459ed3fa8343e081fa6a2f1668bfa9969..87d99a89bdcc87ae332f5215667316354a4df147 100644 (file)
@@ -3,6 +3,10 @@
 #include <testfwk.h>
 #include <stdarg.h>
 
+#ifdef __ds390
+#include <tinibios.h> /* main() must see the ISR declarations */
+#endif
+
 /** Define this if the port's div or mod functions are broken.
     A slow loop based method will be substituded.
 */
index 26d3080045982d28cc639c922c2b28a46bed8053..efdc92d36efb9aa134a81e1360029ecd4ecbe012 100644 (file)
@@ -1,9 +1,9 @@
 # Port specification for the ds390 port running with uCsim
 
 # path to uCsim
-S51 = ../../sim/ucsim/s51.src/s51
+S51 = $(SDCC_DIR)/sim/ucsim/s51.src/s51
 
-SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data
+SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data --debug
 
 OBJEXT = .rel
 EXEEXT = .ihx
@@ -27,7 +27,6 @@ EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
        -grep -n FAIL $@ /dev/null || true
 
 fwk/lib/timeout: fwk/lib/timeout.c
-       gcc -o $@ $<
 
 _clean:
        rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
index d91f18807a6fee4293a9478f9e613416d4a4d5da..a4f29b1895c3e7012b866dad879fea3151773388 100644 (file)
    what you give them.   Help stamp out software-hoarding!
 -------------------------------------------------------------------------*/
 
-#include <ds80c390.h>
-
-#define TIMED_ACCESS(sfr,value) { TA=0xaa; TA=0x55; sfr=value; }
-
-signed char _sdcc_external_startup(void)
-{
-  TI_0 = 1;    // init transmitter
-
-/* copied from tinibios.h */
-
-  IE=0; // disable ALL interrupts
-
-  // use A19..16 and !CE3..0, no CAN
-  TIMED_ACCESS(P4CNT,0x3f);
-
-  // use !PCE3..0, serial 1 at P5.2/3
-  TIMED_ACCESS(P5CNT,0x27);
-
-  // disable watchdog
-  EWT=0;
-
-  // watchdog set to 9.1 seconds
-  // CKCON|=0xc0;
-
-  // default stretch cycles for MOVX
-  //CKCON = (CKCON&0xf8)|(CPU_MOVX_STRETCH&0x07);
-  CKCON=0xf9;
-
-  // use internal 4k RAM as data(stack) memory at 0x400000 and
-  // move CANx memory access to 0x401000 and upwards
-  // use !CE* for program and/or data memory access
-  TIMED_ACCESS(MCON,0xaf);
-
-  // select default cpu speed
-  //CpuSpeed(CPU_SPEED); will hang on s51
-
-  _asm
-    ; save the 24-bit return address
-    pop ar2; msb
-    pop ar1
-    pop ar0; lsb
-
-
-    mov _TA,#0xaa; timed access
-    mov _TA,#0x55
-    mov _ACON,#0x06; 24 bit addresses, 10 bit stack at 0x400000
-
-    mov _ESP,#0x00; reinitialize the stack
-    mov _SP,#0x00
-
-    ; restore the 24-bit return address
-    push ar0; lsb
-    push ar1
-    push ar2; msb
-  _endasm;
-
-  // global interrupt enable, all masks cleared
-  // let the Gods be with us :)
-  // IE = 0x80;
-
-  //Serial0Init(SERIAL_0_BAUD,1);
-  //Serial1Init(SERIAL_1_BAUD,1);
-  //ClockInit();
-  //RtcInit();
-  //WatchDogInit();
-
-  // signal _sdcc_gsinit_startup to initialize data (call _sdcc_init_data)
-  return 0;
-}
+#include <tinibios.h>
 
 void
 _putchar (char c)
 {
-  while (!TI_0)
-    ;
-  TI_0 = 0;
-  SBUF0 = c;
+  Serial0PutChar (c);
 }
 
 void
@@ -106,3 +35,4 @@ _exitEmu (void)
 {
   * (char idata *) 0 = * (char xdata *) 0x7654;
 }
+
index 560f14eb909527d4e6435c275f437625f9f647af..d778f852acf49631567bedf6a0bcd9b2ba5dee2e 100644 (file)
@@ -3,7 +3,7 @@
 # model small
 
 # path to uCsim
-S51 = ../../sim/ucsim/s51.src/s51
+S51 = $(SDCC_DIR)/sim/ucsim/s51.src/s51
 
 SDCCFLAGS +=--lesspedantic -DREENTRANT=reentrant --stack-after-data
 
@@ -29,7 +29,6 @@ EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
        -grep -n FAIL $@ /dev/null || true
 
 fwk/lib/timeout: fwk/lib/timeout.c
-       gcc -o $@ $<
 
 _clean:
        rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \