9
0
Fork 0

Initial fixes for Z8Encore debug

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@726 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-03-08 21:19:39 +00:00
parent 96c3c2d9e5
commit 8a6880748b
4 changed files with 164 additions and 155 deletions

View File

@ -61,7 +61,13 @@
****************************************************************************/
/* For the ZiLOG ZDS-II toolchain(s), the heap will be set using linker-
* defined values.
* defined values:
*
* far_heapbot : set to the offset to the first unused value in EDATA
* far_stacktop : set to the highest address in EDATA
*
* The top of the heap is then determined by the amount of stack setaside
* in the NuttX configuration file
*/
#ifdef __ZILOG__
@ -70,8 +76,8 @@
# define CONFIG_HEAP1_BASE ((uint16)&far_heapbot)
# endif
# ifndef CONFIG_HEAP1_END
extern far unsigned long far_heaptop;
# define CONFIG_HEAP1_END ((uint16)&far_heaptop)
extern far unsigned long far_stacktop;
# define CONFIG_HEAP1_END (((uint16)&far_stacktop) - CONFIG_PROC_STACK_SIZE + 1)
# endif
#endif

View File

@ -92,8 +92,7 @@
xref _len_pramseg
xref _low_pram_romdata
#endif
xref _far_stack
xref _near_stack
xref _far_stacktop
xdef _z8_reset
xdef __intrp
@ -128,8 +127,8 @@ _z8_reset:
/* Initialize the stack pointer */
ldx spl, #low(_far_stack+1)
ldx sph, #high(_far_stack+1)
ldx spl, #low(_far_stacktop+1)
ldx sph, #high(_far_stacktop+1)
/* Clear internal register ram area (c_nearbss) */
@ -165,16 +164,20 @@ _z8_reset3:
/* Copy ROM data into internal RAM */
_z8_reset4:
#ifdef CONFIG_Z8_COPYNEARDATA
ld r0, #high(_low_near_romdata)
ld r1, #low(_low_near_romdata)
ld r3, #_len_neardata
ld r4, #_low_neardata
or r3, r3
cp r3, #0
jr z, _z8_reset6
_z8_reset5:
ldci @r4, @rr0
djnz r3, _z8_reset5
_z8_reset6:
#endif
/* Copy ROM data into extended RAM */
ld r0, #high(_low_fardata)
@ -186,19 +189,19 @@ _z8_reset5:
ld r6, r4
or r6, r5
jr z, _z8_reset7
jr z, _z8_reset8
_z8_reset6:
_z8_reset7:
ldc r6, @rr2
ldx @rr0, r6
incw rr0
incw rr2
decw rr4
jr nz, _z8_reset6
jr nz, _z8_reset7
/* Copy ROM copy of code into Program RAM */
_z8_reset7:
_z8_reset8:
#ifdef CONFIG_Z8_COPYPRAM
ld r0, #high(_low_pramseg)
ld r1, #low(_low_pramseg)
@ -209,17 +212,17 @@ _z8_reset7:
ld r6, r4
or r6, r5
jr z, _z8_reset9
jr z, _z8_reset10
_z8_reset8:
_z8_reset9:
ldc r6, @rr2
ldc @rr0, r6
incw rr0
incw rr2
decw rr4
jr nz, _z8_reset8
jr nz, _z8_reset9
_z8_reset9:
_z8_reset10:
#endif
/* Start NuttX */

View File

@ -61,8 +61,7 @@ define _low_nearbss = base of NEAR_BSS
define _len_nearbss = length of NEAR_BSS
define _low_farbss = base of FAR_BSS
define _len_farbss = length of FAR_BSS
define _far_heaptop = highaddr of EDATA
define _far_stack = highaddr of EDATA
define _far_stacktop = highaddr of EDATA
define _near_stack = highaddr of RDATA
define _far_heapbot = top of EDATA
define _near_heaptop = highaddr of RDATA

View File

@ -1,8 +1,9 @@
<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="b:4.10:06121401">
<cpu>Z8F6423</cpu>
<cpu>Z8F6403</cpu>
<!-- file information -->
<files>
<file filter-key="">.\zsldevinit.asm</file>
<file filter-key="flash">..\..\..\nuttx.hex</file>
</files>
@ -12,7 +13,129 @@
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_Z8F6423=1,_Z8ENCORE_F642X=1</option>
<option name="define" type="string" change-action="assemble">_Z8F6403=1,_Z8ENCORE_640_FAMILY=1,_Z8ENCORE_F640X=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">56</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="revaa" type="boolean" change-action="rebuild">true</option>
<option name="sdiopt" type="boolean" change-action="assemble">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="codegen" type="string" change-action="none">UserDefined</option>
<option name="const" type="string" change-action="compile">RAM</option>
<option name="define" type="string" change-action="compile">_Z8F6403,_Z16F_SERIES,_Z8ENCORE_640_FAMILY,_Z8ENCORE_F640X</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">true</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
<option name="model" type="string" change-action="compile">L</option>
<option name="optlink" type="boolean" change-action="compile">false</option>
<option name="promote" type="boolean" change-action="compile">true</option>
<option name="regvar" type="string" change-action="compile">Normal</option>
<option name="regvarcache" type="string" change-action="none">Normal</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>
</options>
</tool>
<tool name="Debugger">
<options>
<option name="target" type="string" change-action="rebuild">Z8ENCORE00ZC0</option>
<option name="debugtool" type="string" change-action="none">Simulator</option>
<option name="zemul_enableevents" type="boolean" change-action="none">false</option>
<option name="zemul_brkonfull" type="boolean" change-action="none">false</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="offset" type="integer" change-action="none">0</option>
<option name="snenable" type="boolean" change-action="none">true</option>
<option name="sn" type="string" change-action="none">000000000000000000000000</option>
<option name="snsize" type="integer" change-action="none">1</option>
<option name="snstep" type="integer" change-action="none">000000000000000000000001</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="usenvds" type="boolean" change-action="none">false</option>
<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="usepageerase" 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">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build">.\ostest.lib</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="directives" type="string" change-action="build"></option>
<option name="edata" type="string" change-action="build">100-EFF</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="flash" type="string" change-action="build">FF80-FFFF</option>
<option name="fplib" type="string" change-action="build">Dummy</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="nvds" type="string" change-action="build">0-f</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="pram" type="string" change-action="build">0-f</option>
<option name="praminuse" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="rdata" type="string" change-action="build">20-FF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">0-FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuptype" type="string" change-action="build">Standard</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="warnoverlap" type="boolean" change-action="none">true</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Middleware">
<options>
<option name="usezsl" type="boolean" change-action="rebuild">true</option>
<option name="zslports" type="string" change-action="rebuild"></option>
<option name="zsluarts" type="string" change-action="rebuild"></option>
<option name="zslpramisrs" 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">_Z8F6403=1,_Z16F_SERIES=1,_Z8ENCORE_640_FAMILY=1,_Z8ENCORE_F640X=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>
@ -28,17 +151,17 @@
<options>
<option name="codegen" type="string" change-action="none">UserDefined</option>
<option name="const" type="string" change-action="compile">RAM</option>
<option name="define" type="string" change-action="compile">_Z8F6423,_Z16F_SERIES,_Z8ENCORE_F642X</option>
<option name="define" type="string" change-action="compile">_Z8F6403,_Z16F_SERIES,_Z8ENCORE_640_FAMILY,_Z8ENCORE_F640X</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">true</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
<option name="model" type="string" change-action="compile">L</option>
<option name="model" type="string" change-action="compile">S</option>
<option name="optlink" type="boolean" change-action="compile">false</option>
<option name="promote" type="boolean" change-action="compile">true</option>
<option name="regvar" type="string" change-action="compile">Normal</option>
<option name="regvarcache" type="string" change-action="none">false</option>
<option name="regvarcache" type="string" change-action="none">Normal</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>
@ -47,8 +170,8 @@
</tool>
<tool name="Debugger">
<options>
<option name="target" type="string" change-action="rebuild">Z8F64200100KIT</option>
<option name="debugtool" type="string" change-action="none">USBSmartCable</option>
<option name="target" type="string" change-action="rebuild"></option>
<option name="debugtool" type="string" change-action="none">Simulator</option>
<option name="zemul_enableevents" type="boolean" change-action="none">false</option>
<option name="zemul_brkonfull" type="boolean" change-action="none">false</option>
<option name="usepageerase" type="boolean" change-action="none">true</option>
@ -59,10 +182,10 @@
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
<option name="eraseinfopage" 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">true</option>
<option name="sn" type="string" change-action="none">000000000000000000000000</option>
<option name="snsize" type="integer" change-action="none">1</option>
<option name="snstep" type="integer" change-action="none">000000000000000000000001</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">1</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>
@ -108,143 +231,21 @@
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="rdata" type="string" change-action="build">20-FF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="rom" type="string" change-action="build">0-FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="startuptype" type="string" change-action="build">Standard</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnoverlap" type="boolean" change-action="none">true</option>
<option name="xref" type="boolean" change-action="none">false</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="zslpramisrs" 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">_Z8F6423=1,_Z16F_SERIES=1,_Z8ENCORE_F642X=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">56</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
<option name="revaa" type="boolean" change-action="rebuild">false</option>
<option name="sdiopt" type="boolean" change-action="assemble">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="codegen" type="string" change-action="none">UserDefined</option>
<option name="const" type="string" change-action="compile">RAM</option>
<option name="define" type="string" change-action="compile">_Z8F6423,_Z16F_SERIES,_Z8ENCORE_F642X</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="model" type="string" change-action="compile">S</option>
<option name="optlink" type="boolean" change-action="compile">false</option>
<option name="promote" type="boolean" change-action="compile">true</option>
<option name="regvar" type="string" change-action="compile">true</option>
<option name="regvarcache" type="string" change-action="none">false</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>
</options>
</tool>
<tool name="Debugger">
<options>
<option name="target" type="string" change-action="rebuild"></option>
<option name="debugtool" type="string" change-action="none">ZPAKII</option>
<option name="zemul_enableevents" type="boolean" change-action="none">false</option>
<option name="zemul_brkonfull" type="boolean" change-action="none">false</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="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">1</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="usenvds" type="boolean" change-action="none">false</option>
<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="usepageerase" 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">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="directives" type="string" change-action="build"></option>
<option name="edata" type="string" change-action="build">100-EFF</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="flash" type="string" change-action="build">FF80-FFFF</option>
<option name="fplib" type="string" change-action="build">Dummy</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="nvds" type="string" change-action="build">0-f</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="pram" type="string" change-action="build">0-f</option>
<option name="praminuse" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="rdata" type="string" change-action="build">20-FF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Middleware">
<options>
<option name="usezsl" type="boolean" change-action="rebuild">false</option>
<option name="usezsl" type="boolean" change-action="rebuild">true</option>
<option name="zslports" type="string" change-action="rebuild"></option>
<option name="zsluarts" type="string" change-action="rebuild"></option>
<option name="zslpramisrs" type="string" change-action="rebuild"></option>