Progress toward natvie z80 SDCC build -- still issues

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5413 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-12-05 15:01:11 +00:00
parent f373e72362
commit 5eb429fb21
8 changed files with 32 additions and 6 deletions

View File

@ -53,6 +53,7 @@ CC = sdcc
CPP = sdcpp
LD = aslink
AS = asx8051
#AR = sdar -r
AR = sdcclib -a
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -58,15 +58,16 @@ endif
CROSSDEV =
CC = sdcc
CPP = sdcpp
AR = sdcclib -a
ifeq ($(CONFIG_SDCC_OLD),y)
LD = link-z80
AS = as-z80
AR = sdcclib -a
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
else
LD = sdldz80
AS = sdasz80
AR = sdar -r
ARCHCPUFLAGS = -mz80
endif

View File

@ -76,6 +76,7 @@
void z80_lowputc(char ch) __naked
{
#ifdef CONFIG_SDCC_OLD
_asm
ld hl, #2
add hl, sp
@ -83,6 +84,15 @@ void z80_lowputc(char ch) __naked
out (0xbe), a
ret
_endasm;
#else
__asm__ (
"\tld hl, #2\n"
"\tadd hl, sp\n"
"\tld a, (hl)\n"
"\tout (0xbe), a\n"
"\tret\n"
);
#endif
}
/********************************************************************************
@ -94,10 +104,19 @@ void z80_lowputc(char ch) __naked
char z80_lowgetc(void) __naked
{
#ifdef CONFIG_SDCC_OLD
_asm
in a, (0xbe)
ld l, a
ld h, #0
ret
_endasm;
#else
__asm__ (
"\tin a, (0xbe)\n"
"\tld l, a\n"
"\tld h, #0\n"
"\tret\n"
);
#endif
}