Skip to content

Commit

Permalink
z20x: Performance Improvements
Browse files Browse the repository at this point in the history
  - boards/z80/ez80/z20x/scripts/z20x_*.linkcmd:  Reduce from 4 to 1 wait state.  That i sufficient because of the slow clocking of the eZ80F92
  - boards/z80/ez80/z20x/src/w25_main.c:  Replace CRC algorithm with simple, less time consuming check sum.
  - boards/z80/ez80/z20x/configs/nsh:  Rename the nsh_ram configuration to just nsh
  - boards/z80/ez80/z80x/configs/hello: Add simpler program to make debugging the loader easier.
  • Loading branch information
gregory-nutt authored and Ouss4 committed Mar 13, 2020
1 parent da57a7d commit ef604f8
Show file tree
Hide file tree
Showing 22 changed files with 868 additions and 21 deletions.
28 changes: 23 additions & 5 deletions boards/z80/ez80/z20x/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,25 @@ Common Configuration Notes
Configuration Subdirectories
----------------------------

nsh_ram:
hello:

This is a minimal "Hello, World!" program that runs out of RAM. It is
a small program that is really useful only for testing the bootloader.

NOTES:

1. Debugging from RAM

You can debug from RAM version using ZDS-II as follows:

a. Connect to the debugger,
b. Reset, Go, and Break. This will initialize the external RAM
c. Break and Load the nuttx.lod file
c. Set the PC to 0x050000
d. Single step a few times to make sure things look good, then
e. Go

nsh:

This configuration builds the NuttShell (NSH). That code can be
found in apps/system/nsh and apps/system/nshlib.. For more
Expand Down Expand Up @@ -290,14 +308,14 @@ Configuration Subdirectories
NOTE: The is no card detect signal so the microSD card must be
placed in the card slot before the system is started.

3. Debugging the RAM version
3. Debugging from RAM

You can debug the all RAM version using ZDS-II as follows:
You can debug from RAM version using ZDS-II as follows:

a. Connect to the debugger,
b. Reset, Go, and Break. This will initialize the external RAM
c. Break and Load the nuttx.lod file
c. Set the PC to 0x040000
c. Set the PC to 0x050000
d. Single step a few times to make sure things look good, then
e. Go

Expand Down Expand Up @@ -375,4 +393,4 @@ Configuration Subdirectories
2. Booting large programs from the serial FLASH is unbearably slow;
you will think that the system is simply not booting at all. There
is probably some bug contributing to this probably (maybe the timer
interrupt rate?)
interrupt rate?)
13 changes: 13 additions & 0 deletions boards/z80/ez80/z20x/configs/hello/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
README.txt
^^^^^^^^^^

hello.zdsproj is a simple ZDS-II project that will allow you
to use the ZDS-II debugger.
hello.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
hello_ram.ztgt is the target file that accompanies the project files. This
one is identical to boards/scripts/z20x_ram.ztgt.
hello_flash.ztgt is the target file that accompanies the project files. This
one is identical to boards/scripts/z20x_flash.ztgt.
42 changes: 42 additions & 0 deletions boards/z80/ez80/z20x/configs/hello/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="z80"
CONFIG_ARCH_BOARD="z20x"
CONFIG_ARCH_BOARD_Z20X=y
CONFIG_ARCH_CHIP="ez80"
CONFIG_ARCH_CHIP_EZ80=y
CONFIG_ARCH_CHIP_EZ80F92=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_Z80=y
CONFIG_BOARD_LOOPSPERMSEC=1250
CONFIG_BOOT_RUNFROMEXTSRAM=y
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_PTHREAD=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EZ80_UART1=y
CONFIG_HOST_WINDOWS=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_PREALLOC_TIMERS=4
CONFIG_PREALLOC_WDOGS=8
CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_RAM_SIZE=65536
CONFIG_SDCLONE_DISABLE=y
CONFIG_START_DAY=12
CONFIG_START_MONTH=3
CONFIG_START_YEAR=2020
CONFIG_UART1_BAUD=2400
CONFIG_UART1_BITS=0
CONFIG_UART1_RXBUFSIZE=64
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_UART1_TXBUFSIZE=64
CONFIG_USER_ENTRYPOINT="hello_main"
CONFIG_WDOG_INTRESERVE=1
260 changes: 260 additions & 0 deletions boards/z80/ez80/z20x/configs/hello/hello.zdsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
<project type="Executable" project-type="Standard" configuration="Debug" created-by="d:5.3.0:19052909" modified-by="d:5.3.0:19052909" ZDSII="ZDSII - eZ80Acclaim! 5.3.3 (Build 19083001)">
<cpu>eZ80F91</cpu>

<!-- file information -->
<files>
</files>

<!-- configuration information -->
<configurations>
<configuration name="Debug" >
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_EZ80ACCLAIM!=1,_SIMULATE=1</option>
<option name="include" type="string" change-action="assemble"></option>
<option name="list" type="boolean" change-action="none">true</option>
<option name="listmac" type="boolean" change-action="none">false</option>
<option name="name" type="boolean" change-action="none">true</option>
<option name="pagelen" type="integer" change-action="none">0</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="sdiopt" type="boolean" change-action="compile">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="padbranch" type="string" change-action="compile">Off</option>
<option name="define" type="string" change-action="compile">_DEBUG,_EZ80F91,_EZ80ACCLAIM!,_SIMULATE</option>
<option name="genprintf" type="boolean" change-action="compile">true</option>
<option name="keepasm" type="boolean" change-action="none">false</option>
<option name="keeplst" type="boolean" change-action="none">false</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
<option name="modsect" type="boolean" change-action="compile">false</option>
<option name="optspeed" type="boolean" change-action="compile">false</option>
<option name="promote" type="boolean" change-action="compile">true</option>
<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="stdinc" type="string" change-action="compile"></option>
<option name="usrinc" type="string" change-action="compile"></option>
<option name="watch" type="boolean" change-action="none">false</option>
<option name="multithread" type="boolean" change-action="compile">false</option>
</options>
</tool>
<tool name="Debugger">
<options>
<option name="target" type="string" change-action="rebuild">eZ80DevPlatform_F91_Flash</option>
<option name="debugtool" type="string" change-action="none">Simulator</option>
<option name="usepageerase" type="boolean" change-action="none">true</option>
</options>
</tool>
<tool name="FlashProgrammer">
<options>
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
<option name="enableinfopage" type="boolean" change-action="none">false</option>
<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="offset" type="integer" change-action="none">0</option>
<option name="snenable" type="boolean" change-action="none">false</option>
<option name="sn" type="string" change-action="none">0</option>
<option name="snsize" type="integer" change-action="none">0</option>
<option name="snstep" type="integer" change-action="none">0</option>
<option name="snstepformat" type="integer" change-action="none">0</option>
<option name="snaddress" type="string" change-action="none">0</option>
<option name="snformat" type="integer" change-action="none">0</option>
<option name="snbigendian" type="boolean" change-action="none">true</option>
<option name="singleval" type="string" change-action="none">0</option>
<option name="singlevalformat" type="integer" change-action="none">0</option>
<option name="usepageerase" type="boolean" change-action="none">false</option>
<option name="useinfopage" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="General">
<options>
<option name="warn" type="boolean" change-action="none">true</option>
<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">.\Debug\</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build">.\Debug\hello.lib</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">true</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="linkctlfile" type="string" change-action="build"></option>
<option name="map" type="boolean" change-action="none">true</option>
<option name="maxhexlen" type="integer" change-action="build">64</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\Debug\hello</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="startuptype" type="string" change-action="build">Standard</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">true</option>
<option name="xref" type="boolean" change-action="none">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="sort" type="string" change-action="none">name</option>
<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">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="ram" type="string" change-action="build">B7E000-B7FFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
<option name="intio" type="string" change-action="build">000000-0000FF</option>
</options>
</tool>
<tool name="Middleware">
<options>
<option name="usezsl" type="boolean" change-action="rebuild">false</option>
<option name="zslports" type="string" change-action="rebuild"></option>
<option name="zsluarts" type="string" change-action="rebuild"></option>
<option name="userzk" type="boolean" change-action="rebuild">false</option>
<option name="rzkconfigpi" type="boolean" change-action="rebuild">true</option>
<option name="rzkconfigmini" type="boolean" change-action="rebuild">false</option>
<option name="rzkcomps" type="string" change-action="rebuild"></option>
</options>
</tool>
</tools>
</configuration>
<configuration name="Release" >
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_EZ80ACCLAIM!=1,_SIMULATE=1</option>
<option name="include" type="string" change-action="assemble"></option>
<option name="list" type="boolean" change-action="none">true</option>
<option name="listmac" type="boolean" change-action="none">false</option>
<option name="name" type="boolean" change-action="none">true</option>
<option name="pagelen" type="integer" change-action="none">0</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="sdiopt" type="boolean" change-action="compile">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="padbranch" type="string" change-action="compile">Off</option>
<option name="define" type="string" change-action="compile">NDEBUG,_EZ80F91,_EZ80ACCLAIM!,_SIMULATE</option>
<option name="genprintf" type="boolean" change-action="compile">true</option>
<option name="keepasm" type="boolean" change-action="none">false</option>
<option name="keeplst" type="boolean" change-action="none">false</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
<option name="modsect" type="boolean" change-action="compile">false</option>
<option name="optspeed" type="boolean" change-action="compile">false</option>
<option name="promote" type="boolean" change-action="compile">true</option>
<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="stdinc" type="string" change-action="compile"></option>
<option name="usrinc" type="string" change-action="compile"></option>
<option name="watch" type="boolean" change-action="none">false</option>
<option name="multithread" type="boolean" change-action="compile">false</option>
</options>
</tool>
<tool name="Debugger">
<options>
<option name="target" type="string" change-action="rebuild">eZ80DevPlatform_F91_Flash</option>
<option name="debugtool" type="string" change-action="none">Simulator</option>
<option name="usepageerase" type="boolean" change-action="none">true</option>
</options>
</tool>
<tool name="FlashProgrammer">
<options>
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
<option name="enableinfopage" type="boolean" change-action="none">false</option>
<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="offset" type="integer" change-action="none">0</option>
<option name="snenable" type="boolean" change-action="none">false</option>
<option name="sn" type="string" change-action="none">0</option>
<option name="snsize" type="integer" change-action="none">0</option>
<option name="snstep" type="integer" change-action="none">0</option>
<option name="snstepformat" type="integer" change-action="none">0</option>
<option name="snaddress" type="string" change-action="none">0</option>
<option name="snformat" type="integer" change-action="none">0</option>
<option name="snbigendian" type="boolean" change-action="none">true</option>
<option name="singleval" type="string" change-action="none">0</option>
<option name="singlevalformat" type="integer" change-action="none">0</option>
<option name="usepageerase" type="boolean" change-action="none">false</option>
<option name="useinfopage" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="General">
<options>
<option name="warn" type="boolean" change-action="none">true</option>
<option name="debug" type="boolean" change-action="assemble">false</option>
<option name="debugcache" type="boolean" change-action="none">false</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">.\Release\</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build">.\Release\hello.lib</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">true</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="linkctlfile" type="string" change-action="build"></option>
<option name="map" type="boolean" change-action="none">true</option>
<option name="maxhexlen" type="integer" change-action="build">64</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\Release\hello</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="startuptype" type="string" change-action="build">Standard</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">true</option>
<option name="xref" type="boolean" change-action="none">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="sort" type="string" change-action="none">name</option>
<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">Standard</option>
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
<option name="ram" type="string" change-action="build">B7E000-B7FFFF</option>
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
<option name="intio" type="string" change-action="build">000000-0000FF</option>
</options>
</tool>
<tool name="Middleware">
<options>
<option name="usezsl" type="boolean" change-action="rebuild">false</option>
<option name="zslports" type="string" change-action="rebuild"></option>
<option name="zsluarts" type="string" change-action="rebuild"></option>
<option name="userzk" type="boolean" change-action="rebuild">false</option>
<option name="rzkconfigpi" type="boolean" change-action="rebuild">true</option>
<option name="rzkconfigmini" type="boolean" change-action="rebuild">false</option>
<option name="rzkcomps" type="string" change-action="rebuild"></option>
</options>
</tool>
</tools>
</configuration>
</configurations>

<!-- watch information -->
<watch-elements>
</watch-elements>

<!-- breakpoint information -->
<breakpoints>
</breakpoints>

</project>
Loading

0 comments on commit ef604f8

Please sign in to comment.