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:
parent
16cf8e39fe
commit
c8e8880d60
@ -77,4 +77,3 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARCH_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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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,12 +121,20 @@ 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);
|
||||
#else
|
||||
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();
|
||||
@ -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,12 +158,20 @@ 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);
|
||||
#else
|
||||
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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user