Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/src/common/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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++);
}
Expand Down
18 changes: 13 additions & 5 deletions arch/arm/src/common/arm_semi_syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include <syscall.h>

#include "arm_internal.h"

#ifdef CONFIG_ARM_SEMIHOSTING_SYSLOG

/****************************************************************************
Expand All @@ -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);
Comment thread
xiaoxiang781216 marked this conversation as resolved.
}
else
{
while (len-- > 0)
Comment thread
xiaoxiang781216 marked this conversation as resolved.
{
up_putc(*str++);
}
}
}
#endif
2 changes: 1 addition & 1 deletion arch/arm64/src/common/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif

# Common C source files ( OS call up_xxx)
CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c
CMN_CSRCS += arm64_idle.c arm64_copystate.c
CMN_CSRCS += arm64_nputs.c arm64_idle.c arm64_copystate.c
CMN_CSRCS += arm64_createstack.c arm64_releasestack.c arm64_stackframe.c arm64_usestack.c
CMN_CSRCS += arm64_task_sched.c arm64_exit.c arm64_vfork.c arm64_reprioritizertr.c
CMN_CSRCS += arm64_releasepending.c arm64_unblocktask.c arm64_blocktask.c
Expand Down
46 changes: 46 additions & 0 deletions arch/arm64/src/common/arm64_nputs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/****************************************************************************
* arch/arm64/src/common/arm64_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++);
}
}
2 changes: 1 addition & 1 deletion arch/avr/src/at32uc3/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion arch/avr/src/at90usb/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion arch/avr/src/atmega/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 4 additions & 6 deletions arch/avr/src/common/up_puts.c → arch/avr/src/common/up_nputs.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -25,8 +25,6 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>

#include "up_internal.h"

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
Expand All @@ -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++);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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++);
}
Expand Down
10 changes: 4 additions & 6 deletions arch/x86/src/common/up_puts.c → arch/hc/src/common/up_nputs.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -25,8 +25,6 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>

#include "up_internal.h"

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
Expand All @@ -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++);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/hc/src/m9s12/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -25,8 +25,6 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>

#include "mips_internal.h"

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
Expand All @@ -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++);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/src/pic32mx/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/src/pic32mz/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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++);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/or1k/src/mor1kx/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Loading