summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-02-12 14:37:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-02-12 14:37:55 +0000
commitb769f6a93e42f6052d27f85dd38ea594361ce170 (patch)
tree30a0eaa4bcc50079c8545227554a9d47c336d8fe /nuttx
parent84eb7fe1709023514ee0a1c85af34cda2a37bd07 (diff)
downloadnuttx-b769f6a93e42f6052d27f85dd38ea594361ce170.tar.gz
nuttx-b769f6a93e42f6052d27f85dd38ea594361ce170.tar.bz2
nuttx-b769f6a93e42f6052d27f85dd38ea594361ce170.zip
More z8 compilation changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@671 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/TODO45
-rw-r--r--nuttx/arch/arm/include/arch.h1
-rw-r--r--nuttx/arch/z80/include/z8/irq.h10
-rw-r--r--nuttx/arch/z80/src/Makefile.zdsii4
-rw-r--r--nuttx/arch/z80/src/common/up_assert.c24
-rw-r--r--nuttx/arch/z80/src/common/up_sigdeliver.c4
-rw-r--r--nuttx/arch/z80/src/z8/Make.defs8
-rw-r--r--nuttx/arch/z80/src/z80/Make.defs4
-rw-r--r--nuttx/arch/z80/src/z80/z80_irq.c (renamed from nuttx/arch/z80/src/common/up_irq.c)2
-rw-r--r--nuttx/include/assert.h5
-rw-r--r--nuttx/include/nuttx/arch.h10
-rw-r--r--nuttx/include/nuttx/compiler.h4
12 files changed, 81 insertions, 40 deletions
diff --git a/nuttx/TODO b/nuttx/TODO
index 65cffeb29..4e95a2582 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -20,8 +20,8 @@ NuttX TODO List (Last updated January 6, 2008)
(1) ARM/DM320 (arch/arm/src/dm320/)
(2) ARM/LPC214x (arch/arm/src/lpc214x/)
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
- (3) z80/z8 (arch/z80/)
- (7) z16 (arch/z16/)
+ (4) z80/z8 (arch/z80/)
+ (6) z16 (arch/z16/)
o Task/Scheduler (sched/)
^^^^^^^^^^^^^^^^^^^^^^^
@@ -350,8 +350,8 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/)
Status: Open
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
compilation as described for pjrc-8051. At typical cause is code like
@@ -372,6 +372,12 @@ o z80 (arch/z80)
Status: Open
Priority: Low, thought to be cosmetic. I think this is a consequence of
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)
^^^^^^^^^^^^^^^^
@@ -407,14 +413,15 @@ o z16 (arch/z16)
81400). You can see the status of the bug report (and lots more
technical detail) here:
http://support.zilog.com/support/incident/incident_support.asp?iIncidentId=81400&iSiteId=1&chLanguageCode=ENG
- Status: Open
- Priority: Medium-High
+
+ Summary of ZiLOG analysis: "This is a ZNEO compiler problem. ... [a] workaround
+ is to replace:
+ if ( !timerid || (clockid != 0) )
+ By:
+ if ((clockid != 0) || !timerid)"
- 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
+ Priority: Medium-High
Description: The pascal add-on does not work with the z16f (that is
configuration z16f2800100zcog/pashello). This appears to be
@@ -425,6 +432,24 @@ o z16 (arch/z16)
information. The cause of the failure appears to be that
the referenced switch data is bad.
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
Priority: Medium
diff --git a/nuttx/arch/arm/include/arch.h b/nuttx/arch/arm/include/arch.h
index a64ecb5e9..6f8f0f89e 100644
--- a/nuttx/arch/arm/include/arch.h
+++ b/nuttx/arch/arm/include/arch.h
@@ -77,4 +77,3 @@ extern "C" {
#endif
#endif /* __ARCH_ARCH_H */
-
diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h
index 27ea9f1c9..915fa50fa 100644
--- a/nuttx/arch/z80/include/z8/irq.h
+++ b/nuttx/arch/z80/include/z8/irq.h
@@ -89,11 +89,6 @@
* void irqrestore(irqstate_t flags);
*/
-#ifdef __ZILOG__
-# define irqsave() TDI()
-# define irqrestore(f) RI(f)
-#endif
-
/****************************************************************************
* Public Types
****************************************************************************/
@@ -117,7 +112,7 @@ struct xcptcontext
*/
#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 */
@@ -147,6 +142,9 @@ extern "C" {
#define EXTERN extern
#endif
+EXTERN irqstate_t irqsave(void);
+EXTERN void irqrestore(irqstate_t flags);
+
#undef EXTERN
#ifdef __cplusplus
}
diff --git a/nuttx/arch/z80/src/Makefile.zdsii b/nuttx/arch/z80/src/Makefile.zdsii
index c6dcf653c..afb1b07a1 100644
--- a/nuttx/arch/z80/src/Makefile.zdsii
+++ b/nuttx/arch/z80/src/Makefile.zdsii
@@ -85,12 +85,12 @@ up_mem.h:
@echo "" >>up_mem.h
@echo "#ifndef CONFIG_HEAP1_BASE" >>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 "" >>up_mem.h
@echo "#ifndef CONFIG_HEAP1_END" >>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 "" >>up_mem.h
@echo "#endif /* __UP_MEM_H */" >>up_mem.h
diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c
index c1e2e4a8c..b409df425 100644
--- a/nuttx/arch/z80/src/common/up_assert.c
+++ b/nuttx/arch/z80/src/common/up_assert.c
@@ -109,7 +109,11 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
* Name: up_assert
****************************************************************************/
+#ifdef CONFIG_HAVE_FILENAME
void up_assert(const ubyte *filename, int lineno)
+#else
+void up_assert(void)
+#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
_TCB *rtcb = (_TCB*)g_readytorun.head;
@@ -117,6 +121,7 @@ void up_assert(const ubyte *filename, int lineno)
up_ledon(LED_ASSERTION);
+#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
@@ -124,6 +129,13 @@ void up_assert(const ubyte *filename, int lineno)
lldbg("Assertion failed at file:%s line: %d\n",
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
up_stackdump();
up_registerdump();
@@ -134,7 +146,11 @@ void up_assert(const ubyte *filename, int lineno)
* Name: up_assert_code
****************************************************************************/
+#ifdef CONFIG_HAVE_FILENAME
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
_TCB *rtcb = (_TCB*)g_readytorun.head;
@@ -142,6 +158,7 @@ void up_assert_code(const ubyte *filename, int lineno, int errorcode)
up_ledon(LED_ASSERTION);
+#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
filename, lineno, rtcb->name, errorcode);
@@ -149,6 +166,13 @@ void up_assert_code(const ubyte *filename, int lineno, int errorcode)
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
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
up_stackdump();
up_registerdump();
diff --git a/nuttx/arch/z80/src/common/up_sigdeliver.c b/nuttx/arch/z80/src/common/up_sigdeliver.c
index 5f2aab767..757e5020b 100644
--- a/nuttx/arch/z80/src/common/up_sigdeliver.c
+++ b/nuttx/arch/z80/src/common/up_sigdeliver.c
@@ -81,8 +81,8 @@
void up_sigdeliver(void)
{
#ifndef CONFIG_DISABLE_SIGNALS
- _TCB *rtcb = (_TCB*)g_readytorun.head;
- uint32 regs[XCPTCONTEXT_REGS];
+ FAR _TCB *rtcb = (_TCB*)g_readytorun.head;
+ uint16 regs[XCPTCONTEXT_REGS];
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
diff --git a/nuttx/arch/z80/src/z8/Make.defs b/nuttx/arch/z80/src/z8/Make.defs
index 3c48749d7..f59279dc1 100644
--- a/nuttx/arch/z80/src/z8/Make.defs
+++ b/nuttx/arch/z80/src/z8/Make.defs
@@ -33,17 +33,17 @@
#
############################################################################
-HEAD_ASRC = z8_head.asm
+HEAD_ASRC = #z8_head.asm
CMN_ASRCS =
CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
up_releasestack.c up_interruptcontext.c up_blocktask.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_sigdeliver.c \
up_registerdump.c up_usestack.c
-CHIP_ASRCS = z8_saveusercontext.asm z8_restoreusercontext.asm
-CHIP_CSRCS =
+CHIP_ASRCS = #z8_saveusercontext.asm z8_restoreusercontext.asm
+CHIP_CSRCS = #z8_initialstate.c z8_irq.c
diff --git a/nuttx/arch/z80/src/z80/Make.defs b/nuttx/arch/z80/src/z80/Make.defs
index ae5bdf56b..11b0312f9 100644
--- a/nuttx/arch/z80/src/z80/Make.defs
+++ b/nuttx/arch/z80/src/z80/Make.defs
@@ -39,10 +39,10 @@ CMN_ASRCS =
CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \
up_releasestack.c up_interruptcontext.c up_blocktask.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_sigdeliver.c up_registerdump.c up_usestack.c
CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm
-CHIP_CSRCS = z80_initialstate.c
+CHIP_CSRCS = z80_initialstate.c z80_irq.c
diff --git a/nuttx/arch/z80/src/common/up_irq.c b/nuttx/arch/z80/src/z80/z80_irq.c
index ef7c8c1c6..5d4e92fe0 100644
--- a/nuttx/arch/z80/src/common/up_irq.c
+++ b/nuttx/arch/z80/src/z80/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.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/include/assert.h b/nuttx/include/assert.h
index 5f69b7178..62c8baa25 100644
--- a/nuttx/include/assert.h
+++ b/nuttx/include/assert.h
@@ -41,6 +41,7 @@
************************************************************/
#include <sys/types.h>
+#include <nuttx/compiler.h>
/************************************************************
* Definitions
@@ -53,7 +54,7 @@
#undef ASSERTCODE
#undef DEBUGASSERT
-#if defined(__GNUC__) || defined(SDCC)
+#ifdef CONFIG_HAVE_FILENAME
# define ASSERT(f) \
{ if (!(f)) up_assert((const ubyte *)__FILE__, (int)__LINE__); }
@@ -105,7 +106,7 @@ extern "C" {
#define EXTERN extern
#endif
-#if defined(__GNUC__) || defined(SDCC)
+#ifdef CONFIG_HAVE_FILENAME
EXTERN void up_assert(const ubyte *filename, int linenum);
EXTERN void up_assert_code(const ubyte *filename, int linenum,
int error_code);
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h
index 2c83f1f2a..7f054e088 100644
--- a/nuttx/include/nuttx/arch.h
+++ b/nuttx/include/nuttx/arch.h
@@ -376,16 +376,6 @@ EXTERN void up_allocate_heap(FAR void **heap_start, size_t *heap_size);
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
*
* Description:
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h
index d14f816c0..f0235ed1d 100644
--- a/nuttx/include/nuttx/compiler.h
+++ b/nuttx/include/nuttx/compiler.h
@@ -56,6 +56,7 @@
/* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
+# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Attributes
*
@@ -135,6 +136,7 @@
/* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
+# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Pragmas
*
@@ -240,6 +242,7 @@
/* Intriniscs */
# define CONFIG_HAVE_FUNCTIONNAME 1 /* Has __FUNCTION__ */
+# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
/* Attributes
*
@@ -313,6 +316,7 @@
# undef CONFIG_CPP_HAVE_VARARGS
# undef CONFIG_CPP_HAVE_WARNING
# undef CONFIG_HAVE_FUNCTIONNAME
+# undef CONFIG_HAVE_FILENAME
# undef CONFIG_HAVE_WEAKFUNCTIONS
# define weak_alias(name, aliasname)
# define weak_function