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 16cf8e39fe
commit c8e8880d60
8 changed files with 39 additions and 18 deletions

View File

@ -77,4 +77,3 @@ extern "C" {
#endif #endif
#endif /* __ARCH_ARCH_H */ #endif /* __ARCH_ARCH_H */

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

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

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();

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

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

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

View File

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