arch/z16: Build update
Verfy build. Update to latest 2.2.2 toolchain.
This commit is contained in:
parent
55ff12ad66
commit
317a8a8942
@ -1,35 +1,20 @@
|
||||
############################################################################
|
||||
# arch/z16/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2011-2012, 2014 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
@ -44,16 +29,16 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
else
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
WARCHSRCDIR := ${shell cygpath -w $(ARCHSRCDIR)}
|
||||
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR)$(DELIM)chip;$(WARCHSRCDIR)$(DELIM)common'
|
||||
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR)\chip;$(WARCHSRCDIR)\common'
|
||||
else
|
||||
WARCHSRCDIR = $(ARCHSRCDIR)
|
||||
USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR)$(DELIM)chip -I$(ARCHSRCDIR)$(DELIM)common
|
||||
USRINCLUDES = -I$(TOPDIR)$(DELIM)sched -I$(ARCHSRCDIR)$(DELIM)chip -I$(ARCHSRCDIR)$(DELIM)common
|
||||
endif
|
||||
endif
|
||||
|
||||
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
CPPFLAGS += -I$(ARCHSRCDIR) $(EXTRAFLAGS)
|
||||
CPPFLAGS += -I$(TOPDIR)$(DELIM)sched -I$(ARCHSRCDIR)$(DELIM)chip -I$(ARCHSRCDIR)$(DELIM)common
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
LDFLAGS += @"$(ARCHSRCDIR)/nuttx.linkcmd"
|
||||
|
@ -43,7 +43,7 @@ endmenu # Z16F ESPI Configuration
|
||||
|
||||
choice
|
||||
prompt "ZDS-II Toolchain version"
|
||||
default Z16F_ZDSII_V521
|
||||
default Z16F_ZDSII_V522
|
||||
|
||||
config Z16F_ZDSII_V501
|
||||
bool "ZDS-II 5.0.1"
|
||||
@ -51,6 +51,9 @@ config Z16F_ZDSII_V501
|
||||
config Z16F_ZDSII_V521
|
||||
bool "ZDS-II 5.2.1"
|
||||
|
||||
config Z16F_ZDSII_V522
|
||||
bool "ZDS-II 5.2.2"
|
||||
|
||||
endchoice # ZDS-II Toolchain version
|
||||
|
||||
endif # ARCH_CHIP_Z16F
|
||||
|
@ -49,6 +49,9 @@ ZDSVERSION := 5.0.1
|
||||
else ifeq ($(CONFIG_Z16F_ZDSII_V521),y)
|
||||
INSTALLROOT = C:/ZiLOG
|
||||
ZDSVERSION := 5.2.1
|
||||
else ifeq ($(CONFIG_Z16F_ZDSII_V522),y)
|
||||
INSTALLROOT = C:/ZiLOG
|
||||
ZDSVERSION := 5.2.2
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
|
@ -36,7 +36,7 @@
|
||||
# include <nuttx/spi/spi.h>
|
||||
#endif
|
||||
|
||||
#include "common/z16_internal.h"
|
||||
#include "z16_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "common/z16_internal.h"
|
||||
#include "z16_internal.h"
|
||||
|
||||
/**************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include "chip.h"
|
||||
#include "common/z16_internal.h"
|
||||
#include "z16_internal.h"
|
||||
|
||||
#ifdef USE_LOWUARTINIT
|
||||
|
||||
|
@ -139,36 +139,7 @@ static struct z16f_uart_s g_uart0priv =
|
||||
CONFIG_UART0_2STOP /* stopbits2 */
|
||||
};
|
||||
|
||||
static uart_dev_t g_uart0port =
|
||||
{
|
||||
0, /* open_count */
|
||||
false, /* xmitwaiting */
|
||||
false, /* recvwaiting */
|
||||
#ifdef CONFIG_UART0_SERIAL_CONSOLE
|
||||
true, /* isconsole */
|
||||
#else
|
||||
false, /* isconsole */
|
||||
#endif
|
||||
{ 0 }, /* closesem */
|
||||
{ 0 }, /* xmitsem */
|
||||
{ 0 }, /* recvsem */
|
||||
{
|
||||
{ 0 }, /* xmit.sem */
|
||||
0, /* xmit.head */
|
||||
0, /* xmit.tail */
|
||||
CONFIG_UART0_TXBUFSIZE, /* xmit.size */
|
||||
g_uart0txbuffer, /* xmit.buffer */
|
||||
},
|
||||
{
|
||||
{ 0 }, /* recv.sem */
|
||||
0, /* recv.head */
|
||||
0, /* recv.tail */
|
||||
CONFIG_UART0_RXBUFSIZE, /* recv.size */
|
||||
g_uart0rxbuffer, /* recv.buffer */
|
||||
},
|
||||
&g_uart_ops, /* ops */
|
||||
&g_uart0priv, /* priv */
|
||||
};
|
||||
static uart_dev_t g_uart0port;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_Z16F_UART1
|
||||
@ -186,36 +157,7 @@ static struct z16f_uart_s g_uart1priv =
|
||||
CONFIG_UART1_2STOP /* stopbits2 */
|
||||
};
|
||||
|
||||
static uart_dev_t g_uart1port =
|
||||
{
|
||||
0, /* open_count */
|
||||
false, /* xmitwaiting */
|
||||
false, /* recvwaiting */
|
||||
#ifdef CONFIG_UART1_SERIAL_CONSOLE
|
||||
true, /* isconsole */
|
||||
#else
|
||||
false, /* isconsole */
|
||||
#endif
|
||||
{ 0 }, /* closesem */
|
||||
{ 0 }, /* xmitsem */
|
||||
{ 0 }, /* recvsem */
|
||||
{
|
||||
{ 0 }, /* xmit.sem */
|
||||
0, /* xmit.head */
|
||||
0, /* xmit.tail */
|
||||
CONFIG_UART1_TXBUFSIZE, /* xmit.size */
|
||||
g_uart1txbuffer, /* xmit.buffer */
|
||||
},
|
||||
{
|
||||
{ 0 }, /* recv.sem */
|
||||
0, /* recv.head */
|
||||
0, /* recv.tail */
|
||||
CONFIG_UART1_RXBUFSIZE, /* recv.size */
|
||||
g_uart1rxbuffer, /* recv.buffer */
|
||||
},
|
||||
&g_uart_ops, /* ops */
|
||||
&g_uart1priv, /* priv */
|
||||
};
|
||||
static uart_dev_t g_uart1port;
|
||||
#endif
|
||||
|
||||
/* Now, which one with be tty0/console and which tty1? */
|
||||
@ -709,6 +651,19 @@ void z16_earlyserialinit(void)
|
||||
regval = getreg8(Z16F_GPIOA_AFH);
|
||||
regval &= ~0x30;
|
||||
putreg8(regval, Z16F_GPIOA_AFH);
|
||||
|
||||
/* Initialize the UART structure */
|
||||
|
||||
memset(&g_uart0port, 0, sizeof(uart_dev_t));
|
||||
#ifdef CONFIG_UART0_SERIAL_CONSOLE
|
||||
g_uart0port.isconsole = true;
|
||||
#endif
|
||||
g_uart0port.xmit.size = CONFIG_UART0_TXBUFSIZE;
|
||||
g_uart0port.xmit.buffer = g_uart0txbuffer;
|
||||
g_uart0port.recv.size = CONFIG_UART0_RXBUFSIZE;
|
||||
g_uart0port.recv.buffer = g_uart0rxbuffer;
|
||||
g_uart0port.ops = &g_uart_ops;
|
||||
g_uart0port.priv = &g_uart0priv;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_Z16F_UART1
|
||||
@ -721,6 +676,19 @@ void z16_earlyserialinit(void)
|
||||
regval = getreg8(Z16F_GPIOD_AFH);
|
||||
regval &= ~0x30;
|
||||
putreg8(regval, Z16F_GPIOD_AFH);
|
||||
|
||||
/* Initialize the UART structure */
|
||||
|
||||
memset(&g_uart1port, 0, sizeof(uart_dev_t));
|
||||
#ifdef CONFIG_UART1_SERIAL_CONSOLE
|
||||
g_uart1port.isconsole = true;
|
||||
#endif
|
||||
g_uart1port.xmit.size = CONFIG_UART1_TXBUFSIZE;
|
||||
g_uart1port.xmit.buffer = g_uart1txbuffer;
|
||||
g_uart1port.recv.size = CONFIG_UART1_RXBUFSIZE;
|
||||
g_uart1port.recv.buffer = g_uart1rxbuffer;
|
||||
g_uart1port.ops = &g_uart_ops;
|
||||
g_uart1port.priv = &g_uart1priv;
|
||||
#endif
|
||||
|
||||
/* Disable UART interrupts */
|
||||
@ -827,14 +795,6 @@ int up_putc(int ch)
|
||||
putreg8((uint8_t)(ch), Z16F_UART0_TXD)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
@ -76,42 +76,42 @@ void z16f_sysexec(FAR chipreg_t *regs)
|
||||
excp = getreg16(Z16F_SYSEXCP);
|
||||
if ((excp & Z16F_SYSEXCP_SPOVF) != 0)
|
||||
{
|
||||
err("ERROR: SP OVERFLOW\n");
|
||||
_err("ERROR: SP OVERFLOW\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_PCOVF) != 0)
|
||||
{
|
||||
err("ERROR: PC OVERFLOW\n");
|
||||
_err("ERROR: PC OVERFLOW\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_DIV0) != 0)
|
||||
{
|
||||
err("ERROR: Divide by zero\n");
|
||||
_err("ERROR: Divide by zero\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_DIVOVF) != 0)
|
||||
{
|
||||
err("ERROR: Divide overflow\n");
|
||||
_err("ERROR: Divide overflow\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_ILL) != 0)
|
||||
{
|
||||
err("ERROR: Illegal instruction\n");
|
||||
_err("ERROR: Illegal instruction\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_WDTOSC) != 0)
|
||||
{
|
||||
err("ERROR: WDT oscillator failure\n");
|
||||
_err("ERROR: WDT oscillator failure\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_PRIOSC) != 0)
|
||||
{
|
||||
err("ERROR: Primary Oscillator Failure\n");
|
||||
_err("ERROR: Primary Oscillator Failure\n");
|
||||
}
|
||||
|
||||
if ((excp & Z16F_SYSEXCP_WDT) != 0)
|
||||
{
|
||||
err("ERROR: Watchdog timeout\n");
|
||||
_err("ERROR: Watchdog timeout\n");
|
||||
z16f_reset();
|
||||
}
|
||||
|
||||
|
@ -79,9 +79,9 @@ ifneq ($(ZDSVERSION),)
|
||||
ifeq ($(WINTOOL),y)
|
||||
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
|
||||
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
|
||||
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR)$(DELIM)chip;$(WARCHSRCDIR)$(DELIM)common'
|
||||
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR)\chip;$(WARCHSRCDIR)\common'
|
||||
else
|
||||
USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR)$(DELIMI)chip;$(ARCHSRCDIR)$(DELIM)common"
|
||||
USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR)$(DELIM)chip;$(ARCHSRCDIR)$(DELIM)common"
|
||||
endif
|
||||
else
|
||||
ifeq ($(WINTOOL),y)
|
||||
|
@ -98,6 +98,9 @@ Version 5.2.1
|
||||
There are a few outstanding build issues, but it seems close enough for
|
||||
the time being.
|
||||
|
||||
Version 5.2.2
|
||||
Verified April 29, 2020. No serious compilation issues were encountered.
|
||||
|
||||
Other Versions
|
||||
|
||||
If you use any version of ZDS-II or if you install ZDS-II at any location
|
||||
|
@ -1,35 +1,20 @@
|
||||
############################################################################
|
||||
# boards/z16/z16f/z16f2800100zcog/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2014, 2017, 2020 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
@ -81,7 +66,8 @@ ARFLAGS = -quiet -warn
|
||||
|
||||
# Linker definitions
|
||||
|
||||
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)z16f2800100zcog$(DELIM)scripts$(DELIM)z16f2800100zcog.linkcmd
|
||||
LDSCRIPT = z16f2800100zcog.linkcmd
|
||||
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
|
@ -1,35 +1,20 @@
|
||||
############################################################################
|
||||
# boards/z16/z16f/z16f2800100zcog/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
@ -38,4 +23,8 @@
|
||||
ASRCS =
|
||||
CSRCS = z16f_boot.c z16f_leds.c
|
||||
|
||||
ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||
CSRCS += z16f_appinit.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
|
71
boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c
Normal file
71
boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c
Normal file
@ -0,0 +1,71 @@
|
||||
/****************************************************************************
|
||||
* boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef OK
|
||||
# define OK 0
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value cold be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
return OK;
|
||||
}
|
@ -1,37 +1,20 @@
|
||||
/****************************************************************************
|
||||
* boards/z16/z16f/z16f2800100zcog/src/z16f_boot.c
|
||||
*
|
||||
* Copyright (C) 2008, 2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* Based upon sample code included with the Zilog ZDS-II toolchain.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -43,10 +26,6 @@
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -59,6 +38,8 @@
|
||||
* are set in the associated device drivers (such as UART, SPI, I2C,
|
||||
* etc.) and must be preserved.
|
||||
*
|
||||
* Based upon sample code included with the Zilog ZDS-II toolchain.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void z16f_gpioinit(void)
|
||||
@ -88,7 +69,37 @@ static void z16f_gpioinit(void)
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: z16f_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All Z16 architectures must provide the following entry point. This
|
||||
* entry point is called early in the initialization -- after all memory
|
||||
* has been configured but before any devices have been initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void z16f_board_initialize(void)
|
||||
{
|
||||
z16f_gpioinit();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_late_initialize
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
|
||||
* initialization call will be performed in the boot-up sequence to a
|
||||
* function called board_late_initialize(). board_late_initialize() will
|
||||
* be called immediately after up_initialize() is called and just before
|
||||
* the initial application is started. This additional initialization
|
||||
* phase may be used, for example, to initialize board-specific device
|
||||
* drivers.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -37,18 +37,6 @@
|
||||
|
||||
#include "z16_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -60,7 +48,7 @@
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
void board_autoled_initialize(void)
|
||||
{
|
||||
/* The following is performed up_board_initialize() as well */
|
||||
/* The following is performed z16f_board_initialize() as well */
|
||||
|
||||
putreg8(getreg8(Z16F_GPIOA_OUT) | 0x07, Z16F_GPIOA_OUT);
|
||||
putreg8(getreg8(Z16F_GPIOA_DD) & 0xf8, Z16F_GPIOA_DD);
|
||||
|
@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* sched/sched/sched_mergeprioritized.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -78,7 +63,7 @@
|
||||
void sched_mergeprioritized(FAR dq_queue_t *list1, FAR dq_queue_t *list2,
|
||||
uint8_t task_state)
|
||||
{
|
||||
FAR dq_queue_t clone;
|
||||
dq_queue_t clone;
|
||||
FAR struct tcb_s *tcb1;
|
||||
FAR struct tcb_s *tcb2;
|
||||
FAR struct tcb_s *tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user