diff --git a/Config/Global.h b/Config/Global.h index c9c1d72..143f5a7 100644 --- a/Config/Global.h +++ b/Config/Global.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** ---------------------------------------------------------------------- File : Global.h Purpose : Global types diff --git a/Config/SEGGER_RTT_Conf.h b/Config/SEGGER_RTT_Conf.h index 03be8b9..b7b2e78 100644 --- a/Config/SEGGER_RTT_Conf.h +++ b/Config/SEGGER_RTT_Conf.h @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT_Conf.h Purpose : Implementation of SEGGER real-time transfer (RTT) which @@ -443,5 +444,16 @@ void OS_SIM_LeaveCriticalSection(void); #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) #endif +/********************************************************************* +* +* If SEGGER_RTT_SECTION is defined but SEGGER_RTT_BUFFER_SECTION +* is not, use the same section for SEGGER_RTT_BUFFER_SECTION. +*/ +#ifndef SEGGER_RTT_BUFFER_SECTION + #if defined(SEGGER_RTT_SECTION) + #define SEGGER_RTT_BUFFER_SECTION SEGGER_RTT_SECTION + #endif +#endif + #endif /*************************** End of file ****************************/ diff --git a/Config/SEGGER_SYSVIEW_Conf.h b/Config/SEGGER_SYSVIEW_Conf.h index c4f8626..34624a6 100644 --- a/Config/SEGGER_SYSVIEW_Conf.h +++ b/Config/SEGGER_SYSVIEW_Conf.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW_Conf.h @@ -84,10 +80,14 @@ uint32_t sysview_get_interrupt(void); #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE CONFIG_SEGGER_SYSVIEW_RTT_BUFFER_SIZE #define SEGGER_SYSVIEW_POST_MORTEM_MODE CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE -#define SEGGER_SYSVIEW_RTT_CHANNEL CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL +#define SEGGER_SYSVIEW_RTT_CHANNEL CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL #if defined(CONFIG_SEGGER_SYSVIEW_SECTION_DTCM) -#define SEGGER_SYSVIEW_SECTION ".dtcm_bss" + #define SEGGER_SYSVIEW_SECTION ".dtcm_bss" +#endif + +#if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_BUFFER_SECTION) + #define SEGGER_SYSVIEW_SECTION SEGGER_RTT_BUFFER_SECTION #endif extern unsigned int zephyr_rtt_irq_lock(void); diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..14881c2 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,36 @@ + + SEGGER Microcontroller GmbH + The Embedded Experts + + (c) 1995 - 2021 SEGGER Microcontroller GmbH + www.segger.com Support: support@segger.com + + SEGGER RTT Real Time Transfer for embedded targets + + + All rights reserved. + + SEGGER strongly recommends to not make any changes + to or modify the source code of this software in order to stay + compatible with the RTT protocol and J-Link. + + Redistribution and use in source and binary forms, with or + without modification, are permitted provided that the following + condition is met: + + - Redistributions of source code must retain the above copyright + notice, this condition and the following disclaimer. + + 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 SEGGER Microcontroller 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. diff --git a/README.md b/README.md index cec784b..acaff1b 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,12 @@ This README identifies the origin of upstream Segger files and suggests a proced updating to a new Segger release. ### Upstream Segger source code -Segger's [official GitHub repository][6] is not currently actively maintained, hence Segger code is -obtained from publicly accessible download links posted on Segger's website. +RTT and SystemView target source code is available from Segger's GitHub repositories +- [RTT][6] +- [SystemView][7] -#### RTT and SystemView -[Download][7] "SystemView, Target Sources" from the SystemView downloads [webpage][8]. This -download contains both RTT and SystemView sources. - -#### Monitor mode debugging -[Download][9] "Example project" from the Monitor mode debugging [webpage][10]. +Monitor mode source can be [downloaded][8] as "Example project" from the Monitor mode debugging +[webpage][9]. ### Updating to a new Segger release Upgrading to a new Segger release means migrating existing Zephyr changes to the latest Segger @@ -28,23 +25,29 @@ achieving the desired result. 1. Obtain the updated Segger code and prepare for subsequent steps 1. Download upstream code from the links above - 2. Extract the SystemView update and delete the `Samples` directory + 2. Delete `RTT/Examples`, `SystemView/Sample` and other unnecessary files 3. Extract the Monitor mode example and delete _non_-JLINK_MONITOR* files 4. Organize the files to match the directory structure of this repository 5. Convert line endings of all files to Unix style LF (`\n`) 6. Strip trailing white space of all files 2. Establish the Zephyr patches that will be applied in step 3 - 1. Download the SystemView release this repository is _currently_ based on (refer to - "SystemView version: x.yy" in the source files to determine the current release) + 1. Download the RTT and SystemView code this repository is _currently_ based on (see + [Current release](#current-release)) 2. Repeat step 1 parts ii-vi for these downloaded files - 3. Compare the files of this repository to those of step 2 part ii to identify the existing - Zephyr changes (the "diff", or "patch") needed for step 3 + 3. Compare the files of this repository to those of step 2 part ii to identify existing + Zephyr specific changes (the "diff", or "patch") needed for step 3 3. Apply the Zephyr changes to the new Segger release 1. Apply the patches from step 2 part iii to the files of step 1 2. Sanity check the result and revise as needed -4. Review/update the list of patched files below -5. Commit the updated + modified Segger files and push the change -6. Open a pull-request to merge the change into this repository +4. Review/update references to the Segger releases below +5. Review/update the list of patched files below +6. Commit the updated + modified Segger files and push the change +7. Open a pull-request to merge the change into this repository + +### Current release +This repository integrates the following Segger releases: +- RTT v8.56a [GitHub](https://github.com/SEGGERMicro/RTT/tree/ad6970d813bb12b8a5e34aa94b3a1999f7bd0b6b) +- SystemView v3.62c [GitHub](https://github.com/SEGGERMicro/SystemView/tree/62bc0ad84a6812dc4d5b044ef6f0727f0b488b9e) ### Patched files Segger source files with Zephyr specific changes: @@ -60,8 +63,7 @@ Segger source files with Zephyr specific changes: [3]: https://www.segger.com/products/development-tools/systemview [4]: https://wiki.segger.com/SystemView [5]: https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging -[6]: https://github.com/SEGGERMicro -[7]: https://www.segger.com/downloads/jlink/systemview_target_src -[8]: https://www.segger.com/downloads/systemview -[9]: https://www.segger.com/downloads/pub/Generic_Cortex-M_MonitorModeSystickExample_SES.zip -[10]: https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging +[6]: https://github.com/SEGGERMicro/RTT +[7]: https://github.com/SEGGERMicro/SystemView +[8]: https://www.segger.com/downloads/pub/Generic_Cortex-M_MonitorModeSystickExample_SES.zip +[9]: https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging diff --git a/SEGGER/SEGGER.h b/SEGGER/SEGGER.h index 328b636..f933fe4 100644 --- a/SEGGER/SEGGER.h +++ b/SEGGER/SEGGER.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** ---------------------------------------------------------------------- File : SEGGER.h Purpose : Global types etc & general purpose utility functions diff --git a/SEGGER/SEGGER_RTT.c b/SEGGER/SEGGER_RTT.c index 633e5fb..765ae04 100644 --- a/SEGGER/SEGGER_RTT.c +++ b/SEGGER/SEGGER_RTT.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT.c Purpose : Implementation of SEGGER real-time transfer (RTT) which @@ -121,12 +122,6 @@ Additional information: #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS 2 // Number of down-buffers (H->T) available on this target #endif -#ifndef SEGGER_RTT_BUFFER_SECTION - #if defined(SEGGER_RTT_SECTION) - #define SEGGER_RTT_BUFFER_SECTION SEGGER_RTT_SECTION - #endif -#endif - #ifndef SEGGER_RTT_ALIGNMENT #define SEGGER_RTT_ALIGNMENT SEGGER_RTT_CPU_CACHE_LINE_SIZE #endif @@ -208,7 +203,7 @@ Additional information: #define SEGGER_RTT_PUT_SECTION(Var, Section) RTT_PRAGMA(location=Section) \ Var #elif (defined __CC_ARM) - #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section), zero_init)) Var + #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section))) Var #else #error "Section placement not supported for this compiler." #endif diff --git a/SEGGER/SEGGER_RTT.h b/SEGGER/SEGGER_RTT.h index a8264cd..e8679b4 100644 --- a/SEGGER/SEGGER_RTT.h +++ b/SEGGER/SEGGER_RTT.h @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT.h Purpose : Implementation of SEGGER real-time transfer which allows @@ -133,7 +134,12 @@ Revision: $Rev: 25842 $ #define _CORE_HAS_RTT_ASM_SUPPORT 1 #define _CORE_NEEDS_DMB 1 #define RTT__DMB() __asm volatile ("dmb\n" : : :); - #elif ((defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__)) // Cortex-A/R 32-bit ARMv7-A/R + #elif \ + ((defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__)) || \ + ((defined __ARM_ARCH_8A__) || (defined __ARM_ARCH_8R__)) + // + // Cortex-A/R ARMv7-A/R & ARMv8-A/R + // #define _CORE_NEEDS_DMB 1 #define RTT__DMB() __asm volatile ("dmb\n" : : :); #else @@ -163,7 +169,12 @@ Revision: $Rev: 25842 $ #define _CORE_HAS_RTT_ASM_SUPPORT 1 #define _CORE_NEEDS_DMB 1 #define RTT__DMB() __asm volatile ("dmb\n" : : :); - #elif ((defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__)) // Cortex-A/R 32-bit ARMv7-A/R + #elif \ + (defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__) || \ + (defined __ARM_ARCH_8A__) || (defined __ARM_ARCH_8R__) + // + // Cortex-A/R ARMv7-A/R & ARMv8-A/R + // #define _CORE_NEEDS_DMB 1 #define RTT__DMB() __asm volatile ("dmb\n" : : :); #else @@ -212,20 +223,17 @@ Revision: $Rev: 25842 $ #define RTT__DMB() asm VOLATILE ("DMB"); #endif #endif - #if (defined __ARM7A__) - #if (__CORE__ == __ARM7A__) // Cortex-A 32-bit ARMv7-A - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() asm VOLATILE ("DMB"); - #endif - #endif - #if (defined __ARM7R__) - #if (__CORE__ == __ARM7R__) // Cortex-R 32-bit ARMv7-R - #define _CORE_NEEDS_DMB 1 - #define RTT__DMB() asm VOLATILE ("DMB"); - #endif + #if\ + ((defined __ARM7A__) && (__CORE__ == __ARM7A__)) || \ + ((defined __ARM7R__) && (__CORE__ == __ARM7R__)) || \ + ((defined __ARM8A__) && (__CORE__ == __ARM8A__)) || \ + ((defined __ARM8R__) && (__CORE__ == __ARM8R__)) + // + // Cortex-A/R ARMv7-A/R & ARMv8-A/R + // + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); #endif -// TBD: __ARM8A__ => Cortex-A 64-bit ARMv8-A -// TBD: __ARM8R__ => Cortex-R 64-bit ARMv8-R #else // // Other compilers diff --git a/SEGGER/SEGGER_RTT_printf.c b/SEGGER/SEGGER_RTT_printf.c index 6ed598b..7ececaf 100644 --- a/SEGGER/SEGGER_RTT_printf.c +++ b/SEGGER/SEGGER_RTT_printf.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT_printf.c Purpose : Replacement for printf to write formatted data via RTT @@ -322,7 +323,8 @@ int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pPa char c; SEGGER_RTT_PRINTF_DESC BufferDesc; int v; - unsigned NumDigits; + unsigned char PrecisionSet; + unsigned Precision; unsigned FormatFlags; unsigned FieldWidth; char acBuffer[SEGGER_RTT_PRINTF_BUFFER_SIZE]; @@ -371,18 +373,26 @@ int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pPa // // Filter out precision (number of digits to display) // - NumDigits = 0u; + PrecisionSet = 0; + Precision = 0u; c = *sFormat; if (c == '.') { sFormat++; - do { - c = *sFormat; - if ((c < '0') || (c > '9')) { - break; - } + if (*sFormat == '*') { sFormat++; - NumDigits = NumDigits * 10u + ((unsigned)c - '0'); - } while (1); + PrecisionSet = 1; + Precision = va_arg(*pParamList, int); + } else { + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + PrecisionSet = 1; + sFormat++; + Precision = Precision * 10u + ((unsigned)c - '0'); + } while (1); + } } // // Filter out length modifier @@ -409,22 +419,23 @@ int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pPa } case 'd': v = va_arg(*pParamList, int); - _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags); + _PrintInt(&BufferDesc, v, 10u, Precision, FieldWidth, FormatFlags); break; case 'u': v = va_arg(*pParamList, int); - _PrintUnsigned(&BufferDesc, (unsigned)v, 10u, NumDigits, FieldWidth, FormatFlags); + _PrintUnsigned(&BufferDesc, (unsigned)v, 10u, Precision, FieldWidth, FormatFlags); break; case 'x': case 'X': v = va_arg(*pParamList, int); - _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, NumDigits, FieldWidth, FormatFlags); + _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, Precision, FieldWidth, FormatFlags); break; case 's': { const char * s = va_arg(*pParamList, const char *); if (s == NULL) { - s = "(NULL)"; // Print (NULL) instead of crashing or breaking, as it is more informative to the user. + s = "(NULL)"; // Print (NULL) instead of crashing or breaking, as it is more informative to the user. + PrecisionSet = 0; // Make sure (NULL) is printed, even when precision was set. } do { c = *s; @@ -432,7 +443,11 @@ int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pPa if (c == '\0') { break; } - _StoreChar(&BufferDesc, c); + if ((PrecisionSet != 0) && (Precision == 0)) { + break; + } + _StoreChar(&BufferDesc, c); + Precision--; } while (BufferDesc.ReturnValue >= 0); } break; diff --git a/SEGGER/SEGGER_SYSVIEW.c b/SEGGER/SEGGER_SYSVIEW.c index 2606f93..390805a 100644 --- a/SEGGER/SEGGER_SYSVIEW.c +++ b/SEGGER/SEGGER_SYSVIEW.c @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW.c @@ -1429,12 +1425,6 @@ static void _VPrintTarget(const char* sFormat, U32 Options, va_list* pParamList) * The channel is configured with the macro SEGGER_SYSVIEW_RTT_CHANNEL. */ void SEGGER_SYSVIEW_Init(U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc) { -#ifdef SEGGER_RTT_SECTION - // - // Explicitly initialize the RTT Control Block if it is in its dedicated section. - // - SEGGER_RTT_Init(); -#endif #if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) #if SEGGER_SYSVIEW_RTT_CHANNEL > 0 SEGGER_RTT_ConfigUpBuffer(SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); diff --git a/SEGGER/SEGGER_SYSVIEW.h b/SEGGER/SEGGER_SYSVIEW.h index 03cb011..909085e 100644 --- a/SEGGER/SEGGER_SYSVIEW.h +++ b/SEGGER/SEGGER_SYSVIEW.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW.h Purpose : System visualization API. diff --git a/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h b/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h index 22fba14..c34130e 100644 --- a/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h +++ b/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW_ConfDefaults.h Purpose : Defines defaults for configurable defines used in @@ -88,17 +84,17 @@ extern "C" { #if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __SEGGER_CC__) || (defined __GNUC__) || (defined __clang__) #if (defined __ARM_ARCH_6M__) || (defined __ARM_ARCH_8M_BASE__) #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 - #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) + #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__) || defined(__ARM_ARCH_8_1M_MAIN__)) #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 #endif #elif defined(__ICCARM__) #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) \ || (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 - #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \ - || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \ - || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \ - || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) + #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \ + || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \ + || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \ + || (defined (__ARM8_1M_MAINLINE__) && (__CORE__ == __ARM8_1M_MAINLINE__)) #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 #endif #elif defined(__CC_ARM) @@ -268,22 +264,6 @@ extern "C" { #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024 #endif -/********************************************************************* -* -* Define: SEGGER_SYSVIEW_SECTION -* -* Description -* Section to place the SystemView RTT Buffer into. -* Default -* undefined: Do not place into a specific section. -* Notes -* If SEGGER_RTT_SECTION is defined, the default changes to use -* this section for the SystemView RTT Buffer, too. -*/ -#if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_SECTION) - #define SEGGER_SYSVIEW_SECTION SEGGER_RTT_SECTION -#endif - /********************************************************************* * * Define: SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE diff --git a/SEGGER/SEGGER_SYSVIEW_Int.h b/SEGGER/SEGGER_SYSVIEW_Int.h index c2d7209..b593598 100644 --- a/SEGGER/SEGGER_SYSVIEW_Int.h +++ b/SEGGER/SEGGER_SYSVIEW_Int.h @@ -41,10 +41,6 @@ * DAMAGE. * * * ********************************************************************** -* * -* SystemView version: 3.58 * -* * -********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW_Int.h Purpose : SEGGER SystemView internal header. diff --git a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c index 3e38f30..a407e5a 100644 --- a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c +++ b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT_Syscalls_GCC.c Purpose : Low-level functions for using printf() via RTT in GCC. diff --git a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c index 68bdf5a..8ce6be9 100644 --- a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c +++ b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT_Syscalls_IAR.c Purpose : Low-level functions for using printf() via RTT in IAR. diff --git a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c index 8827708..af7ee2c 100644 --- a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c +++ b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : RTT_Syscalls_KEIL.c Purpose : Retargeting module for KEIL MDK-CM3. @@ -194,7 +195,7 @@ int _sys_write(FILEHANDLE hFile, const unsigned char * pBuffer, unsigned NumByte (void)Mode; if (hFile == STDOUT) { SEGGER_RTT_Write(0, (const char*)pBuffer, NumBytes); - return 0; + return 0; } return r; } diff --git a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c index b119d67..6ba5cf1 100644 --- a/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c +++ b/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c @@ -3,13 +3,13 @@ * The Embedded Experts * ********************************************************************** * * -* (c) 1995 - 2024 SEGGER Microcontroller GmbH * +* (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * -* SEGGER SystemView * Real-time application analysis * +* SEGGER RTT * Real Time Transfer for embedded targets * * * ********************************************************************** * * @@ -17,7 +17,7 @@ * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * -* compatible with the SystemView and RTT protocol, and J-Link. * +* compatible with the RTT protocol and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * @@ -42,9 +42,10 @@ * * ********************************************************************** * * -* SystemView version: 3.58 * +* RTT version: 8.56a * * * ********************************************************************** + ---------------------------END-OF-HEADER------------------------------ File : SEGGER_RTT_Syscalls_SES.c Purpose : Reimplementation of printf, puts and __getchar using RTT