IHX and Starting c code parallel to tinios in Non-TINIOS Areas

Peter Wein <[email protected]> Wed, 02 Jun 2004 14:52:51 +0200
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi all,

I am programming with SDCC and I have got some problems in loading code into the TINI and execute it there?
Are there genrally tools for controling or To-Do-List available? 


My example as below:
I compile it to IHX format, and I 
want to test a blinking light on my tini! I know it is a stupid example, 
but I just want to run it, while the TINIOS is working in the 
meanwhile...see below my changed example :-)

1.) How do I get executable code on my TINI out of the IHX-Format, so 
that I can start it under Slush?
2.) if this is not working:
   - How can I set the boot loader to put it out of the scope of TINIOS 
(Bank 49 of the flash for example) and how do I have to compile it 
therefore?
      Is JavaKit working like this: setting with
         B49 to Bank 49
      then File->Load File->My Program? And then it is there at Bank 49 
and I can execute it with X 490000 or G? Where does my executable begin??
   - Is option --code-loc not also shifting my interrupt vectors to 
Bank 49? This is probably not a good idea, if TINIOS is still working in 
parallel
3.) So finally, has anybody faced the same problems some time with the 
TINI and can give me a hint? Or knows some way to find out?

For any help I would be really thankful, because otherwise I can program 
my whole stuff (and it is quite a lot ) in assembler...

Thank you in advance!

kind regards
Peter

My details still are: TINI m400 with the DS80C400 (the customer version 
from DS, rev B) with TINI OS 1.12

I have compiled it like this:
C:\JavaTiniProjects\test\interrupt>sdcc -mds400 --model-flat24 
--stack-10bit -Wl-r --xram-loc 0x500000 --code-loc 0x490000 meinblinki.c

Das File ist auch sehr kurz:

#include <ds80c390.h>
#include <ds400rom.h>
#include <stdio.h>
#include <tinibios.h>

idata at 0x10 unsigned char TMOD_OLD;
idata at 0x11 unsigned char TH1_OLD;
sbit at 0x20 EA_OLD;
static int count;
long rate;

int enableIR() critical
{
  EA_OLD = EA;
  EA = 1;
  TMOD_OLD = TMOD;
  TMOD = 0x20;
  TH1_OLD = TH1;
  TH1 = 0xff;
  count = 0;
  rate = 200000;
  return 1;
}

void timer1() critical interrupt 3
{
  EA = 0;
  count++;
  if(count==rate){	
      P5 ^= 0x04;
      count = 0;
  }
  EA = 1;
}

int disableIR()
{
  EA = EA_OLD;
  TMOD = TMOD_OLD;
  TH1= TH1_OLD;
  return 1;
}

void main(void)
{
  int d=0;
  enableIR;
  printf("Starting Blinking!\n");
  printf("Stop by hitting \'enter\'!\n");
  while((d = getchar()) != '\n'){   
      putchar((char)d);
  }
  disableIR;
}




-- 
Power Electronics Group
Dept. Electrical and Electronic Engineering
University of Stellenbosch

Mobile. +27 84 816 3795
Tel.    +27 21 808 3220
Fax.    +27 21 808 3220
mailto:peterw-/[email protected]






-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user




_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini