This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit dee4a2f87997fb8a23eab9b403e10ffe99f43c41 Author: wangmingrong1 <[email protected]> AuthorDate: Thu Dec 4 14:26:46 2025 +0800 include/rtt: Unify all declarations in rtt.h Move RTT declarations from segger/note_rtt.h and segger/sysview.h into a single include/nuttx/rtt.h header. Delete the two legacy headers and update all include paths accordingly. Signed-off-by: wangmingrong1 <[email protected]> --- drivers/drivers_initialize.c | 2 +- drivers/note/note_initialize.c | 3 +-- drivers/segger/note_rtt.c | 3 +-- drivers/segger/note_sysview.c | 2 +- drivers/segger/serial_rtt.c | 2 +- drivers/segger/stream_rtt.c | 2 +- drivers/segger/syslog_rtt.c | 2 +- drivers/syslog/syslog_channel.c | 2 +- include/nuttx/{segger => }/rtt.h | 38 +++++++++++++++++++++++++++- include/nuttx/segger/note_rtt.h | 44 -------------------------------- include/nuttx/segger/sysview.h | 54 ---------------------------------------- 11 files changed, 45 insertions(+), 109 deletions(-) diff --git a/drivers/drivers_initialize.c b/drivers/drivers_initialize.c index 87bbb80fbcc..c4e831a38e9 100644 --- a/drivers/drivers_initialize.c +++ b/drivers/drivers_initialize.c @@ -46,7 +46,7 @@ #include <nuttx/power/regulator.h> #include <nuttx/reset/reset-controller.h> #include <nuttx/rpmsg/rpmsg.h> -#include <nuttx/segger/rtt.h> +#include <nuttx/rtt.h> #include <nuttx/sensors/sensor.h> #include <nuttx/serial/netdev_console.h> #include <nuttx/serial/pty.h> diff --git a/drivers/note/note_initialize.c b/drivers/note/note_initialize.c index 3e158432be8..77146eb12a0 100644 --- a/drivers/note/note_initialize.c +++ b/drivers/note/note_initialize.c @@ -32,8 +32,7 @@ #include <nuttx/note/notectl_driver.h> #include <nuttx/note/notesnap_driver.h> #include <nuttx/note/notestream_driver.h> -#include <nuttx/segger/note_rtt.h> -#include <nuttx/segger/sysview.h> +#include <nuttx/rtt.h> #include "noterpmsg.h" diff --git a/drivers/segger/note_rtt.c b/drivers/segger/note_rtt.c index 74287d33acb..36e7ef3b60c 100644 --- a/drivers/segger/note_rtt.c +++ b/drivers/segger/note_rtt.c @@ -25,8 +25,7 @@ ****************************************************************************/ #include <nuttx/note/note_driver.h> -#include <nuttx/segger/note_rtt.h> -#include <nuttx/segger/rtt.h> +#include <nuttx/rtt.h> /**************************************************************************** * Private Types diff --git a/drivers/segger/note_sysview.c b/drivers/segger/note_sysview.c index b088d0c3383..e000ef11ce0 100644 --- a/drivers/segger/note_sysview.c +++ b/drivers/segger/note_sysview.c @@ -32,7 +32,7 @@ #include <nuttx/sched.h> #include <nuttx/sched_note.h> #include <nuttx/note/note_driver.h> -#include <nuttx/segger/sysview.h> +#include <nuttx/rtt.h> #include <SEGGER_RTT.h> #include <SEGGER_SYSVIEW.h> diff --git a/drivers/segger/serial_rtt.c b/drivers/segger/serial_rtt.c index 9d95e1b714a..5801455fc83 100644 --- a/drivers/segger/serial_rtt.c +++ b/drivers/segger/serial_rtt.c @@ -29,7 +29,7 @@ #include <syslog.h> #include <nuttx/kmalloc.h> -#include <nuttx/segger/rtt.h> +#include <nuttx/rtt.h> #include <nuttx/serial/serial.h> #include <nuttx/wdog.h> diff --git a/drivers/segger/stream_rtt.c b/drivers/segger/stream_rtt.c index 381864c12ae..02e5ceb497e 100644 --- a/drivers/segger/stream_rtt.c +++ b/drivers/segger/stream_rtt.c @@ -29,7 +29,7 @@ #include <nuttx/kmalloc.h> #include <nuttx/streams.h> -#include <nuttx/segger/rtt.h> +#include <nuttx/rtt.h> #include <SEGGER_RTT.h> diff --git a/drivers/segger/syslog_rtt.c b/drivers/segger/syslog_rtt.c index 8a33b0b37d8..2b1e53e737a 100644 --- a/drivers/segger/syslog_rtt.c +++ b/drivers/segger/syslog_rtt.c @@ -24,7 +24,7 @@ * Included Files ****************************************************************************/ -#include <nuttx/segger/rtt.h> +#include <nuttx/rtt.h> #include <SEGGER_RTT.h> diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index 6981fdff91a..e25b0e2d5c0 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -44,7 +44,7 @@ #endif #ifdef CONFIG_SYSLOG_RTT -# include <nuttx/segger/rtt.h> +# include <nuttx/rtt.h> #endif #ifdef CONFIG_SYSLOG_CDCACM diff --git a/include/nuttx/segger/rtt.h b/include/nuttx/rtt.h similarity index 81% rename from include/nuttx/segger/rtt.h rename to include/nuttx/rtt.h index 0cda790841d..d5268d65211 100644 --- a/include/nuttx/segger/rtt.h +++ b/include/nuttx/rtt.h @@ -1,5 +1,5 @@ /**************************************************************************** - * include/nuttx/segger/rtt.h + * include/nuttx/rtt.h * * SPDX-License-Identifier: Apache-2.0 * @@ -108,6 +108,42 @@ ssize_t syslog_rtt_write(FAR syslog_channel_t *channel, void serial_rtt_initialize(void); #endif +/**************************************************************************** + * Name: note_sysview_initialize + * + * Description: + * Initializes the SYSVIEW module. + * + * Input Parameters: + * None. + * + * Returned Value: + * Zero on succress. A negated errno value is returned on a failure. + * + ****************************************************************************/ + +#ifdef CONFIG_SEGGER_SYSVIEW +int note_sysview_initialize(void); +#endif + +/**************************************************************************** + * Name: notertt_register + * + * Description: + * Register RTT note driver + * + * Input Parameters: + * None. + * + * Returned Value: + * Zero on success. A negated errno value is returned on a failure. + * + ****************************************************************************/ + +#ifdef CONFIG_NOTE_RTT +int notertt_register(void); +#endif + #ifdef __cplusplus } #endif diff --git a/include/nuttx/segger/note_rtt.h b/include/nuttx/segger/note_rtt.h deleted file mode 100644 index 2af5fa7f08b..00000000000 --- a/include/nuttx/segger/note_rtt.h +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** - * include/nuttx/segger/note_rtt.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * 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. - * - ****************************************************************************/ - -#ifndef __INCLUDE_NUTTX_SEGGER_NOTE_RTT_H -#define __INCLUDE_NUTTX_SEGGER_NOTE_RTT_H - -/**************************************************************************** - * Name: notertt_register - * - * Description: - * Register RTT note driver - * - * Input Parameters: - * None. - * - * Returned Value: - * Zero on success. A negated errno value is returned on a failure. - * - ****************************************************************************/ - -#ifdef CONFIG_NOTE_RTT -int notertt_register(void); -#endif - -#endif /* __INCLUDE_NUTTX_SEGGER_NOTE_RTT_H */ diff --git a/include/nuttx/segger/sysview.h b/include/nuttx/segger/sysview.h deleted file mode 100644 index dd83940a0a2..00000000000 --- a/include/nuttx/segger/sysview.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * include/nuttx/segger/sysview.h - * - * SPDX-License-Identifier: Apache-2.0 - * - * 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. - * - ****************************************************************************/ - -#ifndef __INCLUDE_NUTTX_SEGGER_SYSVIEW_H -#define __INCLUDE_NUTTX_SEGGER_SYSVIEW_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include <nuttx/config.h> - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: note_sysview_initialize - * - * Description: - * Initializes the SYSVIEW module. - * - * Input Parameters: - * None. - * - * Returned Value: - * Zero on succress. A negated errno value is returned on a failure. - * - ****************************************************************************/ - -#ifdef CONFIG_SEGGER_SYSVIEW -int note_sysview_initialize(void); -#endif - -#endif /* __INCLUDE_NUTTX_SEGGER_SYSVIEW_H */
