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.
This commit is contained in:
Gregory Nutt 2020-02-25 14:38:24 -06:00 committed by Abdelatif Guettouche
parent 930e2788cc
commit a9610e16bd
19 changed files with 69 additions and 65 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -107,8 +107,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0FFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
@ -196,7 +196,7 @@
<option name="debug" type="boolean" change-action="assemble">true</option>
<option name="debugcache" type="boolean" change-action="none">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx\</option>
</options>
</tool>
<tool name="Librarian">
@ -227,8 +227,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0BFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>

View File

@ -20,7 +20,7 @@
<device />
<externalAddress>200000</externalAddress>
<externalAutoSelect>false</externalAutoSelect>
<externalRamLower>40000</externalRamLower>
<externalRamLower>040000</externalRamLower>
<externalRamUpper>0BFFFF</externalRamUpper>
<manufacturer />
<units>1</units>

View File

@ -37,15 +37,15 @@
</CS0>
<CS1>
<busMode>0</busMode>
<controlRegister>8</controlRegister>
<lower>8</lower>
<upper>F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS1>
<CS2>
<busMode>0</busMode>
<controlRegister>28</controlRegister>
<lower>20</lower>
<upper>9F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS2>
<CS3>
<busMode>0</busMode>

View File

@ -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.

View File

@ -1,4 +1,4 @@
<project type="Executable" project-type="Standard" configuration="Release" created-by="d:5.3.0:17021001" modified-by="d:5.3.0:17021001" ZDSII="ZDSII - eZ80Acclaim! 5.3.0 (Build 17041303)">
<project type="Executable" project-type="Standard" configuration="Release" created-by="d:5.3.0:17021001" modified-by="d:5.3.0:19052909" ZDSII="ZDSII - eZ80Acclaim! 5.3.3 (Build 19083001)">
<cpu>eZ80F92</cpu>
<!-- file information -->
@ -107,8 +107,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">AllRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0FFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
@ -196,7 +196,7 @@
<option name="debug" type="boolean" change-action="assemble">true</option>
<option name="debugcache" type="boolean" change-action="none">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx\</option>
</options>
</tool>
<tool name="Librarian">
@ -227,8 +227,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">AllRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0BFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>

View File

@ -20,7 +20,7 @@
<device />
<externalAddress>200000</externalAddress>
<externalAutoSelect>false</externalAutoSelect>
<externalRamLower>40000</externalRamLower>
<externalRamLower>040000</externalRamLower>
<externalRamUpper>0BFFFF</externalRamUpper>
<manufacturer />
<units>1</units>

View File

@ -37,15 +37,15 @@
</CS0>
<CS1>
<busMode>0</busMode>
<controlRegister>8</controlRegister>
<lower>8</lower>
<upper>F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS1>
<CS2>
<busMode>0</busMode>
<controlRegister>28</controlRegister>
<lower>20</lower>
<upper>9F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS2>
<CS3>
<busMode>0</busMode>

View File

@ -1,6 +1,6 @@
nsh.hex
nsh.map
nsh.lod
nsh.wsp
sdboot.hex
sdboot.map
sdboot.lod
sdboot.wsp
*.asm
Debug

View File

@ -1,4 +1,4 @@
<project type="Executable" project-type="Standard" configuration="Release" created-by="d:5.3.0:17021001" modified-by="d:5.3.0:17021001" ZDSII="ZDSII - eZ80Acclaim! 5.3.0 (Build 17041303)">
<project type="Executable" project-type="Standard" configuration="Release" created-by="d:5.3.0:17021001" modified-by="d:5.3.0:19052909" ZDSII="ZDSII - eZ80Acclaim! 5.3.3 (Build 19083001)">
<cpu>eZ80F92</cpu>
<!-- file information -->
@ -107,8 +107,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0FFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
@ -196,7 +196,7 @@
<option name="debug" type="boolean" change-action="assemble">true</option>
<option name="debugcache" type="boolean" change-action="none">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx</option>
<option name="outputdir" type="string" change-action="compile">..\..\..\nuttx\</option>
</options>
</tool>
<tool name="Librarian">
@ -227,8 +227,8 @@
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="fplib" type="string" change-action="build">Real</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="linkconfig" type="string" change-action="build">CopyToRam</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="linkconfig" type="string" change-action="build">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0000FF</option>
<option name="ram" type="string" change-action="build">040000-0BFFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>

View File

@ -20,7 +20,7 @@
<device />
<externalAddress>200000</externalAddress>
<externalAutoSelect>false</externalAutoSelect>
<externalRamLower>40000</externalRamLower>
<externalRamLower>040000</externalRamLower>
<externalRamUpper>0BFFFF</externalRamUpper>
<manufacturer />
<units>1</units>

View File

@ -37,15 +37,15 @@
</CS0>
<CS1>
<busMode>0</busMode>
<controlRegister>8</controlRegister>
<lower>8</lower>
<upper>F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS1>
<CS2>
<busMode>0</busMode>
<controlRegister>28</controlRegister>
<lower>20</lower>
<upper>9F</upper>
<controlRegister>0</controlRegister>
<lower>0</lower>
<upper>0</upper>
</CS2>
<CS3>
<busMode>0</busMode>

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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