forked from nuttx/nuttx-update
arch: Add up_nputs function to handle the non '\0' string correctly
and change up_puts as a simple macro Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
02ea79365a
commit
aad5fbd2fb
42 changed files with 247 additions and 266 deletions
|
@ -24,7 +24,7 @@ CMN_CSRCS += arm_allocateheap.c arm_assert.c arm_blocktask.c
|
|||
CMN_CSRCS += arm_createstack.c arm_exit.c arm_fullcontextrestore.c
|
||||
CMN_CSRCS += arm_initialize.c arm_lowputs.c
|
||||
CMN_CSRCS += arm_modifyreg16.c arm_modifyreg32.c
|
||||
CMN_CSRCS += arm_modifyreg8.c arm_puts.c arm_releasepending.c
|
||||
CMN_CSRCS += arm_modifyreg8.c arm_nputs.c arm_releasepending.c
|
||||
CMN_CSRCS += arm_releasestack.c arm_reprioritizertr.c arm_saveusercontext.c
|
||||
CMN_CSRCS += arm_stackframe.c arm_switchcontext.c
|
||||
CMN_CSRCS += arm_vfork.c arm_unblocktask.c arm_usestack.c
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/arm/src/common/arm_puts.c
|
||||
* arch/arm/src/common/arm_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,23 +25,21 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
#include <syscall.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
|
||||
#ifdef CONFIG_ARM_SEMIHOSTING_SYSLOG
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -54,15 +52,25 @@ int up_putc(int ch)
|
|||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* Output a string on the console
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
smh_call(SEMI_SYSLOG_WRITE0, (char *)str);
|
||||
if (len == ~((size_t)0))
|
||||
{
|
||||
smh_call(SEMI_SYSLOG_WRITE0, (char *)str);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,7 @@ CMN_CSRCS += up_initialize.c up_initialstate.c
|
|||
CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
||||
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
||||
CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
|
||||
CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_puts.c
|
||||
CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_nputs.c
|
||||
|
||||
# Configuration-dependent common files
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
|
|||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c
|
||||
CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
||||
CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
|
|||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c
|
||||
CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
||||
CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/avr/src/common/up_puts.c
|
||||
* arch/avr/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/or1k/src/common/up_puts.c
|
||||
* arch/ceva/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,23 +25,21 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/x86/src/common/up_puts.c
|
||||
* arch/hc/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -23,7 +23,7 @@ HEAD_ASRC = m9s12_vectors.S
|
|||
CMN_CSRCS = up_allocateheap.c up_blocktask.c up_copystate.c up_createstack.c
|
||||
CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_mdelay.c up_modifyreg16.c up_modifyreg32.c up_modifyreg8.c
|
||||
CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
||||
CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
||||
CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
CHIP_ASRCS = m9s12_start.S m9s12_lowputc.S m9s12_saveusercontext.S
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/mips/src/common/mips_puts.c
|
||||
* arch/mips/src/common/mips_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "mips_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = mips_allocateheap.c mips_assert.c mips_blocktask.c mips_copystate.c
|
|||
CMN_CSRCS += mips_createstack.c mips_doirq.c mips_exit.c mips_initialize.c
|
||||
CMN_CSRCS += mips_initialstate.c mips_irq.c mips_lowputs.c
|
||||
CMN_CSRCS += mips_mdelay.c mips_modifyreg8.c mips_modifyreg16.c mips_modifyreg32.c
|
||||
CMN_CSRCS += mips_puts.c mips_releasepending.c mips_releasestack.c
|
||||
CMN_CSRCS += mips_nputs.c mips_releasepending.c mips_releasestack.c
|
||||
CMN_CSRCS += mips_reprioritizertr.c mips_schedulesigaction.c mips_sigdeliver.c
|
||||
CMN_CSRCS += mips_stackframe.c mips_swint0.c mips_udelay.c mips_unblocktask.c
|
||||
CMN_CSRCS += mips_usestack.c mips_vfork.c
|
||||
|
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = mips_allocateheap.c mips_assert.c mips_blocktask.c mips_copystate.c
|
|||
CMN_CSRCS += mips_createstack.c mips_doirq.c mips_exit.c mips_initialize.c
|
||||
CMN_CSRCS += mips_initialstate.c mips_irq.c mips_lowputs.c
|
||||
CMN_CSRCS += mips_mdelay.c mips_modifyreg8.c mips_modifyreg16.c mips_modifyreg32.c
|
||||
CMN_CSRCS += mips_puts.c mips_releasepending.c mips_releasestack.c
|
||||
CMN_CSRCS += mips_nputs.c mips_releasepending.c mips_releasestack.c
|
||||
CMN_CSRCS += mips_reprioritizertr.c mips_schedulesigaction.c mips_sigdeliver.c
|
||||
CMN_CSRCS += mips_stackframe.c mips_swint0.c mips_udelay.c mips_unblocktask.c
|
||||
CMN_CSRCS += mips_usestack.c mips_vfork.c
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/ceva/src/common/up_puts.c
|
||||
* arch/or1k/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -30,16 +30,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -41,7 +41,7 @@ CMN_CSRCS = up_initialize.c \
|
|||
up_mdelay.c \
|
||||
up_idle.c \
|
||||
up_irq.c \
|
||||
up_puts.c \
|
||||
up_nputs.c \
|
||||
up_uart.c \
|
||||
up_timer.c \
|
||||
up_doirq.c \
|
||||
|
|
58
arch/renesas/src/common/up_nputs.c
Normal file
58
arch/renesas/src/common/up_nputs.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
/****************************************************************************
|
||||
* arch/renesas/src/common/up_nputs.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 <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ HEAD_ASRC = m16c_head.S
|
|||
|
||||
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
|
||||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_lowputs.c up_mdelay.c up_puts.c
|
||||
CMN_CSRCS += up_lowputs.c up_mdelay.c up_nputs.c
|
||||
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
||||
CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ HEAD_ASRC = rx65n_head.S
|
|||
|
||||
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
|
||||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_lowputs.c up_mdelay.c up_puts.c
|
||||
CMN_CSRCS += up_lowputs.c up_mdelay.c up_nputs.c
|
||||
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
||||
CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ HEAD_ASRC = sh1_head.S
|
|||
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c
|
||||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_initialstate.c up_lowputs.c
|
||||
CMN_CSRCS += up_mdelay.c up_puts.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_mdelay.c up_nputs.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_stackframe.c up_udelay.c
|
||||
CMN_CSRCS += sh1_schedulesigaction.c sh1_sigdeliver.c
|
||||
CMN_CSRCS += up_unblocktask.c up_usestack.c
|
||||
|
|
|
@ -29,7 +29,7 @@ CMN_ASRCS += riscv_vectors.S riscv_exception_common.S riscv_mhartid.S
|
|||
CMN_CSRCS += riscv_initialize.c riscv_swint.c riscv_mtimer.c
|
||||
CMN_CSRCS += riscv_allocateheap.c riscv_createstack.c riscv_exit.c
|
||||
CMN_CSRCS += riscv_assert.c riscv_blocktask.c riscv_copystate.c riscv_initialstate.c
|
||||
CMN_CSRCS += riscv_modifyreg32.c riscv_puts.c
|
||||
CMN_CSRCS += riscv_modifyreg32.c riscv_nputs.c
|
||||
CMN_CSRCS += riscv_releasepending.c riscv_reprioritizertr.c
|
||||
CMN_CSRCS += riscv_releasestack.c riscv_stackframe.c riscv_schedulesigaction.c
|
||||
CMN_CSRCS += riscv_sigdeliver.c riscv_unblocktask.c riscv_usestack.c
|
||||
|
|
46
arch/risc-v/src/common/riscv_nputs.c
Normal file
46
arch/risc-v/src/common/riscv_nputs.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
/****************************************************************************
|
||||
* arch/risc-v/src/common/riscv_nputs.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 <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -61,7 +61,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_initialstate.c
|
|||
CSRCS += up_createstack.c up_usestack.c up_releasestack.c up_stackframe.c
|
||||
CSRCS += up_unblocktask.c up_blocktask.c up_releasepending.c
|
||||
CSRCS += up_reprioritizertr.c up_exit.c up_schedulesigaction.c
|
||||
CSRCS += up_heap.c up_uart.c up_assert.c up_puts.c
|
||||
CSRCS += up_heap.c up_uart.c up_assert.c up_nputs.c
|
||||
CSRCS += up_copyfullstate.c
|
||||
CSRCS += up_sigdeliver.c
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/sim/src/sim/up_puts.c
|
||||
* arch/sim/src/sim/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c up_syst
|
|||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c
|
||||
CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
||||
CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_stackframe.c up_swint1.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c
|
|||
CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c
|
||||
CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c
|
||||
CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
||||
CMN_CSRCS += up_puts.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_schedulesigaction.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_stackframe.c up_swint1.c up_udelay.c up_unblocktask.c up_usestack.c
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/renesas/src/common/up_puts.c
|
||||
* arch/sparc/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/hc/src/common/up_puts.c
|
||||
* arch/x86/src/common/up_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -23,11 +23,8 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -45,16 +42,16 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -32,7 +32,7 @@ CMN_CSRCS += up_irq.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
|||
CMN_CSRCS += up_regdump.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_savestate.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_schedulesigaction.c up_stackframe.c up_unblocktask.c
|
||||
CMN_CSRCS += up_usestack.c up_puts.c
|
||||
CMN_CSRCS += up_usestack.c up_nputs.c
|
||||
|
||||
# Required QEMU files
|
||||
|
||||
|
|
58
arch/x86_64/src/common/up_nputs.c
Normal file
58
arch/x86_64/src/common/up_nputs.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
/****************************************************************************
|
||||
* arch/x86_64/src/common/up_nputs.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 <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/x86_64/src/common/up_puts.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 <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ CMN_CSRCS += up_irq.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
|||
CMN_CSRCS += up_regdump.c up_releasepending.c up_releasestack.c
|
||||
CMN_CSRCS += up_reprioritizertr.c up_savestate.c up_sigdeliver.c
|
||||
CMN_CSRCS += up_schedulesigaction.c up_stackframe.c up_unblocktask.c
|
||||
CMN_CSRCS += up_usestack.c up_puts.c
|
||||
CMN_CSRCS += up_usestack.c up_nputs.c
|
||||
CMN_CSRCS += up_rtc.c
|
||||
CMN_CSRCS += up_map_region.c
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ CMN_CSRCS += xtensa_cpenable.c xtensa_createstack.c xtensa_exit.c
|
|||
CMN_CSRCS += xtensa_initialize.c xtensa_initialstate.c
|
||||
CMN_CSRCS += xtensa_irqdispatch.c xtensa_lowputs.c xtensa_mdelay.c
|
||||
CMN_CSRCS += xtensa_modifyreg8.c xtensa_modifyreg16.c xtensa_modifyreg32.c
|
||||
CMN_CSRCS += xtensa_puts.c xtensa_releasepending.c xtensa_releasestack.c
|
||||
CMN_CSRCS += xtensa_nputs.c xtensa_releasepending.c xtensa_releasestack.c
|
||||
CMN_CSRCS += xtensa_reprioritizertr.c xtensa_schedsigaction.c
|
||||
CMN_CSRCS += xtensa_sigdeliver.c xtensa_stackframe.c xtensa_udelay.c
|
||||
CMN_CSRCS += xtensa_unblocktask.c xtensa_usestack.c xtensa_swint.c
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/risc-v/src/common/riscv_puts.c
|
||||
* arch/xtensa/src/common/xtensa_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,23 +25,21 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/xtensa/src/common/xtensa_puts.c
|
||||
* arch/z16/src/common/z16_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,23 +25,21 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "xtensa.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/z16/src/common/z16_puts.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 <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ CMN_CSRCS += z16_stackdump.c z16_copystate.c
|
|||
CMN_CSRCS += z16_mdelay.c z16_udelay.c z16_createstack.c z16_registerdump.c
|
||||
CMN_CSRCS += z16_unblocktask.c z16_doirq.c z16_releasepending.c z16_usestack.c
|
||||
CMN_CSRCS += z16_exit.c z16_releasestack.c z16_stackframe.c z16_idle.c
|
||||
CMN_CSRCS += z16_reprioritizertr.c z16_puts.c
|
||||
CMN_CSRCS += z16_reprioritizertr.c z16_nputs.c
|
||||
|
||||
CHIP_SSRCS = z16f_lowuart.S z16f_saveusercontext.S z16f_restoreusercontext.S
|
||||
CHIP_CSRCS = z16f_clkinit.c z16f_sysexec.c z16f_irq.c z16f_serial.c
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* arch/sparc/src/common/up_puts.c
|
||||
* arch/z80/src/common/z80_nputs.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -25,8 +25,6 @@
|
|||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
@ -44,18 +42,17 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
* Name: up_nputs
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
void up_nputs(const char *str, size_t len)
|
||||
{
|
||||
while (*str)
|
||||
while (*str && len-- > 0)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/****************************************************************************
|
||||
* arch/z80/src/common/z80_puts.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 <nuttx/arch.h>
|
||||
|
||||
#include "z80_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_puts
|
||||
*
|
||||
* Description:
|
||||
* This is a low-level helper function used to support debug.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
up_putc(*str++);
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@ CMN_CSRCS += z80_releasestack.c z80_interruptcontext.c z80_blocktask.c
|
|||
CMN_CSRCS += z80_unblocktask.c z80_exit.c z80_releasepending.c
|
||||
CMN_CSRCS += z80_reprioritizertr.c z80_idle.c z80_assert.c z80_doirq.c
|
||||
CMN_CSRCS += z80_mdelay.c z80_stackframe.c z80_udelay.c z80_usestack.c
|
||||
CMN_CSRCS += z80_puts.c
|
||||
CMN_CSRCS += z80_nputs.c
|
||||
|
||||
ifeq ($(CONFIG_ARCH_STACKDUMP),y)
|
||||
CMN_CSRCS += z80_stackdump.c
|
||||
|
|
|
@ -30,7 +30,7 @@ CMN_CSRCS = z80_allocateheap.c z80_assert.c z80_blocktask.c z80_createstack.c
|
|||
CMN_CSRCS += z80_doirq.c z80_exit.c z80_idle.c z80_initialize.c
|
||||
CMN_CSRCS += z80_interruptcontext.c z80_mdelay.c z80_releasepending.c
|
||||
CMN_CSRCS += z80_releasestack.c z80_stackframe.c z80_reprioritizertr.c
|
||||
CMN_CSRCS += z80_unblocktask.c z80_udelay.c z80_usestack.c z80_puts.c
|
||||
CMN_CSRCS += z80_unblocktask.c z80_udelay.c z80_usestack.c z80_nputs.c
|
||||
|
||||
CHIP_ASRCS = z180_restoreusercontext.asm z180_saveusercontext.asm
|
||||
CHIP_ASRCS += z180_vectcommon.asm
|
||||
|
|
|
@ -25,7 +25,7 @@ CMN_CSRCS += z80_releasestack.c z80_interruptcontext.c z80_blocktask.c
|
|||
CMN_CSRCS += z80_unblocktask.c z80_exit.c z80_releasepending.c
|
||||
CMN_CSRCS += z80_reprioritizertr.c z80_idle.c z80_assert.c z80_doirq.c
|
||||
CMN_CSRCS += z80_mdelay.c z80_stackframe.c z80_udelay.c z80_usestack.c
|
||||
CMN_CSRCS += z80_puts.c
|
||||
CMN_CSRCS += z80_nputs.c
|
||||
|
||||
CHIP_SSRCS = z8_vector.S z8_saveusercontext.S z8_restorecontext.S
|
||||
CHIP_CSRCS = z8_initialstate.c z8_irq.c z8_saveirqcontext.c
|
||||
|
|
|
@ -2552,7 +2552,8 @@ int up_putc(int ch);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_puts(FAR const char *str);
|
||||
#define up_puts(str) up_nputs(str, ~((size_t)0))
|
||||
void up_nputs(FAR const char *str, size_t len);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arch_sporadic_*
|
||||
|
|
Loading…
Reference in a new issue