From a9610e16bd11c2fa1323dee9077eb7cab4ee45b8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 25 Feb 2020 14:38:24 -0600 Subject: [PATCH] boards/z80/ez80/z20x: Update CFLAGS and linker scripts. arch/z80/src/ez80/Toolchain.defs: Update some CFLAGS to match CFLAGS from ZDS-II IDE. Apparently, we must say that the CPU is an eZ80F91 event when compiler for eZ80F92. boards/z80/ez80/z20x: Update linker scripts. --- arch/z80/src/ez80/Toolchain.defs | 13 ++++++++----- boards/z80/ez80/ez80f910200kitg/scripts/Make.defs | 6 +++--- boards/z80/ez80/ez80f910200zco/scripts/Make.defs | 6 +++--- boards/z80/ez80/makerlisp/scripts/Make.defs | 6 +++--- boards/z80/ez80/z20x/configs/nsh_flash/nsh.zdsproj | 10 +++++----- .../z80/ez80/z20x/configs/nsh_flash/nsh_flash.ztgt | 2 +- .../z80/ez80/z20x/configs/nsh_flash/nsh_ram.ztgt | 12 ++++++------ boards/z80/ez80/z20x/configs/nsh_ram/README.txt | 2 +- boards/z80/ez80/z20x/configs/nsh_ram/nsh.zdsproj | 14 +++++++------- .../z80/ez80/z20x/configs/nsh_ram/nsh_flash.ztgt | 2 +- boards/z80/ez80/z20x/configs/nsh_ram/nsh_ram.ztgt | 12 ++++++------ boards/z80/ez80/z20x/configs/sdboot/.gitignore | 8 ++++---- boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj | 14 +++++++------- .../z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt | 2 +- .../z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt | 12 ++++++------ boards/z80/ez80/z20x/scripts/Make.defs | 6 +++--- .../z80/ez80/z20x/scripts/z20x_copytoram.linkcmd | 3 ++- boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd | 3 +-- boards/z80/ez80/z20x/scripts/z20x_ram.linkcmd | 1 + 19 files changed, 69 insertions(+), 65 deletions(-) diff --git a/arch/z80/src/ez80/Toolchain.defs b/arch/z80/src/ez80/Toolchain.defs index 3b64474a33..041c71fa8b 100644 --- a/arch/z80/src/ez80/Toolchain.defs +++ b/arch/z80/src/ez80/Toolchain.defs @@ -111,8 +111,10 @@ ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y) ARCHCPUDEF = _EZ80F91 ARCHFAMILY = _EZ80ACCLAIM! else ifeq ($(CONFIG_ARCH_CHIP_EZ80F92),y) - ARCHCPU = eZ80F92 - ARCHCPUDEF = _EZ80F92 + #ARCHCPU = eZ80F92 + #ARCHCPUDEF = _EZ80F92 + ARCHCPU = eZ80F91 + ARCHCPUDEF = _EZ80F91 ARCHFAMILY = _EZ80ACCLAIM! endif @@ -122,14 +124,15 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHASMOPTIMIZATION = -debug -NOsdiopt ARCHOPTIMIZATION = -debug else - ARCHASMOPTIMIZATION = -nodebug -NOsdiopt - ARCHOPTIMIZATION = -nodebug + ARCHASMOPTIMIZATION = -nodebug -sdiopt + ARCHOPTIMIZATION = -NOdebug endif ifeq ($(CONFIG_DEBUG_NOOPT),y) ARCHOPTIMIZATION += -reduceopt #else -# ARCHOPTIMIZATION += -optsize +# ARCHOPTIMIZATION += -promote -NOreduceopt -optsize + ARCHOPTIMIZATION += -promote -NOreduceopt endif # Tool names/paths. diff --git a/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs b/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs index 5673ca86dc..ae25e7f385 100644 --- a/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs +++ b/boards/z80/ez80/ez80f910200kitg/scripts/Make.defs @@ -57,7 +57,7 @@ endif ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ +ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) # Compiler definitions @@ -67,11 +67,11 @@ ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF) +ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__ +CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ CPPINCLUDES = -I$(TOPDIR)$(DELIM)include CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES) diff --git a/boards/z80/ez80/ez80f910200zco/scripts/Make.defs b/boards/z80/ez80/ez80f910200zco/scripts/Make.defs index f2f587bbdd..b16713515e 100644 --- a/boards/z80/ez80/ez80f910200zco/scripts/Make.defs +++ b/boards/z80/ez80/ez80f910200zco/scripts/Make.defs @@ -57,7 +57,7 @@ endif ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ +ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) # Compiler definitions @@ -67,11 +67,11 @@ ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF) +ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__ +CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ CPPINCLUDES = -I$(TOPDIR)$(DELIM)include CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES) diff --git a/boards/z80/ez80/makerlisp/scripts/Make.defs b/boards/z80/ez80/makerlisp/scripts/Make.defs index 4af5ba0b2a..c722657eae 100644 --- a/boards/z80/ez80/makerlisp/scripts/Make.defs +++ b/boards/z80/ez80/makerlisp/scripts/Make.defs @@ -57,7 +57,7 @@ endif ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ +ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) # Compiler definitions @@ -67,11 +67,11 @@ ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF) +ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__ +CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ CPPINCLUDES = -I$(TOPDIR)$(DELIM)include CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES) diff --git a/boards/z80/ez80/z20x/configs/nsh_flash/nsh.zdsproj b/boards/z80/ez80/z20x/configs/nsh_flash/nsh.zdsproj index 4e2585e1dd..190c4f79f2 100644 --- a/boards/z80/ez80/z20x/configs/nsh_flash/nsh.zdsproj +++ b/boards/z80/ez80/z20x/configs/nsh_flash/nsh.zdsproj @@ -107,8 +107,8 @@ - - + + @@ -196,7 +196,7 @@ - + @@ -227,8 +227,8 @@ - - + + diff --git a/boards/z80/ez80/z20x/configs/nsh_flash/nsh_flash.ztgt b/boards/z80/ez80/z20x/configs/nsh_flash/nsh_flash.ztgt index 03c2326107..b691cd5102 100644 --- a/boards/z80/ez80/z20x/configs/nsh_flash/nsh_flash.ztgt +++ b/boards/z80/ez80/z20x/configs/nsh_flash/nsh_flash.ztgt @@ -20,7 +20,7 @@ 200000 false - 40000 + 040000 0BFFFF 1 diff --git a/boards/z80/ez80/z20x/configs/nsh_flash/nsh_ram.ztgt b/boards/z80/ez80/z20x/configs/nsh_flash/nsh_ram.ztgt index 6170e6d7df..8f78f6b941 100644 --- a/boards/z80/ez80/z20x/configs/nsh_flash/nsh_ram.ztgt +++ b/boards/z80/ez80/z20x/configs/nsh_flash/nsh_ram.ztgt @@ -37,15 +37,15 @@ 0 - 8 - 8 - F + 0 + 0 + 0 0 - 28 - 20 - 9F + 0 + 0 + 0 0 diff --git a/boards/z80/ez80/z20x/configs/nsh_ram/README.txt b/boards/z80/ez80/z20x/configs/nsh_ram/README.txt index f6a6791367..db71007fed 100644 --- a/boards/z80/ez80/z20x/configs/nsh_ram/README.txt +++ b/boards/z80/ez80/z20x/configs/nsh_ram/README.txt @@ -7,7 +7,7 @@ nsh.zfpproj is a simple project that will allow you to use the Smart Flash Programming. NOTE: As of this writing this project does not work, probably due to RAM configuration in the project. Use ZDS-II instead as is described in the upper README.txt file -nsh_flash.ztgt is the target file that accompanies the project files. This +nsh_ram.ztgt is the target file that accompanies the project files. This one is identical to boards/scripts/z20x_ram.ztgt. nsh_ram.ztgt is the target file that accompanies the project files. This one is identical to boards/scripts/z20x_flash.ztgt. diff --git a/boards/z80/ez80/z20x/configs/nsh_ram/nsh.zdsproj b/boards/z80/ez80/z20x/configs/nsh_ram/nsh.zdsproj index f737e27bf5..8ca8230447 100644 --- a/boards/z80/ez80/z20x/configs/nsh_ram/nsh.zdsproj +++ b/boards/z80/ez80/z20x/configs/nsh_ram/nsh.zdsproj @@ -1,4 +1,4 @@ - + eZ80F92 @@ -107,8 +107,8 @@ - - + + @@ -196,7 +196,7 @@ - + @@ -227,8 +227,8 @@ - - + + @@ -258,4 +258,4 @@ - + \ No newline at end of file diff --git a/boards/z80/ez80/z20x/configs/nsh_ram/nsh_flash.ztgt b/boards/z80/ez80/z20x/configs/nsh_ram/nsh_flash.ztgt index 03c2326107..b691cd5102 100644 --- a/boards/z80/ez80/z20x/configs/nsh_ram/nsh_flash.ztgt +++ b/boards/z80/ez80/z20x/configs/nsh_ram/nsh_flash.ztgt @@ -20,7 +20,7 @@ 200000 false - 40000 + 040000 0BFFFF 1 diff --git a/boards/z80/ez80/z20x/configs/nsh_ram/nsh_ram.ztgt b/boards/z80/ez80/z20x/configs/nsh_ram/nsh_ram.ztgt index 6170e6d7df..8f78f6b941 100644 --- a/boards/z80/ez80/z20x/configs/nsh_ram/nsh_ram.ztgt +++ b/boards/z80/ez80/z20x/configs/nsh_ram/nsh_ram.ztgt @@ -37,15 +37,15 @@ 0 - 8 - 8 - F + 0 + 0 + 0 0 - 28 - 20 - 9F + 0 + 0 + 0 0 diff --git a/boards/z80/ez80/z20x/configs/sdboot/.gitignore b/boards/z80/ez80/z20x/configs/sdboot/.gitignore index 739fb85e2e..23b96039ad 100644 --- a/boards/z80/ez80/z20x/configs/sdboot/.gitignore +++ b/boards/z80/ez80/z20x/configs/sdboot/.gitignore @@ -1,6 +1,6 @@ -nsh.hex -nsh.map -nsh.lod -nsh.wsp +sdboot.hex +sdboot.map +sdboot.lod +sdboot.wsp *.asm Debug diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj b/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj index 70f4367f19..0400938a3d 100644 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj +++ b/boards/z80/ez80/z20x/configs/sdboot/sdboot.zdsproj @@ -1,4 +1,4 @@ - + eZ80F92 @@ -107,8 +107,8 @@ - - + + @@ -196,7 +196,7 @@ - + @@ -227,8 +227,8 @@ - - + + @@ -258,4 +258,4 @@ - + diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt b/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt index 03c2326107..b691cd5102 100644 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt +++ b/boards/z80/ez80/z20x/configs/sdboot/sdboot_flash.ztgt @@ -20,7 +20,7 @@ 200000 false - 40000 + 040000 0BFFFF 1 diff --git a/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt b/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt index 6170e6d7df..8f78f6b941 100644 --- a/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt +++ b/boards/z80/ez80/z20x/configs/sdboot/sdboot_ram.ztgt @@ -37,15 +37,15 @@ 0 - 8 - 8 - F + 0 + 0 + 0 0 - 28 - 20 - 9F + 0 + 0 + 0 0 diff --git a/boards/z80/ez80/z20x/scripts/Make.defs b/boards/z80/ez80/z20x/scripts/Make.defs index 6ef267d26c..dab450ea2f 100644 --- a/boards/z80/ez80/z20x/scripts/Make.defs +++ b/boards/z80/ez80/z20x/scripts/Make.defs @@ -42,7 +42,7 @@ endif ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet ARCHASMWARNINGS = -warn -ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ +ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILY)=1 -define:__ASSEMBLY__ AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION) # Compiler definitions @@ -52,11 +52,11 @@ ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn -ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF) +ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILY) ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__ +CPPDEFINES = -D$(ARCHFAMILY) -D$(ARCHCPUDEF) -D__ASSEMBLY__ CPPINCLUDES = -I$(TOPDIR)$(DELIM)include CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES) diff --git a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd index 2c50296978..bf4015beb5 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_copytoram.linkcmd @@ -28,9 +28,10 @@ RANGE RAM $040000 : $0BFFFF RANGE EXTIO $000000 : $00FFFF RANGE INTIO $000000 : $0000FF -CHANGE TEXT is CODE CHANGE CODE is RAM +CHANGE TEXT is CODE CHANGE STRSECT is CODE + ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA COPY CODE ROM COPY DATA ROM diff --git a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd index a7b6ad9c4c..4b5ff57624 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_flash.linkcmd @@ -28,8 +28,7 @@ RANGE RAM $040000 : $0BFFFF RANGE EXTIO $000000 : $00FFFF RANGE INTIO $000000 : $0000FF -CHANGE TEXT is CODE -CHANGE STRSECT is CODE +CHANGE STRSECT is ROM ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA COPY DATA ROM diff --git a/boards/z80/ez80/z20x/scripts/z20x_ram.linkcmd b/boards/z80/ez80/z20x/scripts/z20x_ram.linkcmd index ad4c1b36d7..cbc949fa41 100644 --- a/boards/z80/ez80/z20x/scripts/z20x_ram.linkcmd +++ b/boards/z80/ez80/z20x/scripts/z20x_ram.linkcmd @@ -33,6 +33,7 @@ CHANGE .STARTUP is RAM CHANGE TEXT is CODE CHANGE CODE is RAM CHANGE STRSECT is CODE + ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA DEFINE __low_romdata = copy base of DATA