More z8 compilation changes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@671 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-02-12 14:37:55 +00:00
parent ba6cd0d3e2
commit 8d2f18e709
12 changed files with 81 additions and 40 deletions
+35 -10
View File
@@ -20,8 +20,8 @@ NuttX TODO List (Last updated January 6, 2008)
(1) ARM/DM320 (arch/arm/src/dm320/) (1) ARM/DM320 (arch/arm/src/dm320/)
(2) ARM/LPC214x (arch/arm/src/lpc214x/) (2) ARM/LPC214x (arch/arm/src/lpc214x/)
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/) (4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
(3) z80/z8 (arch/z80/) (4) z80/z8 (arch/z80/)
(7) z16 (arch/z16/) (6) z16 (arch/z16/)
o Task/Scheduler (sched/) o Task/Scheduler (sched/)
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
@@ -350,8 +350,8 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/)
Status: Open Status: Open
Priority: Low -- only because there as so many other issues with 8051 Priority: Low -- only because there as so many other issues with 8051
o z80 (arch/z80) o z80/z8 (arch/z80)
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Description: The SDCC version the same problems with interger overflow during Description: The SDCC version the same problems with interger overflow during
compilation as described for pjrc-8051. At typical cause is code like compilation as described for pjrc-8051. At typical cause is code like
@@ -373,6 +373,12 @@ o z80 (arch/z80)
Priority: Low, thought to be cosmetic. I think this is a consequence of Priority: Low, thought to be cosmetic. I think this is a consequence of
replacing vs. inserting the library. replacing vs. inserting the library.
Description: The ZDS-II compiler (version 4.10.1) fails with an internal error
while compiler mm/mm_initialize. This has been reported as
incident 81509.
Status: Open
Priority: High
o z16 (arch/z16) o z16 (arch/z16)
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
@@ -407,15 +413,16 @@ o z16 (arch/z16)
81400). You can see the status of the bug report (and lots more 81400). You can see the status of the bug report (and lots more
technical detail) here: technical detail) here:
http://support.zilog.com/support/incident/incident_support.asp?iIncidentId=81400&iSiteId=1&chLanguageCode=ENG http://support.zilog.com/support/incident/incident_support.asp?iIncidentId=81400&iSiteId=1&chLanguageCode=ENG
Summary of ZiLOG analysis: "This is a ZNEO compiler problem. ... [a] workaround
is to replace:
if ( !timerid || (clockid != 0) )
By:
if ((clockid != 0) || !timerid)"
Status: Open Status: Open
Priority: Medium-High Priority: Medium-High
Description: The Pascal add-on does not work with the Z16F port. This is
because the Z16F is big-endian (see duplicate problem report under
"Pascal Add-On").
Status: Open
Priority: Medium
Description: The pascal add-on does not work with the z16f (that is Description: The pascal add-on does not work with the z16f (that is
configuration z16f2800100zcog/pashello). This appears to be configuration z16f2800100zcog/pashello). This appears to be
another ZDS-II error: when executing the instruction another ZDS-II error: when executing the instruction
@@ -425,6 +432,24 @@ o z16 (arch/z16)
information. The cause of the failure appears to be that information. The cause of the failure appears to be that
the referenced switch data is bad. the referenced switch data is bad.
This is submited as ZiLOG support incident 81459. This is submited as ZiLOG support incident 81459.
Summary of ZiLOG analysis: "This is a ZNEO run time library problem.
One workaround is to replace the line 58 in uwcase.asm
From:
ADD R9,#4 ; Skip handler
To:
ADD R9,#2 ; Skip handler
And add uwcase.asm to the project.
If the customer does not want to modify uwcase.asm then the other
workaround is to add a dummy case and make it same as default:
case 0x8000:
default:
This will make sure that uwcase is not called but ulcase is called."
Status: Open Status: Open
Priority: Medium Priority: Medium
-1
View File
@@ -77,4 +77,3 @@ extern "C" {
#endif #endif
#endif /* __ARCH_ARCH_H */ #endif /* __ARCH_ARCH_H */
+4 -6
View File
@@ -89,11 +89,6 @@
* void irqrestore(irqstate_t flags); * void irqrestore(irqstate_t flags);
*/ */
#ifdef __ZILOG__
# define irqsave() TDI()
# define irqrestore(f) RI(f)
#endif
/**************************************************************************** /****************************************************************************
* Public Types * Public Types
****************************************************************************/ ****************************************************************************/
@@ -117,7 +112,7 @@ struct xcptcontext
*/ */
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */ CODE void *sigdeliver; /* Actual type is sig_deliver_t */
/* The following retains that state during signal execution */ /* The following retains that state during signal execution */
@@ -147,6 +142,9 @@ extern "C" {
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }
+2 -2
View File
@@ -85,12 +85,12 @@ up_mem.h:
@echo "" >>up_mem.h @echo "" >>up_mem.h
@echo "#ifndef CONFIG_HEAP1_BASE" >>up_mem.h @echo "#ifndef CONFIG_HEAP1_BASE" >>up_mem.h
@echo " extern far unsigned long far_heapbot;" >>up_mem.h @echo " extern far unsigned long far_heapbot;" >>up_mem.h
@echo "# define CONFIG_HEAP1_BASE ((unsigned long)&far_heapbot)" >>up_mem.h @echo "# define CONFIG_HEAP1_BASE ((uint16)&far_heapbot)" >>up_mem.h
@echo "#endif" >>up_mem.h @echo "#endif" >>up_mem.h
@echo "" >>up_mem.h @echo "" >>up_mem.h
@echo "#ifndef CONFIG_HEAP1_END" >>up_mem.h @echo "#ifndef CONFIG_HEAP1_END" >>up_mem.h
@echo " extern far unsigned long far_heaptop;" >>up_mem.h @echo " extern far unsigned long far_heaptop;" >>up_mem.h
@echo "# define CONFIG_HEAP1_END ((unsigned long)&far_heaptop)" >>up_mem.h @echo "# define CONFIG_HEAP1_END ((uint16)&far_heaptop)" >>up_mem.h
@echo "#endif" >>up_mem.h @echo "#endif" >>up_mem.h
@echo "" >>up_mem.h @echo "" >>up_mem.h
@echo "#endif /* __UP_MEM_H */" >>up_mem.h @echo "#endif /* __UP_MEM_H */" >>up_mem.h
+24
View File
@@ -109,7 +109,11 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
* Name: up_assert * Name: up_assert
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_HAVE_FILENAME
void up_assert(const ubyte *filename, int lineno) void up_assert(const ubyte *filename, int lineno)
#else
void up_assert(void)
#endif
{ {
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;
@@ -117,12 +121,20 @@ void up_assert(const ubyte *filename, int lineno)
up_ledon(LED_ASSERTION); up_ledon(LED_ASSERTION);
#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s\n", lldbg("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name); filename, lineno, rtcb->name);
#else #else
lldbg("Assertion failed at file:%s line: %d\n", lldbg("Assertion failed at file:%s line: %d\n",
filename, lineno); filename, lineno);
#endif
#else
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed: task: %s\n", rtcb->name);
#else
lldbg("Assertion failed\n");
#endif
#endif #endif
up_stackdump(); up_stackdump();
@@ -134,7 +146,11 @@ void up_assert(const ubyte *filename, int lineno)
* Name: up_assert_code * Name: up_assert_code
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_HAVE_FILENAME
void up_assert_code(const ubyte *filename, int lineno, int errorcode) void up_assert_code(const ubyte *filename, int lineno, int errorcode)
#else
void up_assert_code(int errorcode)
#endif
{ {
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head; _TCB *rtcb = (_TCB*)g_readytorun.head;
@@ -142,12 +158,20 @@ void up_assert_code(const ubyte *filename, int lineno, int errorcode)
up_ledon(LED_ASSERTION); up_ledon(LED_ASSERTION);
#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0 #if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n", lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode); filename, lineno, rtcb->name, errorcode);
#else #else
lldbg("Assertion failed at file:%s line: %d error code: %d\n", lldbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode); filename, lineno, errorcode);
#endif
#else
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed: task: %s error code: %d\n", rtcb->name, errorcode);
#else
lldbg("Assertion failed: error code: %d\n", errorcode);
#endif
#endif #endif
up_stackdump(); up_stackdump();
+2 -2
View File
@@ -81,8 +81,8 @@
void up_sigdeliver(void) void up_sigdeliver(void)
{ {
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_DISABLE_SIGNALS
_TCB *rtcb = (_TCB*)g_readytorun.head; FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
uint32 regs[XCPTCONTEXT_REGS]; uint16 regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver; sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling /* Save the errno. This must be preserved throughout the signal handling
+4 -4
View File
@@ -33,17 +33,17 @@
# #
############################################################################ ############################################################################
HEAD_ASRC = z8_head.asm HEAD_ASRC = #z8_head.asm
CMN_ASRCS = CMN_ASRCS =
CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \ CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
up_releasestack.c up_interruptcontext.c up_blocktask.c \ up_releasestack.c up_interruptcontext.c up_blocktask.c \
up_unblocktask.c up_exit.c up_releasepending.c \ up_unblocktask.c up_exit.c up_releasepending.c \
up_reprioritizertr.c up_copystate.c up_irq.c up_idle.c \ up_reprioritizertr.c up_copystate.c up_idle.c \
up_assert.c up_mdelay.c up_udelay.c \ up_assert.c up_mdelay.c up_udelay.c \
up_schedulesigaction.c up_sigdeliver.c \ up_schedulesigaction.c up_sigdeliver.c \
up_registerdump.c up_usestack.c up_registerdump.c up_usestack.c
CHIP_ASRCS = z8_saveusercontext.asm z8_restoreusercontext.asm CHIP_ASRCS = #z8_saveusercontext.asm z8_restoreusercontext.asm
CHIP_CSRCS = CHIP_CSRCS = #z8_initialstate.c z8_irq.c
+2 -2
View File
@@ -39,10 +39,10 @@ CMN_ASRCS =
CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \ CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
up_releasestack.c up_interruptcontext.c up_blocktask.c \ up_releasestack.c up_interruptcontext.c up_blocktask.c \
up_unblocktask.c up_exit.c up_releasepending.c \ up_unblocktask.c up_exit.c up_releasepending.c \
up_reprioritizertr.c up_copystate.c up_irq.c up_idle.c \ up_reprioritizertr.c up_copystate.c up_idle.c \
up_assert.c up_mdelay.c up_udelay.c up_schedulesigaction.c \ up_assert.c up_mdelay.c up_udelay.c up_schedulesigaction.c \
up_sigdeliver.c up_registerdump.c up_usestack.c up_sigdeliver.c up_registerdump.c up_usestack.c
CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm
CHIP_CSRCS = z80_initialstate.c CHIP_CSRCS = z80_initialstate.c z80_irq.c
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* common/up_irq.c * arch/z80/src/z80/z80_irq.c
* *
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+3 -2
View File
@@ -41,6 +41,7 @@
************************************************************/ ************************************************************/
#include <sys/types.h> #include <sys/types.h>
#include <nuttx/compiler.h>
/************************************************************ /************************************************************
* Definitions * Definitions
@@ -53,7 +54,7 @@
#undef ASSERTCODE #undef ASSERTCODE
#undef DEBUGASSERT #undef DEBUGASSERT
#if defined(__GNUC__) || defined(SDCC) #ifdef CONFIG_HAVE_FILENAME
# define ASSERT(f) \ # define ASSERT(f) \
{ if (!(f)) up_assert((const ubyte *)__FILE__, (int)__LINE__); } { if (!(f)) up_assert((const ubyte *)__FILE__, (int)__LINE__); }
@@ -105,7 +106,7 @@ extern "C" {
#define EXTERN extern #define EXTERN extern
#endif #endif
#if defined(__GNUC__) || defined(SDCC) #ifdef CONFIG_HAVE_FILENAME
EXTERN void up_assert(const ubyte *filename, int linenum); EXTERN void up_assert(const ubyte *filename, int linenum);
EXTERN void up_assert_code(const ubyte *filename, int linenum, EXTERN void up_assert_code(const ubyte *filename, int linenum,
int error_code); int error_code);
-10
View File
@@ -375,16 +375,6 @@ EXTERN void up_allocate_heap(FAR void **heap_start, size_t *heap_size);
EXTERN boolean up_interrupt_context(void); EXTERN boolean up_interrupt_context(void);
/****************************************************************************
* Name: up_disable_irq
*
* Description:
* Disable the IRQ specified by 'irq'
*
****************************************************************************/
EXTERN void up_disable_irq(int irq);
/**************************************************************************** /****************************************************************************
* Name: up_enable_irq * Name: up_enable_irq
* *
+4
View File
@@ -56,6 +56,7 @@
/* Intriniscs */ /* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */ # define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Attributes /* Attributes
* *
@@ -135,6 +136,7 @@
/* Intriniscs */ /* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */ # define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Pragmas /* Pragmas
* *
@@ -240,6 +242,7 @@
/* Intriniscs */ /* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */ # define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Attributes /* Attributes
* *
@@ -313,6 +316,7 @@
# undef CONFIG_CPP_HAVE_VARARGS # undef CONFIG_CPP_HAVE_VARARGS
# undef CONFIG_CPP_HAVE_WARNING # undef CONFIG_CPP_HAVE_WARNING
# undef CONFIG_HAVE_FUNCTIONNAME # undef CONFIG_HAVE_FUNCTIONNAME
# undef CONFIG_HAVE_FILENAME
# undef CONFIG_HAVE_WEAKFUNCTIONS # undef CONFIG_HAVE_WEAKFUNCTIONS
# define weak_alias(name, aliasname) # define weak_alias(name, aliasname)
# define weak_function # define weak_function