doc: renamed project

This commit is contained in:
SylvanArnold
2025-04-29 13:52:54 +02:00
committed by Sylvan Arnold
parent 244e516bd8
commit 32618389d1
985 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,250 @@
IMPORTANT - READ CAREFULLY:
This is a legal agreement between "you" (either as an individual or a single entity) and SEGGER Microcontroller GmbH ("SEGGER") for the SEGGER SystemView Application software product ("SystemView", "Software").
All IP rights, title and interest in SystemView is and shall at all times remain with SEGGER.
By downloading and/or using SystemView, YOU agree to be bound by the terms of this agreement.
1. LICENSE GRANT
a) FREE OF CHARGE LICENSE FOR EVALUATION, HOBBYIST NON-COMMERCIAL, AND EDUCATIONAL PURPOSES
SEGGER grants you a personal, non-exclusive license free of charge when either of the following conditions is met:
The software is only used for
I. Evaluation purposes
II. Educational purposes
III. Hobbyist (non-commercial) purposes
EVALUATION PURPOSES means you shall only use the Software to try it out, test it, and determine further use.
HOBBYIST (NON-COMMERCIAL) and EDUCATIONAL PURPOSES means the Software can be used by you, as a private individual, student, tutor or teacher,
- in universities
- in colleges
- in non-profit organizations
- at home
for
- classes
- training
- self-education
- non-commercial projects
if the Software is used for teaching, learning, studying, and hobbyists purposes only.
You shall not use the Software within universities, colleges, or non-profit organizations
- for any commercial purposes or project or other undertaking, intended for profit
Using Systemview without a commercial-use license for any other purpose is prohibited.
b) COMMERCIAL-USE LICENSE
Subject to the payment of the license fee, SEGGER grants to you a personal, non-exclusive license to install and use SystemView for personal or for commercial purposes. The use of SystemView is limited to the specific license model purchased.
J-Link locked License (default):
The J-Link locked License entitles an individual to use SystemView with a specific SEGGER J-Link debug probe only, identified by its unique serial number. The specific SEGGER J-Link debug probe serves as a hardware lock (dongle).
A hardware lock is a device to be attached to one of the computer's external ports, which allows the individual to move the license to another computer.
The SEGGER J-Link locked License may be used by an individual only on a single, self-contained computer unit (stationary or portable), directly and physically connected to the SEGGER J-Link debug probe. A switch of the specific SEGGER J-Link debug probe to another SEGGER J-Link debug probe may be allowed by SEGGER; provided that the initial SEGGER J-Link debug probe has been identified and approved as defective by SEGGER. SystemView may not be accessed by other individuals from or on other computer units NOT directly and physically connected to the specific SEGGER J-Link (except for access via J-Link tunnel mode).
The number of individuals within an organisation, company, entity or a like to use the SystemView under this J-Link locked License model, if more than one, is defined by the number of SEGGER J-Link debug probes identified by their unique serial numbers on the PO and related order confirmation.
PC locked license (on request):
A PC-locked License is a personal, non-exclusive license for an individual to use SystemView while locked to the MAC address of a PC where the software is installed.
The PC-locked License may be used by the individual only on one single, self-contained computer unit (stationary or portable), designated and identified through its MAC address or other means of identification. PC locked license are available from SEGGER upon request.
Site License (on request):
A Site license entitles you, as a Company, the right to designate an unlimited number of persons employed by you and working in facilities located within one city or within a range of 20 miles (whichever is greater) to use the Software in connection with the development and creation of your Products. The city is defined in the PO and related order confirmation.
Company-wide License (on request):
A Company-wide License entitles you, as a Company, the right to designate an unlimited number of persons employed by you to use the Software in connection with the development and creation of your Products.
A Company-wide License forgoes the need to activate the software each time it is installed on another computer within your Company.
The use of the Software by your Consultants or Affiliates is not permitted and requires the purchase of additional licenses.
GENERAL TERMS THAT APPLY TO SystemView
2. RESTRICTIONS
YOU may not:
(a) decompile, disassemble, reverse engineer, or otherwise attempt to derive the source code of SystemView,
(b) sell, rent, lease, sublicense, or otherwise transfer rights to SystemView,
(c) remove or alter any trademark, logo, copyright or other proprietary notices, legends, symbols or label in SystemView,
(d) redistribute or encumber SystemView without prior written authorisation from SEGGER.
Without prejudice to any other rights, SEGGER may terminate this agreement if YOU fail to comply with foregoing restrictions.
3. DISCLAIMER OF WARRANTY
SystemView is provided on an "as is" basis, without warranty of any kind, including without limitation the warranties that it is free of defects, merchantable, fit for a particular purpose or non-infringing. This disclaimer of warranty constitutes an essential part of this agreement. No use of SystemView is authorized hereunder except under this disclaimer.
4. LIMITATION OF LIABILITY
To the maximum extent permitted by applicable law, in no event will SEGGER be liable for any indirect, special, incidental or consequential damages arising out of the use of or inability to use SystemView, including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, even if advised of the possibility thereof, and regardless of the legal or equitable theory (contract, tort or otherwise) upon which the claim is based. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not be applicable. In any case, SEGGER's entire liability shall not exceed in aggregate the sum of the fees YOU paid for SystemView (if any).
5. MISCELLANEOUS
(a) This agreement shall be governed by the laws of the Federal Republic of Germany. This agreement constitutes the entire agreement between the parties concerning the subject matter hereof.
(b) If any provision in this agreement should be held illegal or unenforceable by a court having jurisdiction, such provision shall be modified to the extent necessary to render it enforceable without losing its intent, or severed from this agreement if no such modification is possible, and other provisions of this agreement shall remain in full force and effect.This agreement may be changed only by an amendment in writing, signed by both parties.
(c) If any SEGGER professional services are being provided, then such professional services are provided pursuant to the terms of a separate agreement.
(c) 2004-2019 SEGGER Microcontroller GmbH
ADDITIONAL SOFTWARE
This sofware dynamically links against the Qt4 libraries distributed unter the GNU Lesser General Public License v.3 ("LGPL").
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -0,0 +1,423 @@
/* ###################################################################
** This component module is generated by Processor Expert. Do not modify it.
** Filename : McuSystemView.h
** Project : FRDM-K64F_Generator
** Processor : MK64FN1M0VLL12
** Component : SeggerSystemView
** Version : Component 01.074, Driver 01.00, CPU db: 3.00.000
** Compiler : GNU C Compiler
** Date/Time : 2023-04-10, 17:28, # CodeGen: 807
** Abstract :
** This component implements and integrates the SEGGER Systemview library for FreeRTOS.
** Settings :
** Component name : McuSystemView
** Version : V3.50a
** Application Name : "Demo Application"
** Device Name : "Cortex"
** RAM Base : 0x20000000
** ID Base : 0x10000000
** ID Shift : 2
** Number of tasks : 10
** Static Buffer : yes
** Post Mortem : no
** Implicit Format for printf() : no
** RTT Channel :
** Segger RTT : McuRTT
** Name : "SysView"
** Channel Index : 1
** Up Buffer size : 1024
** SDK : McuLib
** Source Folders :
** Source Folder : SEGGER_Sysview
** Config Folder : SEGGER_Sysview
** Contents :
** OnUserStart - void McuSystemView_OnUserStart(unsigned UserId);
** OnUserStop - void McuSystemView_OnUserStop(unsigned UserId);
** RecordEnterISR - void McuSystemView_RecordEnterISR(void);
** RecordExitISR - void McuSystemView_RecordExitISR(void);
** Print - void McuSystemView_Print(const char *s);
** PrintfHost - void McuSystemView_PrintfHost(const char *s, ...);
** PrintfTarget - void McuSystemView_PrintfTarget(const char *s, ...);
** Warn - void McuSystemView_Warn(const char *s);
** WarnfHost - void McuSystemView_WarnfHost(const char *s, ...);
** WarnfTarget - void McuSystemView_WarnfTarget(const char *s, ...);
** Error - void McuSystemView_Error(const char *s);
** ErrorfHost - void McuSystemView_ErrorfHost(const char *s, ...);
** ErrorfTarget - void McuSystemView_ErrorfTarget(const char *s, ...);
** EnableEvents - void McuSystemView_EnableEvents(uint32_t EnableMask);
** DisableEvents - void McuSystemView_DisableEvents(uint32_t DisableMask);
** Deinit - void McuSystemView_Deinit(void);
** Init - void McuSystemView_Init(void);
**
** * (c) Copyright Segger, 2020-2023
** * http : www.segger.com
** * See separate Segger licensing terms.
** *
** * Processor Expert port: Copyright (c) 2016-2019, Erich Styger
** * Web: https://mcuoneclipse.com
** * SourceForge: https://sourceforge.net/projects/mcuoneclipse
** * Git: https://github.com/ErichStyger/McuOnEclipse_PEx
** * All rights reserved.
** *
** * Redistribution and use in source and binary forms, with or without modification,
** * are permitted provided that the following conditions are met:
** *
** * - Redistributions of source code must retain the above copyright notice, this list
** * of conditions and the following disclaimer.
** *
** * - Redistributions in binary form must reproduce the above copyright notice, this
** * list of conditions and the following disclaimer in the documentation and/or
** * other materials provided with the distribution.
** *
** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
** * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
** * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
** ###################################################################*/
/*!
** @file McuSystemView.h
** @version 01.00
** @brief
** This component implements and integrates the SEGGER Systemview library for FreeRTOS.
*/
/*!
** @addtogroup McuSystemView_module McuSystemView module documentation
** @{
*/
/* MODULE McuSystemView. */
#include "McuSystemView.h"
/*
** ===================================================================
** Method : Init (component SeggerSystemView)
**
** Description :
** Driver Initialization
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
void McuSystemView_Init(void)
{
SEGGER_SYSVIEW_Conf(); /* initialize Segger System Viewer */
}
/*
** ===================================================================
** Method : OnUserStart (component SeggerSystemView)
**
** Description :
** Send a user event start, such as start of a subroutine for
** profiling.
** Parameters :
** NAME - DESCRIPTION
** UserId - User defined ID for the event
** Returns : Nothing
** ===================================================================
*/
/**
void McuSystemView_OnUserStart(unsigned UserId)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : OnUserStop (component SeggerSystemView)
**
** Description :
** Send a user event stop, such as return of a subroutine for
** profiling.
** Parameters :
** NAME - DESCRIPTION
** UserId - User defined ID for the event
** Returns : Nothing
** ===================================================================
*/
/**
void McuSystemView_OnUserStop(unsigned UserId)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : RecordEnterISR (component SeggerSystemView)
**
** Description :
** Records the enter of an ISR. Place this call at the
** beginning of the interrupt service routine.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_RecordEnterISR(void)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : RecordExitISR (component SeggerSystemView)
**
** Description :
** Records the end of the ISR. Call this function at the end of
** the ISR to be recorded.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_RecordExitISR(void)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : Print (component SeggerSystemView)
**
** Description :
** Prints a string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_Print(const char *s)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : Warn (component SeggerSystemView)
**
** Description :
** Prints a warning string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_Warn(const char *s)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : Error (component SeggerSystemView)
**
** Description :
** Prints an error string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_Error(const char *s)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : PrintfHost (component SeggerSystemView)
**
** Description :
** Prints a string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_PrintfHost(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : PrintfTarget (component SeggerSystemView)
**
** Description :
** Prints a string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_PrintfTarget(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : WarnfHost (component SeggerSystemView)
**
** Description :
** Prints a warning string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_WarnfHost(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : WarnfTarget (component SeggerSystemView)
**
** Description :
** Prints a warning string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_WarnfTarget(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : ErrorfHost (component SeggerSystemView)
**
** Description :
** Prints an error string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_ErrorfHost(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : ErrorfTarget (component SeggerSystemView)
**
** Description :
** Prints an error string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_ErrorfTarget(const char *s, ...)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : DisableEvents (component SeggerSystemView)
**
** Description :
** Disable standard SystemView events to not be generated.
** Parameters :
** NAME - DESCRIPTION
** DisableMask - Events to be disabled.
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_DisableEvents(uint32_t DisableMask)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : EnableEvents (component SeggerSystemView)
**
** Description :
** Enables standard SystemView events to be generated.
** Parameters :
** NAME - DESCRIPTION
** EnableMask - Events to be enabled
** Returns : Nothing
** ===================================================================
*/
/*
void McuSystemView_EnableEvents(uint32_t EnableMask)
{
Implemented as macro on the header file.
}
*/
/*
** ===================================================================
** Method : Deinit (component SeggerSystemView)
**
** Description :
** Driver de-initialization
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
void McuSystemView_Deinit(void)
{
/* nothing needed */
}
/* END McuSystemView. */
/*!
** @}
*/

View File

@@ -0,0 +1,369 @@
/* ###################################################################
** This component module is generated by Processor Expert. Do not modify it.
** Filename : McuSystemView.h
** Project : FRDM-K64F_Generator
** Processor : MK64FN1M0VLL12
** Component : SeggerSystemView
** Version : Component 01.074, Driver 01.00, CPU db: 3.00.000
** Compiler : GNU C Compiler
** Date/Time : 2023-04-10, 17:28, # CodeGen: 807
** Abstract :
** This component implements and integrates the SEGGER Systemview library for FreeRTOS.
** Settings :
** Component name : McuSystemView
** Version : V3.50a
** Application Name : "Demo Application"
** Device Name : "Cortex"
** RAM Base : 0x20000000
** ID Base : 0x10000000
** ID Shift : 2
** Number of tasks : 10
** Static Buffer : yes
** Post Mortem : no
** Implicit Format for printf() : no
** RTT Channel :
** Segger RTT : McuRTT
** Name : "SysView"
** Channel Index : 1
** Up Buffer size : 1024
** SDK : McuLib
** Source Folders :
** Source Folder : SEGGER_Sysview
** Config Folder : SEGGER_Sysview
** Contents :
** OnUserStart - void McuSystemView_OnUserStart(unsigned UserId);
** OnUserStop - void McuSystemView_OnUserStop(unsigned UserId);
** RecordEnterISR - void McuSystemView_RecordEnterISR(void);
** RecordExitISR - void McuSystemView_RecordExitISR(void);
** Print - void McuSystemView_Print(const char *s);
** PrintfHost - void McuSystemView_PrintfHost(const char *s, ...);
** PrintfTarget - void McuSystemView_PrintfTarget(const char *s, ...);
** Warn - void McuSystemView_Warn(const char *s);
** WarnfHost - void McuSystemView_WarnfHost(const char *s, ...);
** WarnfTarget - void McuSystemView_WarnfTarget(const char *s, ...);
** Error - void McuSystemView_Error(const char *s);
** ErrorfHost - void McuSystemView_ErrorfHost(const char *s, ...);
** ErrorfTarget - void McuSystemView_ErrorfTarget(const char *s, ...);
** EnableEvents - void McuSystemView_EnableEvents(uint32_t EnableMask);
** DisableEvents - void McuSystemView_DisableEvents(uint32_t DisableMask);
** Deinit - void McuSystemView_Deinit(void);
** Init - void McuSystemView_Init(void);
**
** * (c) Copyright Segger, 2020-2023
** * http : www.segger.com
** * See separate Segger licensing terms.
** *
** * Processor Expert port: Copyright (c) 2016-2019, Erich Styger
** * Web: https://mcuoneclipse.com
** * SourceForge: https://sourceforge.net/projects/mcuoneclipse
** * Git: https://github.com/ErichStyger/McuOnEclipse_PEx
** * All rights reserved.
** *
** * Redistribution and use in source and binary forms, with or without modification,
** * are permitted provided that the following conditions are met:
** *
** * - Redistributions of source code must retain the above copyright notice, this list
** * of conditions and the following disclaimer.
** *
** * - Redistributions in binary form must reproduce the above copyright notice, this
** * list of conditions and the following disclaimer in the documentation and/or
** * other materials provided with the distribution.
** *
** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
** * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
** * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
** ###################################################################*/
/*!
** @file McuSystemView.h
** @version 01.00
** @brief
** This component implements and integrates the SEGGER Systemview library for FreeRTOS.
*/
/*!
** @addtogroup McuSystemView_module McuSystemView module documentation
** @{
*/
#ifndef __McuSystemView_H
#define __McuSystemView_H
/* MODULE McuSystemView. */
#include "McuLib.h" /* SDK and API used */
#include "McuSystemViewconfig.h" /* configuration */
/* Include inherited components */
#include "McuRTT.h"
#include "McuLib.h"
#include "SEGGER_SYSVIEW.h"
void McuSystemView_Init(void);
/*
** ===================================================================
** Method : Init (component SeggerSystemView)
**
** Description :
** Driver Initialization
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_OnUserStart(UserId) \
SEGGER_SYSVIEW_OnUserStart(UserId)
/*
** ===================================================================
** Method : OnUserStart (component SeggerSystemView)
**
** Description :
** Send a user event start, such as start of a subroutine for
** profiling.
** Parameters :
** NAME - DESCRIPTION
** UserId - User defined ID for the event
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_OnUserStop(UserId) \
SEGGER_SYSVIEW_OnUserStop(UserId)
/*
** ===================================================================
** Method : OnUserStop (component SeggerSystemView)
**
** Description :
** Send a user event stop, such as return of a subroutine for
** profiling.
** Parameters :
** NAME - DESCRIPTION
** UserId - User defined ID for the event
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_RecordEnterISR() \
SEGGER_SYSVIEW_RecordEnterISR()
/*
** ===================================================================
** Method : RecordEnterISR (component SeggerSystemView)
**
** Description :
** Records the enter of an ISR. Place this call at the
** beginning of the interrupt service routine.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_RecordExitISR() \
SEGGER_SYSVIEW_RecordExitISR()
/*
** ===================================================================
** Method : RecordExitISR (component SeggerSystemView)
**
** Description :
** Records the end of the ISR. Call this function at the end of
** the ISR to be recorded.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_Print(s) \
SEGGER_SYSVIEW_Print(s)
/*
** ===================================================================
** Method : Print (component SeggerSystemView)
**
** Description :
** Prints a string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_Warn(s) \
SEGGER_SYSVIEW_Warn(s)
/*
** ===================================================================
** Method : Warn (component SeggerSystemView)
**
** Description :
** Prints a warning string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_Error(s) \
SEGGER_SYSVIEW_Error(s)
/*
** ===================================================================
** Method : Error (component SeggerSystemView)
**
** Description :
** Prints an error string to the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_PrintfHost SEGGER_SYSVIEW_PrintfHost
/*
** ===================================================================
** Method : PrintfHost (component SeggerSystemView)
**
** Description :
** Prints a string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_PrintfTarget SEGGER_SYSVIEW_PrintfTarget
/*
** ===================================================================
** Method : PrintfTarget (component SeggerSystemView)
**
** Description :
** Prints a string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_WarnfHost SEGGER_SYSVIEW_WarnfHost
/*
** ===================================================================
** Method : WarnfHost (component SeggerSystemView)
**
** Description :
** Prints a warning string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_WarnfTarget SEGGER_SYSVIEW_WarnfTarget
/*
** ===================================================================
** Method : WarnfTarget (component SeggerSystemView)
**
** Description :
** Prints a warning string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_ErrorfHost SEGGER_SYSVIEW_ErrorfHost
/*
** ===================================================================
** Method : ErrorfHost (component SeggerSystemView)
**
** Description :
** Prints an error string using printf() to the host which is
** processed on the host
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_ErrorfTarget SEGGER_SYSVIEW_ErrorfTarget
/*
** ===================================================================
** Method : ErrorfTarget (component SeggerSystemView)
**
** Description :
** Prints an error string using printf() to the host which is
** processed first on the target
** Parameters :
** NAME - DESCRIPTION
** * s - Pointer to string
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_DisableEvents(DisableMask) \
SEGGER_SYSVIEW_DisableEvents(DisableMask)
/*
** ===================================================================
** Method : DisableEvents (component SeggerSystemView)
**
** Description :
** Disable standard SystemView events to not be generated.
** Parameters :
** NAME - DESCRIPTION
** DisableMask - Events to be disabled.
** Returns : Nothing
** ===================================================================
*/
#define McuSystemView_EnableEvents(EnableMask) \
SEGGER_SYSVIEW_EnableEvents(EnableMask)
/*
** ===================================================================
** Method : EnableEvents (component SeggerSystemView)
**
** Description :
** Enables standard SystemView events to be generated.
** Parameters :
** NAME - DESCRIPTION
** EnableMask - Events to be enabled
** Returns : Nothing
** ===================================================================
*/
void McuSystemView_Deinit(void);
/*
** ===================================================================
** Method : Deinit (component SeggerSystemView)
**
** Description :
** Driver de-initialization
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/* END McuSystemView. */
#endif
/* ifndef __McuSystemView_H */
/*!
** @}
*/

View File

@@ -0,0 +1,83 @@
/**
* \file
* \brief Configuration header file for SeggerSystemView
* Copyright (c) 2020, Erich Styger
* SPDX-License-Identifier: BSD-3-Clause
*
* This header file is used to configure settings of the Segger SystemView module.
*/
#ifndef __McuSystemView_CONFIG_H
#define __McuSystemView_CONFIG_H
#ifndef McuSystemView_CONFIG_GENERATE_QUEUE_EVENTS
#define McuSystemView_CONFIG_GENERATE_QUEUE_EVENTS (1)
/*!< 1: events for queues are generated. 0: no queue events are generated */
#endif
#ifndef McuSystemView_CONFIG_GENERATE_ISR_EVENTS
#define McuSystemView_CONFIG_GENERATE_ISR_EVENTS (1)
/*!< 1: events for ISR are generated. 0: no ISR events are generated */
#endif
#ifndef McuSystemView_CONFIG_GENERATE_STREAMBUFFER_EVENTS
#define McuSystemView_CONFIG_GENERATE_STREAMBUFFER_EVENTS (1)
/*!< 1: events for Stream Buffer are generated. 0: no Stream Buffer events are generated */
#endif
#ifndef McuSystemView_CONFIG_GENERATE_STEPTICK_EVENTS
#define McuSystemView_CONFIG_GENERATE_STEPTICK_EVENTS (1)
/*!< 1: events for tickets steps are generated. 0: no ticket step events are generated */
#endif
#ifndef McuSystemView_CONFIG_USE_STATIC_BUFFER
#define McuSystemView_CONFIG_USE_STATIC_BUFFER (1)
/*!< 1: Use a static buffer to generate events instead of a buffer on the stack. 0: Use a buffer on the stack */
#endif
#ifndef McuSystemView_CONFIG_POST_MORTEM_MODE
#define McuSystemView_CONFIG_POST_MORTEM_MODE (0)
/*!< 1: Enable post mortem analysis. 0: do not use it in post-morem mode */
#endif
#ifndef McuSystemView_CONFIG_RTT_BUFFER_SIZE
#define McuSystemView_CONFIG_RTT_BUFFER_SIZE (1024)
/*!< Buffer size of RTT buffer, default 1024 */
#endif
#ifndef McuSystemView_CONFIG_RTT_CHANNEL
#define McuSystemView_CONFIG_RTT_CHANNEL (1)
/*!< RTT channel to be used (default 1) */
#endif
#ifndef McuSystemView_CONFIG_SYSVIEW_RAM_BASE
#define McuSystemView_CONFIG_SYSVIEW_RAM_BASE (0x20000000)
/*!< lowest RAM address used */
#endif
#ifndef McuSystemView_CONFIG_SYSVIEW_CONFIG_CALLBACK
//#define McuSystemView_CONFIG_SYSVIEW_CONFIG_CALLBACK _cbSendSystemDesc
/*!< Custom SystemView configuration callback, default is _cbSendSystemDesc() */
#endif
// The application name to be displayed in SystemViewer
#ifndef SYSVIEW_APP_NAME
#define SYSVIEW_APP_NAME "Application" /* application name, configured in properties */
#endif
#define SYSVIEW_USING_PEX (McuLib_CONFIG_PEX_SDK_USED) /* 1: project is a Kinetis SDK Processor Expert project; 0: No Kinetis Processor Expert project */
#define SYSVIEW_USING_FREERTOS (McuLib_CONFIG_SDK_USE_FREERTOS) /* 1: using FreeRTOS; 0: Bare metal */
#ifndef SYSVIEW_OS_NAME
#if SYSVIEW_USING_FREERTOS
#define SYSVIEW_OS_NAME "FreeRTOS"
#else
#define SYSVIEW_OS_NAME "Bare-metal"
#endif
#endif
// The target device name
#ifndef SYSVIEW_DEVICE_NAME
#define SYSVIEW_DEVICE_NAME "Cortex" /* device name, configured in properties */
#endif
#endif /* __McuSystemView_CONFIG_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,441 @@
/** Copyright (C) SEGGER Microcontroller GmbH */ /* << EST */
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW.h
Purpose : System visualization API.
Revision: $Rev: 28768 $
*/
#ifndef SEGGER_SYSVIEW_H
#define SEGGER_SYSVIEW_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#if 1 /* << EST */
#include <stdint.h>
#include <stdarg.h>
typedef uint8_t U8;
typedef int32_t I32;
typedef uint32_t U32;
typedef uint64_t U64;
#else
#include "SEGGER.h"
#endif
#include "SEGGER_SYSVIEW_ConfDefaults.h"
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
#define SEGGER_SYSVIEW_MAJOR 3
#define SEGGER_SYSVIEW_MINOR 32
#define SEGGER_SYSVIEW_REV 0
#define SEGGER_SYSVIEW_VERSION ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV)
#define SEGGER_SYSVIEW_INFO_SIZE 9 // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2 byte of payload length, 1-5 bytes of timestamp.
#define SEGGER_SYSVIEW_QUANTA_U32 5 // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet.
#define SEGGER_SYSVIEW_LOG (0u)
#define SEGGER_SYSVIEW_WARNING (1u)
#define SEGGER_SYSVIEW_ERROR (2u)
#define SEGGER_SYSVIEW_FLAG_APPEND (1u << 6)
#define SEGGER_SYSVIEW_PREPARE_PACKET(p) (p) + 4
//
// SystemView events. First 32 IDs from 0 .. 31 are reserved for these
//
#define SYSVIEW_EVTID_NOP 0 // Dummy packet.
#define SYSVIEW_EVTID_OVERFLOW 1
#define SYSVIEW_EVTID_ISR_ENTER 2
#define SYSVIEW_EVTID_ISR_EXIT 3
#define SYSVIEW_EVTID_TASK_START_EXEC 4
#define SYSVIEW_EVTID_TASK_STOP_EXEC 5
#define SYSVIEW_EVTID_TASK_START_READY 6
#define SYSVIEW_EVTID_TASK_STOP_READY 7
#define SYSVIEW_EVTID_TASK_CREATE 8
#define SYSVIEW_EVTID_TASK_INFO 9
#define SYSVIEW_EVTID_TRACE_START 10
#define SYSVIEW_EVTID_TRACE_STOP 11
#define SYSVIEW_EVTID_SYSTIME_CYCLES 12
#define SYSVIEW_EVTID_SYSTIME_US 13
#define SYSVIEW_EVTID_SYSDESC 14
#define SYSVIEW_EVTID_MARK_START 15
#define SYSVIEW_EVTID_MARK_STOP 16
#define SYSVIEW_EVTID_IDLE 17
#define SYSVIEW_EVTID_ISR_TO_SCHEDULER 18
#define SYSVIEW_EVTID_TIMER_ENTER 19
#define SYSVIEW_EVTID_TIMER_EXIT 20
#define SYSVIEW_EVTID_STACK_INFO 21
#define SYSVIEW_EVTID_MODULEDESC 22
#define SYSVIEW_EVTID_DATA_SAMPLE 23
#define SYSVIEW_EVTID_INIT 24
#define SYSVIEW_EVTID_NAME_RESOURCE 25
#define SYSVIEW_EVTID_PRINT_FORMATTED 26
#define SYSVIEW_EVTID_NUMMODULES 27
#define SYSVIEW_EVTID_END_CALL 28
#define SYSVIEW_EVTID_TASK_TERMINATE 29
#define SYSVIEW_EVTID_EX 31
//
// SystemView extended events. Sent with ID 31.
//
#define SYSVIEW_EVTID_EX_MARK 0
#define SYSVIEW_EVTID_EX_NAME_MARKER 1
#define SYSVIEW_EVTID_EX_HEAP_DEFINE 2
#define SYSVIEW_EVTID_EX_HEAP_ALLOC 3
#define SYSVIEW_EVTID_EX_HEAP_ALLOC_EX 4
#define SYSVIEW_EVTID_EX_HEAP_FREE 5
#define SYSVIEW_EVTID_EX_REGISTER_DATA 6
//
// Event masks to disable/enable events
//
#define SYSVIEW_EVTMASK_NOP (1 << SYSVIEW_EVTID_NOP)
#define SYSVIEW_EVTMASK_OVERFLOW (1 << SYSVIEW_EVTID_OVERFLOW)
#define SYSVIEW_EVTMASK_ISR_ENTER (1 << SYSVIEW_EVTID_ISR_ENTER)
#define SYSVIEW_EVTMASK_ISR_EXIT (1 << SYSVIEW_EVTID_ISR_EXIT)
#define SYSVIEW_EVTMASK_TASK_START_EXEC (1 << SYSVIEW_EVTID_TASK_START_EXEC)
#define SYSVIEW_EVTMASK_TASK_STOP_EXEC (1 << SYSVIEW_EVTID_TASK_STOP_EXEC)
#define SYSVIEW_EVTMASK_TASK_START_READY (1 << SYSVIEW_EVTID_TASK_START_READY)
#define SYSVIEW_EVTMASK_TASK_STOP_READY (1 << SYSVIEW_EVTID_TASK_STOP_READY)
#define SYSVIEW_EVTMASK_TASK_CREATE (1 << SYSVIEW_EVTID_TASK_CREATE)
#define SYSVIEW_EVTMASK_TASK_INFO (1 << SYSVIEW_EVTID_TASK_INFO)
#define SYSVIEW_EVTMASK_TRACE_START (1 << SYSVIEW_EVTID_TRACE_START)
#define SYSVIEW_EVTMASK_TRACE_STOP (1 << SYSVIEW_EVTID_TRACE_STOP)
#define SYSVIEW_EVTMASK_SYSTIME_CYCLES (1 << SYSVIEW_EVTID_SYSTIME_CYCLES)
#define SYSVIEW_EVTMASK_SYSTIME_US (1 << SYSVIEW_EVTID_SYSTIME_US)
#define SYSVIEW_EVTMASK_SYSDESC (1 << SYSVIEW_EVTID_SYSDESC)
#define SYSVIEW_EVTMASK_USER_START (1 << SYSVIEW_EVTID_USER_START)
#define SYSVIEW_EVTMASK_USER_STOP (1 << SYSVIEW_EVTID_USER_STOP)
#define SYSVIEW_EVTMASK_IDLE (1 << SYSVIEW_EVTID_IDLE)
#define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER)
#define SYSVIEW_EVTMASK_TIMER_ENTER (1 << SYSVIEW_EVTID_TIMER_ENTER)
#define SYSVIEW_EVTMASK_TIMER_EXIT (1 << SYSVIEW_EVTID_TIMER_EXIT)
#define SYSVIEW_EVTMASK_STACK_INFO (1 << SYSVIEW_EVTID_STACK_INFO)
#define SYSVIEW_EVTMASK_MODULEDESC (1 << SYSVIEW_EVTID_MODULEDESC)
#define SYSVIEW_EVTMASK_DATA_SAMPLE (1 << SYSVIEW_EVTID_DATA_SAMPLE)
#define SYSVIEW_EVTMASK_INIT (1 << SYSVIEW_EVTID_INIT)
#define SYSVIEW_EVTMASK_NAME_RESOURCE (1 << SYSVIEW_EVTID_NAME_RESOURCE)
#define SYSVIEW_EVTMASK_PRINT_FORMATTED (1 << SYSVIEW_EVTID_PRINT_FORMATTED)
#define SYSVIEW_EVTMASK_NUMMODULES (1 << SYSVIEW_EVTID_NUMMODULES)
#define SYSVIEW_EVTMASK_END_CALL (1 << SYSVIEW_EVTID_END_CALL)
#define SYSVIEW_EVTMASK_TASK_TERMINATE (1 << SYSVIEW_EVTID_TASK_TERMINATE)
#define SYSVIEW_EVTMASK_EX (1 << SYSVIEW_EVTID_EX)
#define SYSVIEW_EVTMASK_ALL_INTERRUPTS ( SYSVIEW_EVTMASK_ISR_ENTER \
| SYSVIEW_EVTMASK_ISR_EXIT \
| SYSVIEW_EVTMASK_ISR_TO_SCHEDULER)
#define SYSVIEW_EVTMASK_ALL_TASKS ( SYSVIEW_EVTMASK_TASK_START_EXEC \
| SYSVIEW_EVTMASK_TASK_STOP_EXEC \
| SYSVIEW_EVTMASK_TASK_START_READY \
| SYSVIEW_EVTMASK_TASK_STOP_READY \
| SYSVIEW_EVTMASK_TASK_CREATE \
| SYSVIEW_EVTMASK_TASK_INFO \
| SYSVIEW_EVTMASK_STACK_INFO \
| SYSVIEW_EVTMASK_TASK_TERMINATE)
/*********************************************************************
*
* Structures
*
**********************************************************************
*/
typedef struct {
U32 TaskID;
const char* sName;
U32 Prio;
U32 StackBase;
U32 StackSize;
U32 StackUsage;
} SEGGER_SYSVIEW_TASKINFO;
typedef struct {
U32 TaskID;
U32 StackBase;
U32 StackSize;
U32 StackUsage;
} SEGGER_SYSVIEW_STACKINFO;
typedef struct {
U32 ID;
union {
U32* pU32_Value;
I32* pI32_Value;
float* pFloat_Value;
} pValue;
} SEGGER_SYSVIEW_DATA_SAMPLE;
typedef enum {
SEGGER_SYSVIEW_TYPE_U32 = 0,
SEGGER_SYSVIEW_TYPE_I32 = 1,
SEGGER_SYSVIEW_TYPE_FLOAT = 2
} SEGGER_SYSVIEW_DATA_TYPE;
typedef struct {
U32 ID;
SEGGER_SYSVIEW_DATA_TYPE DataType;
I32 Offset;
I32 RangeMin;
I32 RangeMax;
float ScalingFactor;
const char* sName;
const char* sUnit;
} SEGGER_SYSVIEW_DATA_REGISTER;
typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE;
struct SEGGER_SYSVIEW_MODULE_STRUCT {
const char* sModule;
U32 NumEvents;
U32 EventOffset;
void (*pfSendModuleDesc)(void);
SEGGER_SYSVIEW_MODULE* pNext;
};
typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void);
/*********************************************************************
*
* Global data
*
**********************************************************************
*/
#if 1 /* << EST */
extern unsigned int SEGGER_SYSVIEW_TickCnt;
extern unsigned int SEGGER_SYSVIEW_InterruptId;
#else
#ifdef EXTERN
#undef EXTERN
#endif
#ifndef SEGGER_SYSVIEW_C // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files
#define EXTERN extern
#else
#define EXTERN
#endif
EXTERN unsigned int SEGGER_SYSVIEW_TickCnt;
EXTERN unsigned int SEGGER_SYSVIEW_InterruptId;
#undef EXTERN
#endif /* << EST */
/*********************************************************************
*
* API functions
*
**********************************************************************
*/
typedef struct {
U64 (*pfGetTime) (void);
void (*pfSendTaskList) (void);
} SEGGER_SYSVIEW_OS_API;
/*********************************************************************
*
* Control and initialization functions
*/
void SEGGER_SYSVIEW_Init (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc);
void SEGGER_SYSVIEW_SetRAMBase (U32 RAMBaseAddress);
void SEGGER_SYSVIEW_Start (void);
void SEGGER_SYSVIEW_Stop (void);
void SEGGER_SYSVIEW_GetSysDesc (void);
void SEGGER_SYSVIEW_SendTaskList (void);
void SEGGER_SYSVIEW_SendTaskInfo (const SEGGER_SYSVIEW_TASKINFO* pInfo);
void SEGGER_SYSVIEW_SendStackInfo (const SEGGER_SYSVIEW_STACKINFO* pInfo);
void SEGGER_SYSVIEW_SendSysDesc (const char* sSysDesc);
int SEGGER_SYSVIEW_IsStarted (void);
int SEGGER_SYSVIEW_GetChannelID (void);
void SEGGER_SYSVIEW_SampleData (const SEGGER_SYSVIEW_DATA_SAMPLE *pInfo);
/*********************************************************************
*
* Event recording functions
*/
void SEGGER_SYSVIEW_RecordVoid (unsigned int EventId);
void SEGGER_SYSVIEW_RecordU32 (unsigned int EventId, U32 Para0);
void SEGGER_SYSVIEW_RecordU32x2 (unsigned int EventId, U32 Para0, U32 Para1);
void SEGGER_SYSVIEW_RecordU32x3 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2);
void SEGGER_SYSVIEW_RecordU32x4 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3);
void SEGGER_SYSVIEW_RecordU32x5 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4);
void SEGGER_SYSVIEW_RecordU32x6 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5);
void SEGGER_SYSVIEW_RecordU32x7 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6);
void SEGGER_SYSVIEW_RecordU32x8 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7);
void SEGGER_SYSVIEW_RecordU32x9 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8);
void SEGGER_SYSVIEW_RecordU32x10 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9);
void SEGGER_SYSVIEW_RecordString (unsigned int EventId, const char* pString);
void SEGGER_SYSVIEW_RecordSystime (void);
void SEGGER_SYSVIEW_RecordEnterISR (void);
void SEGGER_SYSVIEW_RecordExitISR (void);
void SEGGER_SYSVIEW_RecordExitISRToScheduler (void);
void SEGGER_SYSVIEW_RecordEnterTimer (U32 TimerId);
void SEGGER_SYSVIEW_RecordExitTimer (void);
void SEGGER_SYSVIEW_RecordEndCall (unsigned int EventID);
void SEGGER_SYSVIEW_RecordEndCallU32 (unsigned int EventID, U32 Para0);
void SEGGER_SYSVIEW_OnIdle (void);
void SEGGER_SYSVIEW_OnTaskCreate (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskTerminate (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStartExec (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStopExec (void);
void SEGGER_SYSVIEW_OnTaskStartReady (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStopReady (U32 TaskId, unsigned int Cause);
void SEGGER_SYSVIEW_MarkStart (unsigned int MarkerId);
void SEGGER_SYSVIEW_MarkStop (unsigned int MarkerId);
void SEGGER_SYSVIEW_Mark (unsigned int MarkerId);
void SEGGER_SYSVIEW_NameMarker (unsigned int MarkerId, const char* sName);
void SEGGER_SYSVIEW_HeapDefine (void* pHeap, void* pBase, unsigned int HeapSize, unsigned int MetadataSize);
void SEGGER_SYSVIEW_HeapAlloc (void* pHeap, void* pUserData, unsigned int UserDataLen);
void SEGGER_SYSVIEW_HeapAllocEx (void* pHeap, void* pUserData, unsigned int UserDataLen, unsigned int Tag);
void SEGGER_SYSVIEW_HeapFree (void* pHeap, void* pUserData);
void SEGGER_SYSVIEW_NameResource (U32 ResourceId, const char* sName);
void SEGGER_SYSVIEW_RegisterData ( SEGGER_SYSVIEW_DATA_REGISTER* pInfo);
int SEGGER_SYSVIEW_SendPacket (U8* pPacket, U8* pPayloadEnd, unsigned int EventId);
/*********************************************************************
*
* Event parameter encoding functions
*/
U8* SEGGER_SYSVIEW_EncodeU32 (U8* pPayload, U32 Value);
U8* SEGGER_SYSVIEW_EncodeData (U8* pPayload, const char* pSrc, unsigned int Len);
U8* SEGGER_SYSVIEW_EncodeString (U8* pPayload, const char* s, unsigned int MaxLen);
U8* SEGGER_SYSVIEW_EncodeId (U8* pPayload, U32 Id);
U32 SEGGER_SYSVIEW_ShrinkId (U32 Id);
/*********************************************************************
*
* Middleware module registration
*/
void SEGGER_SYSVIEW_RegisterModule (SEGGER_SYSVIEW_MODULE* pModule);
void SEGGER_SYSVIEW_RecordModuleDescription (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription);
void SEGGER_SYSVIEW_SendModule (U8 ModuleId);
void SEGGER_SYSVIEW_SendModuleDescription (void);
void SEGGER_SYSVIEW_SendNumModules (void);
/*********************************************************************
*
* printf-Style functions
*/
#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list
void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...);
void SEGGER_SYSVIEW_VPrintfHostEx (const char* s, U32 Options, va_list* pParamList);
void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...);
void SEGGER_SYSVIEW_VPrintfTargetEx (const char* s, U32 Options, va_list* pParamList);
void SEGGER_SYSVIEW_PrintfHost (const char* s, ...);
void SEGGER_SYSVIEW_VPrintfHost (const char* s, va_list* pParamList);
void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...);
void SEGGER_SYSVIEW_VPrintfTarget (const char* s, va_list* pParamList);
void SEGGER_SYSVIEW_WarnfHost (const char* s, ...);
void SEGGER_SYSVIEW_VWarnfHost (const char* s, va_list* pParamList);
void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...);
void SEGGER_SYSVIEW_VWarnfTarget (const char* s, va_list* pParamList);
void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...);
void SEGGER_SYSVIEW_VErrorfHost (const char* s, va_list* pParamList);
void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...);
void SEGGER_SYSVIEW_VErrorfTarget (const char* s, va_list* pParamList);
#endif
void SEGGER_SYSVIEW_Print (const char* s);
void SEGGER_SYSVIEW_Warn (const char* s);
void SEGGER_SYSVIEW_Error (const char* s);
/*********************************************************************
*
* Run-time configuration functions
*/
void SEGGER_SYSVIEW_EnableEvents (U32 EnableMask);
void SEGGER_SYSVIEW_DisableEvents (U32 DisableMask);
/*********************************************************************
*
* Application-provided functions
*/
void SEGGER_SYSVIEW_Conf (void);
U32 SEGGER_SYSVIEW_X_GetTimestamp (void);
U32 SEGGER_SYSVIEW_X_GetInterruptId (void);
void SEGGER_SYSVIEW_X_StartComm (void);
void SEGGER_SYSVIEW_X_OnEventRecorded (unsigned NumBytes);
#ifdef __cplusplus
}
#endif
/*********************************************************************
*
* Compatibility API defines
*/
#define SEGGER_SYSVIEW_OnUserStart SEGGER_SYSVIEW_MarkStart
#define SEGGER_SYSVIEW_OnUserStop SEGGER_SYSVIEW_MarkStop
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,227 @@
/** Copyright (C) SEGGER Microcontroller GmbH */ /* << EST */
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Conf.h
Purpose : SEGGER SystemView configuration file.
Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here.
Revision: $Rev: 21292 $
Additional information:
Required defines which must be set are:
SEGGER_SYSVIEW_GET_TIMESTAMP
SEGGER_SYSVIEW_GET_INTERRUPT_ID
For known compilers and cores, these might be set to good defaults
in SEGGER_SYSVIEW_ConfDefaults.h.
SystemView needs a (nestable) locking mechanism.
If not defined, the RTT locking mechanism is used,
which then needs to be properly configured.
*/
#ifndef SEGGER_SYSVIEW_CONF_H
#define SEGGER_SYSVIEW_CONF_H
#include "SEGGER_RTT_Conf.h" /* << EST */
#include "McuSystemViewconfig.h" /* << EST configuration */
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
//
// Constants for known core configuration
//
#define SEGGER_SYSVIEW_CORE_OTHER 0
#define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1
#define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7
#define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX
#if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (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__))
#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__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__CC_ARM)
#if (defined(__TARGET_ARCH_6S_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__TI_ARM__)
#ifdef __TI_ARM_V6M0__
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__ICCRX__)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#elif defined(__RX)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#endif
#ifndef SEGGER_SYSVIEW_CORE
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_OTHER
#endif
#ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED
#define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes) // Needed for SystemView via non-J-Link Recorder. Macro to enable the UART or notify IP task.
#endif
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
/*********************************************************************
*
* SystemView buffer configuration
*/
#ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE
//#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024 // Number of bytes that SystemView uses for the buffer.
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE McuSystemView_CONFIG_RTT_BUFFER_SIZE // << EST: Number of bytes that SystemView uses for the buffer.
#endif
#ifndef SEGGER_SYSVIEW_RTT_CHANNEL
//#define SEGGER_SYSVIEW_RTT_CHANNEL 1 // The RTT channel that SystemView will use. 0: Auto selection
#define SEGGER_SYSVIEW_RTT_CHANNEL McuSystemView_CONFIG_RTT_CHANNEL // << EST: The RTT channel that SystemView will use. 0: Auto selection
#if configUSE_SEGGER_SYSTEM_VIEWER_HOOKS && SEGGER_SYSVIEW_RTT_CHANNEL>=SEGGER_RTT_MAX_NUM_UP_BUFFERS /* << EST */
#error "Not enough RTT buffers allocated in SEGGER_RTT_Conf.h!"
#endif
#endif
#ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER
// #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1 // Use a static buffer to generate events instead of a buffer on the stack
#define SEGGER_SYSVIEW_USE_STATIC_BUFFER McuSystemView_CONFIG_USE_STATIC_BUFFER // << EST: 1: Use a static buffer to generate events instead of a buffer on the stack
#endif
#ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE
//#define SEGGER_SYSVIEW_POST_MORTEM_MODE 0 // 1: Enable post mortem analysis mode
#define SEGGER_SYSVIEW_POST_MORTEM_MODE McuSystemView_CONFIG_POST_MORTEM_MODE // << EST: 1: Enable post mortem analysis mode
#endif
#ifndef SEGGER_SYSVIEW_CAN_RESTART
#define SEGGER_SYSVIEW_CAN_RESTART 1 // 1: Send the SystemView start sequence on every start command, not just on the first. Enables restart when SystemView Application disconnected unexpectedly.
#endif
/*********************************************************************
*
* SystemView timestamp configuration
*/
#if !defined(SEGGER_SYSVIEW_GET_TIMESTAMP) && !defined(SEGGER_SYSVIEW_TIMESTAMP_BITS)
#if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3
#define SEGGER_SYSVIEW_TIMESTAMP_SHIFT 4 /* << EST */
//#define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter.
#define SEGGER_SYSVIEW_GET_TIMESTAMP() ((*(U32 *)(0xE0001004))>>SEGGER_SYSVIEW_TIMESTAMP_SHIFT) // << EST: Retrieve a system timestamp. Cortex-M cycle counter. Shifted by 4 to save bandwith.
#define SEGGER_SYSVIEW_TIMESTAMP_BITS 32 // Define number of valid bits low-order delivered by clock source
#else
#define SEGGER_SYSVIEW_TIMESTAMP_SHIFT 0 /* << EST */
#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function
#define SEGGER_SYSVIEW_TIMESTAMP_BITS 32 // Define number of valid bits low-order delivered by SEGGER_SYSVIEW_X_GetTimestamp()
#endif
#endif
/*********************************************************************
*
* SystemView Id configuration
*/
#ifndef SEGGER_SYSVIEW_ID_BASE
//#define SEGGER_SYSVIEW_ID_BASE 0x10000000 // Default value for the lowest Id reported by the application. Can be overridden by the application via SEGGER_SYSVIEW_SetRAMBase(). (i.e. 0x20000000 when all Ids are an address in this RAM)
#define SEGGER_SYSVIEW_ID_BASE (0x10000000) // << EST: Default value for the lowest Id reported by the application. Can be overridden by the application via SEGGER_SYSVIEW_SetRAMBase(). (i.e. 0x20000000 when all Ids are an address in this RAM)
#endif
#ifndef SEGGER_SYSVIEW_ID_SHIFT
//#define SEGGER_SYSVIEW_ID_SHIFT 2 // Number of bits to shift the Id to save bandwidth. (i.e. 2 when Ids are 4 byte aligned)
#define SEGGER_SYSVIEW_ID_SHIFT (2) // << EST: Number of bits to shift the Id to save bandwidth. (i.e. 2 when Ids are 4 byte aligned)
#endif
/*********************************************************************
*
* SystemView interrupt configuration
*/
#ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID
#if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector)
#elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0
#if defined(__ICCARM__)
#if (__VER__ > 6010000)
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead.
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access.
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector)
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function.
#endif
#endif
#if 1 /* << EST */
uint32_t SEGGER_uxGetTickCounterValue(void);
#define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0
#endif /* << EST */
#endif // SEGGER_SYSVIEW_CONF_H
/*************************** End of file ****************************/

View File

@@ -0,0 +1,581 @@
/** Copyright (C) SEGGER Microcontroller GmbH */ /* << EST */
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_ConfDefaults.h
Purpose : Defines defaults for configurable defines used in
SEGGER SystemView.
Revision: $Rev: 26230 $
*/
#ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H
#define SEGGER_SYSVIEW_CONFDEFAULTS_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "SEGGER_SYSVIEW_Conf.h"
#include "SEGGER_RTT_Conf.h"
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
//
// Use auto-detection for SEGGER_SYSVIEW_CORE define
// based on compiler-/toolchain-specific defines
// to define SEGGER_SYSVIEW_GET_INTERRUPT_ID and SEGGER_SYSVIEW_GET_TIMESTAMP
//
#define SEGGER_SYSVIEW_CORE_OTHER 0
#define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1
#define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7
#define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX
#ifndef SEGGER_SYSVIEW_CORE
#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__))
#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__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__CC_ARM)
#if (defined(__TARGET_ARCH_6S_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__TI_ARM__)
#ifdef __TI_ARM_V6M0__
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__ICCRX__)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#elif defined(__RX)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#endif
#ifndef SEGGER_SYSVIEW_CORE
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_OTHER
#endif
#endif
/*********************************************************************
*
* Defines, defaults
*
**********************************************************************
*/
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_APP_NAME
*
* Description
* The application name to be displayed in SystemView.
* Default
* "SystemView-enabled Application"
* Notes
* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
*/
#ifndef SEGGER_SYSVIEW_APP_NAME
#define SEGGER_SYSVIEW_APP_NAME "SystemView-enabled Application"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_DEVICE_NAME
*
* Description
* The target device name to be displayed in SystemView.
* Default
* "undefined device"
* Notes
* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
*/
#ifndef SEGGER_SYSVIEW_DEVICE_NAME
#define SEGGER_SYSVIEW_DEVICE_NAME "undefined device"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_GET_INTERRUPT_ID()
*
* Description
* Function macro to retrieve the Id of the currently active
* interrupt.
* Default
* Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId().
* Notes
* For some known compilers and cores, a ready-to-use, core-specific
* default is set.
* ARMv7M: Read ICSR[8:0] (active vector)
* ARMv6M: Read ICSR[5:0] (active vector)
*/
#ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID
#if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector)
#elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0
#if defined(__ICCARM__)
#if (__VER__ > 6010000)
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead.
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access.
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector)
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function.
#endif
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_GET_TIMESTAMP()
*
* Description
* Function macro to retrieve a system timestamp for SYSVIEW events.
* Default
* Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp().
* Notes
* For some known compilers and cores, a ready-to-use, core-specific
* default is set.
* ARMv7M: Read Cortex-M Cycle Count register.
*
* The system timestamp clock frequency has to be passed in
* SEGGER_SYSVIEW_Init().
*/
#ifndef SEGGER_SYSVIEW_GET_TIMESTAMP
#if defined (SEGGER_SYSVIEW_CORE) && (SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3)
#define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter.
#else
#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function
#endif
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_TIMESTAMP_BITS
*
* Description
* Number of valid (low-order) bits delivered in system timestamp.
* Default
* 32
* Notes
* Value has to match system timestamp clock source.
*/
// Define number of valid bits low-order delivered by clock source.
#ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS
#define SEGGER_SYSVIEW_TIMESTAMP_BITS 32
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_RTT_CHANNEL
*
* Description
* The RTT channel that SystemView will use.
* Default
* 0: Auto selection.
* Notes
* Value has to be lower than SEGGER_RTT_MAX_NUM_UP_BUFFERS.
*/
#ifndef SEGGER_SYSVIEW_RTT_CHANNEL
#define SEGGER_SYSVIEW_RTT_CHANNEL 0
#endif
// Sanity check of RTT channel
#if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2)
#error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!"
#elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS)
#error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_RTT_BUFFER_SIZE
*
* Description
* Number of bytes that SystemView uses for the RTT buffer.
* Default
* 1024
*/
#ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE
#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
*
* Description
* Largest cache line size (in bytes) in the target system.
* Default
* 0
* Notes
* Required in systems with caches to make sure that the SystemView
* RTT buffer can be aligned accordingly.
*/
#ifndef SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE
#define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ID_BASE
*
* Description
* Lowest Id reported by the application.
* Default
* 0
* Notes
* Value is usually subtracted from mailboxes, semaphores, tasks,
* .... addresses, to compress event parameters.
* Should be the lowest RAM address of the system.
*/
#ifndef SEGGER_SYSVIEW_ID_BASE
#define SEGGER_SYSVIEW_ID_BASE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ID_SHIFT
*
* Description
* Number of bits to shift Ids.
* Default
* 0
* Notes
* Ids are shifted to compress event parameters.
* Should match the alignment of Ids (addresses),
* e.g. 2 when Ids are 4 byte aligned.
*/
#ifndef SEGGER_SYSVIEW_ID_SHIFT
#define SEGGER_SYSVIEW_ID_SHIFT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_ARGUMENTS
*
* Description
* Maximum number of arguments which are handled with SystemView
* print routines or may be encoded in one recording function.
* routines.
* Default
* 16
*/
#ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS
#define SEGGER_SYSVIEW_MAX_ARGUMENTS 16
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_STRING_LEN
*
* Description
* Maximum string length which can be used in SystemView print and
* system description routines.
* Default
* 128
*/
#ifndef SEGGER_SYSVIEW_MAX_STRING_LEN
#define SEGGER_SYSVIEW_MAX_STRING_LEN 128
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SUPPORT_LONG_ID
*
* Description
* It set, support enconding Evend Ids longer than 14 bit.
* Default
* 1
*/
#ifndef SEGGER_SYSVIEW_SUPPORT_LONG_ID
#define SEGGER_SYSVIEW_SUPPORT_LONG_ID 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SUPPORT_LONG_DATA
*
* Description
* It set, support enconding event data longer than 14 bit.
* Default
* 0
*/
#ifndef SEGGER_SYSVIEW_SUPPORT_LONG_DATA
#define SEGGER_SYSVIEW_SUPPORT_LONG_DATA 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
*
* Description
* If enabled, on SEGGER_SYSVIEW_PrintHost, check the format string
* and if it includes unsupported formatters, use formatting on the
* target instead.
* Default
* 0: Disabled.
*/
#ifndef SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
#define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
*
* Description
* If set, an internal recorder, such as UART or IP is used.
* Default
* 0: Disabled.
* Notes
* Convenience define to be used by SEGGER_SYSVIEW_Conf(),
* such as in embOS configuration to enable Cortex-M cycle counter.
*/
#ifndef SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
#define SEGGER_SYSVIEW_USE_INTERNAL_RECORDER 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_CAN_RESTART
*
* Description
* If enabled, send the SystemView start sequence on every start
* command, not just on the first one.
* Enables restart when SystemView disconnected unexpectedly.
* Default
* 1: Enabled
*/
#ifndef SEGGER_SYSVIEW_CAN_RESTART
#define SEGGER_SYSVIEW_CAN_RESTART 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_START_ON_INIT
*
* Description
* Enable calling SEGGER_SYSVIEW_Start() after initialization.
* Default
* 0: Disabled.
* Notes
* Convenience define to be used by SEGGER_SYSVIEW_Conf(),
* such as in embOS configuration.
*/
#ifndef SEGGER_SYSVIEW_START_ON_INIT
#define SEGGER_SYSVIEW_START_ON_INIT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_USE_STATIC_BUFFER
*
* Description
* If enabled, use a static buffer instead of a buffer on the stack
* for SystemView event packets.
* Default
* 1: Enabled.
* Notes
* If enabled, the static memory use by SystemView is increased by
* the maximum packet size. SystemView is locked on entry of a
* recording function.
* If disabled, the stack usage by SystemView recording functions
* might be increased by up to the maximum packet size. SystemView
* is locked when writing the packet to the RTT buffer.
*/
#ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER
#define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_PACKET_SIZE
*
* Description
* Maximum packet size for a SystemView event.
* Default
* Automatically calculated.
* Notes
* The maximum packet size is mainly defined by the maximum string
* length and the maximum number of arguments.
*/
#ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE
#define SEGGER_SYSVIEW_MAX_PACKET_SIZE (SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32)
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_POST_MORTEM_MODE
*
* Description
* If enabled, SystemView records for post-mortem analysis instead
* of real-time analysis.
* Default
* 0: Disabled.
* Notes
* For more information refer to
* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
*/
#ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE
#define SEGGER_SYSVIEW_POST_MORTEM_MODE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
*
* Description
* Configure how frequently syncronization is sent in post-mortem
* mode.
* Default
* 8: (1 << 8) = Every 256 Events.
* Notes
* In post-mortem mode, at least one sync has to be in the RTT buffer.
* Recommended sync frequency: Buffer Size / 16
* For more information refer to
* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
*/
#ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
#define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ON_EVENT_RECORDED()
*
* Description
* Function macro to notify recorder about a new event in buffer.
* Default
* undefined: Do not notify recorder.
* Notes
* Used for non-J-Link recorder,
* such as to enable transmission via UART or notify IP task.
*/
#ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED
#define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes)
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_LOCK()
*
* Description
* Function macro to (nestable) lock SystemView recording.
* Default
* Use RTT Locking mechanism (defined by SEGGER_RTT_LOCK()).
* Notes
* If SystemView recording is not locked, recording events from
* interrupts and tasks may lead to unpredictable, undefined, event
* data.
*/
#ifndef SEGGER_SYSVIEW_LOCK
#define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK()
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_UNLOCK
*
* Description
* Function macro to unlock SystemView recording.
* Default
* Use RTT Unlocking mechanism (defined by SEGGER_RTT_UNLOCK()).
*/
#ifndef SEGGER_SYSVIEW_UNLOCK
#define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK()
#endif
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,273 @@
/** Copyright (C) SEGGER Microcontroller GmbH */ /* << EST */
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Config_FreeRTOS.c
Purpose : Sample setup configuration of SystemView with FreeRTOS.
Revision: $Rev: 7745 $
*/
#include "FreeRTOS.h"
#include "SEGGER_SYSVIEW.h"
extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
#if 0 /* << EST: original code by SEGGER: */
// The application name to be displayed in SystemViewer
#define SYSVIEW_APP_NAME "FreeRTOS Demo Application"
// The target device name
#define SYSVIEW_DEVICE_NAME "Cortex-M4"
// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h
#define SYSVIEW_TIMESTAMP_FREQ (configCPU_CLOCK_HZ)
// System Frequency. SystemcoreClock is used in most CMSIS compatible projects.
#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ
// The lowest RAM address used for IDs (pointers)
#define SYSVIEW_RAM_BASE (0x10000000)
#endif
/* << EST: begin */
#include "SEGGER_SYSVIEW_Conf.h" /* needed for SEGGER_SYSVIEW_TIMESTAMP_SHIFT */
#include "McuSystemViewconfig.h"
#include "McuLib.h"
//#define SYSVIEW_USING_PEX (McuLib_CONFIG_PEX_SDK_USED) /* 1: project is a Kinetis SDK Processor Expert project; 0: No Kinetis Processor Expert project */
//#define SYSVIEW_USING_FREERTOS (McuLib_CONFIG_SDK_USE_FREERTOS) /* 1: using FreeRTOS; 0: Bare metal */
#if SYSVIEW_USING_PEX
#include "Cpu.h"
#endif
#if SYSVIEW_USING_FREERTOS
#include "FreeRTOS.h"
#endif
// The application name to be displayed in SystemViewer
//#ifndef SYSVIEW_APP_NAME
// #define SYSVIEW_APP_NAME "Demo Application" /* application name, configured in properties */
//#endif
// The operating system, if any
#if SYSVIEW_USING_FREERTOS
extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
//#define SYSVIEW_OS_NAME "FreeRTOS"
#define SYSVIEW_OS_API &SYSVIEW_X_OS_TraceAPI
#else
//#define SYSVIEW_OS_NAME "Bare-metal"
#define SYSVIEW_OS_API NULL
#endif
/* << EST: end */
// The target device name
//#ifndef SYSVIEW_DEVICE_NAME
// #define SYSVIEW_DEVICE_NAME "Cortex" /* device name, configured in properties */
//#endif
// System Frequency. SystemcoreClock is used in most CMSIS compatible projects.
#if SYSVIEW_USING_FREERTOS
#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ
#elif SYSVIEW_USING_PEX
#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ
#else
/* The SDK variable SystemCoreClock contains the current clock speed */
extern uint32_t SystemCoreClock;
#define SYSVIEW_CPU_FREQ (SystemCoreClock) /* CPU clock frequency */
#endif /* SYSVIEW_USING_KINETIS_SDK */
// Frequency of the timestamp. Must match SEGGER_SYSVIEW_Conf.h
#define SYSVIEW_TIMESTAMP_FREQ (configSYSTICK_CLOCK_HZ>>SEGGER_SYSVIEW_TIMESTAMP_SHIFT) /* use FreeRTOS Systick frequency value, as this might depend on prescalers */
// The lowest RAM address used for IDs (pointers)
#define SYSVIEW_RAM_BASE (McuSystemView_CONFIG_SYSVIEW_RAM_BASE) /* RAM base, configured in properties */
#if 1 /* << EST */
#define portNVIC_SYSTICK_LOAD_REG (*((volatile unsigned long *)0xe000e014)) /* SYST_RVR, SysTick reload value register */
#define portNVIC_SYSTICK_CURRENT_VALUE_REG (*((volatile unsigned long *)0xe000e018)) /* SYST_CVR, SysTick current value register */
#define TICK_NOF_BITS 24
#define COUNTS_UP 0 /* SysTick is counting down to zero */
#define SET_TICK_DURATION(val) portNVIC_SYSTICK_LOAD_REG = val
#define GET_TICK_DURATION() portNVIC_SYSTICK_LOAD_REG
#define GET_TICK_CURRENT_VAL(addr) *(addr)=portNVIC_SYSTICK_CURRENT_VALUE_REG
uint32_t SEGGER_uxGetTickCounterValue(void) {
uint32_t val;
GET_TICK_CURRENT_VAL(&val);
return val;
}
#endif
#if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0 /* << EST */
//
// SEGGER_SYSVIEW_TickCnt has to be defined in the module which
// handles the SysTick and must be incremented in the SysTick
// handler before any SYSVIEW event is generated.
//
// Example in embOS RTOSInit.c:
//
// unsigned int SEGGER_SYSVIEW_TickCnt; // <<-- Define SEGGER_SYSVIEW_TickCnt.
// void SysTick_Handler(void) {
// #if OS_PROFILE
// SYSVIEW_TickCnt++; // <<-- Increment SEGGER_SYSVIEW_TickCnt before calling OS_EnterNestableInterrupt.
// #endif
// OS_EnterNestableInterrupt();
// OS_TICK_Handle();
// OS_LeaveNestableInterrupt();
// }
//
extern unsigned int SEGGER_SYSVIEW_TickCnt;
#ifndef SCB_ICSR
#define SCB_ICSR (*(volatile U32*) (0xE000ED04uL)) // Interrupt Control State Register
#endif
#ifndef SCB_ICSR_PENDSTSET_MASK
#define SCB_ICSR_PENDSTSET_MASK (1UL << 26) // SysTick pending bit
#endif
#ifndef SYST_RVR
#define SYST_RVR (*(volatile U32*) (0xE000E014uL)) // SysTick Reload Value Register
#endif
#ifndef SYST_CVR
#define SYST_CVR (*(volatile U32*) (0xE000E018uL)) // SysTick Current Value Register
#endif
/*********************************************************************
*
* SEGGER_SYSVIEW_X_GetTimestamp()
*
* Function description
* Returns the current timestamp in ticks using the system tick
* count and the SysTick counter.
* All parameters of the SysTick have to be known and are set via
* configuration defines on top of the file.
*
* Return value
* The current timestamp.
*
* Additional information
* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are
* disabled. Therefore locking here is not required.
*/
U32 SEGGER_SYSVIEW_X_GetTimestamp(void) {
#if configUSE_SEGGER_SYSTEM_VIEWER_HOOKS
U32 TickCount;
U32 Cycles;
U32 CyclesPerTick;
//
// Get the cycles of the current system tick.
// SysTick is down-counting, subtract the current value from the number of cycles per tick.
//
CyclesPerTick = SYST_RVR + 1;
Cycles = (CyclesPerTick - SYST_CVR);
//
// Get the system tick count.
//
TickCount = SEGGER_SYSVIEW_TickCnt;
//
// If a SysTick interrupt is pending increment the TickCount
//
if ((SCB_ICSR & SCB_ICSR_PENDSTSET_MASK) != 0) {
TickCount++;
}
Cycles += TickCount * CyclesPerTick;
return Cycles;
#else
return 0;
#endif
}
#endif /* << EST */
/*********************************************************************
*
* _cbSendSystemDesc()
*
* Function description
* Sends SystemView description strings.
*/
#if SYSVIEW_USING_FREERTOS /* << EST */
/* default callback */
void _cbSendSystemDesc(void) {
SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",O="SYSVIEW_OS_NAME",D="SYSVIEW_DEVICE_NAME);
SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick");
}
#endif
/*********************************************************************
*
* Global functions
*
**********************************************************************
*/
void SEGGER_SYSVIEW_Conf(void) {
#if SYSVIEW_USING_FREERTOS /* << EST */
#if configUSE_TRACE_HOOKS /* << EST: using Percepio Trace */ && configUSE_SEGGER_SYSTEM_VIEWER_HOOKS /* using SEGGER SystemViewer */
#warning "Percepio Trace is enabled, this might conflict with Segger System View."
#endif
#if !defined(McuSystemView_CONFIG_SYSVIEW_CONFIG_CALLBACK) /* use default */
SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc);
#else /* use application specific callback */
void McuSystemView_CONFIG_SYSVIEW_CONFIG_CALLBACK(void); /* prototype */
SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, &SYSVIEW_X_OS_TraceAPI, McuSystemView_CONFIG_SYSVIEW_CONFIG_CALLBACK);
#endif
SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
#endif
}
/*************************** End of file ****************************/

View File

@@ -0,0 +1,252 @@
/********************************************************************* // @suppress("Lack of copyright information")
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_FreeRTOS.c
Purpose : Interface between FreeRTOS and SystemView.
Revision: $Rev: 7947 $
*/
#include "FreeRTOS.h"
#include "task.h"
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_FreeRTOS.h"
#include "string.h" // Required for memset
typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS;
struct SYSVIEW_FREERTOS_TASK_STATUS {
U32 xHandle;
const char* pcTaskName;
unsigned uxCurrentPriority;
U32 pxStack;
unsigned uStackHighWaterMark;
};
static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS];
static unsigned _NumTasks;
/*********************************************************************
*
* _cbSendTaskList()
*
* Function description
* This function is part of the link between FreeRTOS and SYSVIEW.
* Called from SystemView when asked by the host, it uses SYSVIEW
* functions to send the entire task list to the host.
*/
static void _cbSendTaskList(void) {
unsigned n;
for (n = 0; n < _NumTasks; n++) {
#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark
_aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle);
#endif
SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark);
}
}
/*********************************************************************
*
* _cbGetTime()
*
* Function description
* This function is part of the link between FreeRTOS and SYSVIEW.
* Called from SystemView when asked by the host, returns the
* current system time in micro seconds.
*/
static U64 _cbGetTime(void) {
U64 Time;
Time = xTaskGetTickCountFromISR();
Time *= portTICK_PERIOD_MS;
Time *= 1000;
return Time;
}
/*********************************************************************
*
* Global functions
*
**********************************************************************
*/
/*********************************************************************
*
* SYSVIEW_AddTask()
*
* Function description
* Add a task to the internal list and record its information.
*/
void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
if (memcmp(pcTaskName, "IDLE", 5) == 0) {
return;
}
if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) {
SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached.");
return;
}
_aTasks[_NumTasks].xHandle = xHandle;
_aTasks[_NumTasks].pcTaskName = pcTaskName;
_aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority;
_aTasks[_NumTasks].pxStack = pxStack;
_aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark;
_NumTasks++;
SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark);
}
/*********************************************************************
*
* SYSVIEW_UpdateTask()
*
* Function description
* Update a task in the internal list and record its information.
*/
void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
unsigned n;
if (memcmp(pcTaskName, "IDLE", 5) == 0) {
return;
}
for (n = 0; n < _NumTasks; n++) {
if (_aTasks[n].xHandle == xHandle) {
break;
}
}
if (n < _NumTasks) {
_aTasks[n].pcTaskName = pcTaskName;
_aTasks[n].uxCurrentPriority = uxCurrentPriority;
_aTasks[n].pxStack = pxStack;
_aTasks[n].uStackHighWaterMark = uStackHighWaterMark;
SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark);
} else {
SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark);
}
}
/*********************************************************************
*
* SYSVIEW_DeleteTask()
*
* Function description
* Delete a task from the internal list.
*/
void SYSVIEW_DeleteTask(U32 xHandle) {
unsigned n;
if (_NumTasks == 0) {
return; // Early out
}
for (n = 0; n < _NumTasks; n++) {
if (_aTasks[n].xHandle == xHandle) {
break;
}
}
if (n == (_NumTasks - 1)) {
//
// Task is last item in list.
// Simply zero the item and decrement number of tasks.
//
memset(&_aTasks[n], 0, sizeof(_aTasks[n]));
_NumTasks--;
} else if (n < _NumTasks) {
//
// Task is in the middle of the list.
// Move last item to current position and decrement number of tasks.
// Order of tasks does not really matter, so no need to move all following items.
//
_aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle;
_aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName;
_aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority;
_aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack;
_aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark;
memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1]));
_NumTasks--;
}
}
/*********************************************************************
*
* SYSVIEW_SendTaskInfo()
*
* Function description
* Record task information.
*/
void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) {
SEGGER_SYSVIEW_TASKINFO TaskInfo;
memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code
TaskInfo.TaskID = TaskID;
TaskInfo.sName = sName;
TaskInfo.Prio = Prio;
TaskInfo.StackBase = StackBase;
TaskInfo.StackSize = StackSize;
SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo);
}
/*********************************************************************
*
* Public API structures
*
**********************************************************************
*/
// Callbacks provided to SYSTEMVIEW by FreeRTOS
const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = {
_cbGetTime,
_cbSendTaskList,
};
/*************************** End of file ****************************/

View File

@@ -0,0 +1,581 @@
/********************************************************************* // <<EST @suppress("Lack of copyright information")
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_FreeRTOS.h
Purpose : Interface between FreeRTOS and SystemView.
Tested with FreeRTOS V11.0.1
Revision: $Rev: 7745 $
Notes:
(1) Include this file at the end of FreeRTOSConfig.h
*/
#ifndef SYSVIEW_FREERTOS_H
#define SYSVIEW_FREERTOS_H
#include "SEGGER_SYSVIEW.h"
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
#ifndef portSTACK_GROWTH
#define portSTACK_GROWTH ( -1 )
#endif
#ifndef USE_LEGACY_TRACE_API
#define USE_LEGACY_TRACE_API (1) /* << EST sill using legacy API */
#endif
#if 0 /* << EST */
#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 8
#else /* << EST */
#ifndef SYSVIEW_FREERTOS_MAX_NOF_TASKS
#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 10
#endif
#endif
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
#if ( USE_LEGACY_TRACE_API != 0 )
#define apiID_OFFSET (32u)
#define apiID_VTASKALLOCATEMPUREGIONS (1u)
#define apiID_VTASKDELETE (2u)
#define apiID_VTASKDELAY (3u)
#define apiID_VTASKDELAYUNTIL (4u)
#define apiID_UXTASKPRIORITYGET (5u)
#define apiID_UXTASKPRIORITYGETFROMISR (6u)
#define apiID_ETASKGETSTATE (7u)
#define apiID_VTASKPRIORITYSET (8u)
#define apiID_VTASKSUSPEND (9u)
#define apiID_VTASKRESUME (10u)
#define apiID_XTASKRESUMEFROMISR (11u)
#define apiID_VTASKSTARTSCHEDULER (12u)
#define apiID_VTASKENDSCHEDULER (13u)
#define apiID_VTASKSUSPENDALL (14u)
#define apiID_XTASKRESUMEALL (15u)
#define apiID_XTASKGETTICKCOUNT (16u)
#define apiID_XTASKGETTICKCOUNTFROMISR (17u)
#define apiID_UXTASKGETNUMBEROFTASKS (18u)
#define apiID_PCTASKGETTASKNAME (19u)
#define apiID_UXTASKGETSTACKHIGHWATERMARK (20u)
#define apiID_VTASKSETAPPLICATIONTASKTAG (21u)
#define apiID_XTASKGETAPPLICATIONTASKTAG (22u)
#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (23u)
#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (24u)
#define apiID_XTASKCALLAPPLICATIONTASKHOOK (25u)
#define apiID_XTASKGETIDLETASKHANDLE (26u)
#define apiID_UXTASKGETSYSTEMSTATE (27u)
#define apiID_VTASKLIST (28u)
#define apiID_VTASKGETRUNTIMESTATS (29u)
#define apiID_XTASKGENERICNOTIFY (30u)
#define apiID_XTASKGENERICNOTIFYFROMISR (31u)
#define apiID_XTASKNOTIFYWAIT (32u)
#define apiID_VTASKNOTIFYGIVEFROMISR (33u)
#define apiID_ULTASKNOTIFYTAKE (34u)
#define apiID_XTASKNOTIFYSTATECLEAR (35u)
#define apiID_XTASKGETCURRENTTASKHANDLE (36u)
#define apiID_VTASKSETTIMEOUTSTATE (37u)
#define apiID_XTASKCHECKFORTIMEOUT (38u)
#define apiID_VTASKMISSEDYIELD (39u)
#define apiID_XTASKGETSCHEDULERSTATE (40u)
#define apiID_VTASKPRIORITYINHERIT (41u)
#define apiID_XTASKPRIORITYDISINHERIT (42u)
#define apiID_XTASKGENERICCREATE (43u)
#define apiID_UXTASKGETTASKNUMBER (44u)
#define apiID_VTASKSETTASKNUMBER (45u)
#define apiID_VTASKSTEPTICK (46u)
#define apiID_ETASKCONFIRMSLEEPMODESTATUS (47u)
#define apiID_XTIMERCREATE (48u)
#define apiID_PVTIMERGETTIMERID (49u)
#define apiID_VTIMERSETTIMERID (50u)
#define apiID_XTIMERISTIMERACTIVE (51u)
#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (52u)
#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (53u)
#define apiID_XTIMERPENDFUNCTIONCALL (54u)
#define apiID_PCTIMERGETTIMERNAME (55u)
#define apiID_XTIMERCREATETIMERTASK (56u)
#define apiID_XTIMERGENERICCOMMAND (57u)
#define apiID_XQUEUEGENERICSEND (58u)
#define apiID_XQUEUEPEEKFROMISR (59u)
#define apiID_XQUEUEGENERICRECEIVE (60u)
#define apiID_UXQUEUEMESSAGESWAITING (61u)
#define apiID_UXQUEUESPACESAVAILABLE (62u)
#define apiID_VQUEUEDELETE (63u)
#define apiID_XQUEUEGENERICSENDFROMISR (64u)
#define apiID_XQUEUEGIVEFROMISR (65u)
#define apiID_XQUEUERECEIVEFROMISR (66u)
#define apiID_XQUEUEISQUEUEEMPTYFROMISR (67u)
#define apiID_XQUEUEISQUEUEFULLFROMISR (68u)
#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (69u)
#define apiID_XQUEUEALTGENERICSEND (70u)
#define apiID_XQUEUEALTGENERICRECEIVE (71u)
#define apiID_XQUEUECRSENDFROMISR (72u)
#define apiID_XQUEUECRRECEIVEFROMISR (73u)
#define apiID_XQUEUECRSEND (74u)
#define apiID_XQUEUECRRECEIVE (75u)
#define apiID_XQUEUECREATEMUTEX (76u)
#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (77u)
#define apiID_XQUEUEGETMUTEXHOLDER (78u)
#define apiID_XQUEUETAKEMUTEXRECURSIVE (79u)
#define apiID_XQUEUEGIVEMUTEXRECURSIVE (80u)
#define apiID_VQUEUEADDTOREGISTRY (81u)
#define apiID_VQUEUEUNREGISTERQUEUE (82u)
#define apiID_XQUEUEGENERICCREATE (83u)
#define apiID_XQUEUECREATESET (84u)
#define apiID_XQUEUEADDTOSET (85u)
#define apiID_XQUEUEREMOVEFROMSET (86u)
#define apiID_XQUEUESELECTFROMSET (87u)
#define apiID_XQUEUESELECTFROMSETFROMISR (88u)
#define apiID_XQUEUEGENERICRESET (89u)
#define apiID_VLISTINITIALISE (90u)
#define apiID_VLISTINITIALISEITEM (91u)
#define apiID_VLISTINSERT (92u)
#define apiID_VLISTINSERTEND (93u)
#define apiID_UXLISTREMOVE (94u)
#define apiID_XEVENTGROUPCREATE (95u)
#define apiID_XEVENTGROUPWAITBITS (96u)
#define apiID_XEVENTGROUPCLEARBITS (97u)
#define apiID_XEVENTGROUPCLEARBITSFROMISR (98u)
#define apiID_XEVENTGROUPSETBITS (99u)
#define apiID_XEVENTGROUPSETBITSFROMISR (100u)
#define apiID_XEVENTGROUPSYNC (101u)
#define apiID_XEVENTGROUPGETBITSFROMISR (102u)
#define apiID_VEVENTGROUPDELETE (103u)
#define apiID_UXEVENTGROUPGETNUMBER (104u)
#define apiID_XSTREAMBUFFERCREATE (105u)
#define apiID_VSTREAMBUFFERDELETE (106u)
#define apiID_XSTREAMBUFFERRESET (107u)
#define apiID_XSTREAMBUFFERSEND (108u)
#define apiID_XSTREAMBUFFERSENDFROMISR (109u)
#define apiID_XSTREAMBUFFERRECEIVE (110u)
#define apiID_XSTREAMBUFFERRECEIVEFROMISR (111u)
#define apiID_XQUEUESETSEND (112u)
#else /* USE_LEGACY_TRACE_API */
#define apiID_XQUEUEGENERICRESET (150u)
#define apiID_XQUEUEGENERICCREATESTATIC (151u)
#define apiID_XQUEUEGENERICCREATE (152u)
#define apiID_XQUEUECREATEMUTEX (153u)
#define apiID_XQUEUECREATEMUTEXSTATIC (154u)
#define apiID_XQUEUEGETMUTEXHOLDER (155u)
#define apiID_XQUEUEGETMUTEXHOLDERFROMISR (156u)
#define apiID_XQUEUEGIVEMUTEXRECURSIVE (157u)
#define apiID_XQUEUETAKEMUTEXRECURSIVE (158u)
#define apiID_XQUEUECREATECOUNTINGSEMAPHORESTATIC (159u)
#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (160u)
#define apiID_XQUEUEGENERICSEND (161u)
#define apiID_XQUEUEGENERICSENDFROMISR (162u)
#define apiID_XQUEUEGIVEFROMISR (163u)
#define apiID_XQUEUERECEIVE (164u)
#define apiID_XQUEUESEMAPHORETAKE (165u)
#define apiID_XQUEUEPEEK (166u)
#define apiID_XQUEUERECEIVEFROMISR (167u)
#define apiID_XQUEUEPEEKFROMISR (168u)
#define apiID_UXQUEUEMESSAGESWAITING (169u)
#define apiID_UXQUEUESPACESAVAILABLE (170u)
#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (171u)
#define apiID_VQUEUEDELETE (172u)
#define apiID_UXQUEUEGETQUEUENUMBER (173u)
#define apiID_VQUEUESETQUEUENUMBER (174u)
#define apiID_UCQUEUEGETQUEUETYPE (175u)
#define apiID_XQUEUEISQUEUEEMPTYFROMISR (176u)
#define apiID_XQUEUEISQUEUEFULLFROMISR (177u)
#define apiID_XQUEUECRSEND (178u)
#define apiID_XQUEUECRRECEIVE (179u)
#define apiID_XQUEUECRSENDFROMISR (180u)
#define apiID_XQUEUECRRECEIVEFROMISR (181u)
#define apiID_VQUEUEADDTOREGISTRY (182u)
#define apiID_PCQUEUEGETNAME (183u)
#define apiID_VQUEUEUNREGISTERQUEUE (184u)
#define apiID_VQUEUEWAITFORMESSAGERESTRICTED (185u)
#define apiID_XQUEUECREATESET (186u)
#define apiID_XQUEUEADDTOSET (187u)
#define apiID_XQUEUEREMOVEFROMSET (188u)
#define apiID_XQUEUESELECTFROMSET (189u)
#define apiID_XQUEUESELECTFROMSETFROMISR (190u)
#define apiID_XTASKCREATESTATIC (191u)
#define apiID_XTASKCREATERESTRICTEDSTATIC (192u)
#define apiID_XTASKCREATERESTRICTED (193u)
#define apiID_XTASKCREATE (194u)
#define apiID_VTASKDELETE (195u)
#define apiID_XTASKDELAYUNTIL (196u)
#define apiID_VTASKDELAY (197u)
#define apiID_ETASKGETSTATE (198u)
#define apiID_UXTASKPRIORITYGET (199u)
#define apiID_UXTASKPRIORITYGETFROMISR (200u)
#define apiID_VTASKPRIORITYSET (201u)
#define apiID_VTASKSUSPEND (202u)
#define apiID_VTASKRESUME (203u)
#define apiID_XTASKRESUMEFROMISR (204u)
#define apiID_VTASKSTARTSCHEDULER (205u)
#define apiID_VTASKENDSCHEDULER (206u)
#define apiID_VTASKSUSPENDALL (207u)
#define apiID_XTASKRESUMEALL (208u)
#define apiID_XTASKGETTICKCOUNT (209u)
#define apiID_XTASKGETTICKCOUNTFROMISR (210u)
#define apiID_UXTASKGETNUMBEROFTASKS (211u)
#define apiID_PCTASKGETNAME (212u)
#define apiID_XTASKGETHANDLE (213u)
#define apiID_UXTASKGETSYSTEMSTATE (214u)
#define apiID_XTASKGETIDLETASKHANDLE (215u)
#define apiID_VTASKSTEPTICK (216u)
#define apiID_XTASKCATCHUPTICKS (217u)
#define apiID_XTASKABORTDELAY (218u)
#define apiID_XTASKINCREMENTTICK (219u)
#define apiID_VTASKSETAPPLICATIONTASKTAG (220u)
#define apiID_XTASKGETAPPLICATIONTASKTAG (221u)
#define apiID_XTASKGETAPPLICATIONTASKTAGFROMISR (222u)
#define apiID_XTASKCALLAPPLICATIONTASKHOOK (223u)
#define apiID_VTASKPLACEONEVENTLIST (225u)
#define apiID_VTASKPLACEONUNORDEREDEVENTLIST (226u)
#define apiID_VTASKPLACEONEVENTLISTRESTRICTED (227u)
#define apiID_XTASKREMOVEFROMEVENTLIST (228u)
#define apiID_VTASKREMOVEFROMUNORDEREDEVENTLIST (229u)
#define apiID_VTASKSETTIMEOUTSTATE (230u)
#define apiID_VTASKINTERNALSETTIMEOUTSTATE (231u)
#define apiID_XTASKCHECKFORTIMEOUT (232u)
#define apiID_VTASKMISSEDYIELD (233u)
#define apiID_UXTASKGETTASKNUMBER (234u)
#define apiID_VTASKSETTASKNUMBER (235u)
#define apiID_ETASKCONFIRMSLEEPMODESTATUS (236u)
#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (237u)
#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (238u)
#define apiID_VTASKALLOCATEMPUREGIONS (239u)
#define apiID_VTASKGETINFO (240u)
#define apiID_UXTASKGETSTACKHIGHWATERMARK2 (241u)
#define apiID_UXTASKGETSTACKHIGHWATERMARK (242u)
#define apiID_PXTASKGETSTACKSTART (243u)
#define apiID_XTASKGETCURRENTTASKHANDLE (244u)
#define apiID_XTASKGETSCHEDULERSTATE (245u)
#define apiID_XTASKPRIORITYINHERIT (246u)
#define apiID_XTASKPRIORITYDISINHERIT (247u)
#define apiID_VTASKPRIORITYDISINHERITAFTERTIMEOUT (248u)
#define apiID_VTASKENTERCRITICAL (249u)
#define apiID_VTASKEXITCRITICAL (250u)
#define apiID_VTASKLIST (251u)
#define apiID_VTASKGETRUNTIMESTATS (252u)
#define apiID_UXTASKRESETEVENTITEMVALUE (253u)
#define apiID_PVTASKINCREMENTMUTEXHELDCOUNT (254u)
#define apiID_ULTASKGENERICNOTIFYTAKE (255u)
#define apiID_XTASKGENERICNOTIFYWAIT (256u)
#define apiID_XTASKGENERICNOTIFY (257u)
#define apiID_XTASKGENERICNOTIFYFROMISR (258u)
#define apiID_VTASKGENERICNOTIFYGIVEFROMISR (259u)
#define apiID_XTASKGENERICNOTIFYSTATECLEAR (260u)
#define apiID_ULTASKGENERICNOTIFYVALUECLEAR (261u)
#define apiID_ULTASKGETIDLERUNTIMECOUNTER (262u)
#define apiID_ULTASKGETIDLERUNTIMEPERCENT (263u)
#define apiID_XTIMERCREATETIMERTASK (264u)
#define apiID_XTIMERCREATE (265u)
#define apiID_XTIMERCREATESTATIC (266u)
#define apiID_XTIMERGENERICCOMMAND (267u)
#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (268u)
#define apiID_XTIMERGETPERIOD (269u)
#define apiID_VTIMERSETRELOADMODE (270u)
#define apiID_XTIMERGETRELOADMODE (271u)
#define apiID_XTIMERGETEXPIRYTIME (272u)
#define apiID_PCTIMERGETNAME (273u)
#define apiID_XTIMERISTIMERACTIVE (274u)
#define apiID_PVTIMERGETTIMERID (275u)
#define apiID_VTIMERSETTIMERID (276u)
#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (277u)
#define apiID_XTIMERPENDFUNCTIONCALL (278u)
#define apiID_UXTIMERGETTIMERNUMBER (279u)
#define apiID_VTIMERSETTIMERNUMBER (280u)
#define apiID_VLISTINITIALISE (281u)
#define apiID_VLISTINITIALISEITEM (282u)
#define apiID_VLISTINSERTEND (283u)
#define apiID_VLISTINSERT (284u)
#define apiID_UXLISTREMOVE (285u)
#define apiID_XCOROUTINECREATE (286u)
#define apiID_VCOROUTINEADDTODELAYEDLIST (287u)
#define apiID_VCOROUTINESCHEDULE (288u)
#define apiID_XCOROUTINEREMOVEFROMEVENTLIST (289u)
#define apiID_XEVENTGROUPCREATESTATIC (290u)
#define apiID_XEVENTGROUPCREATE (291u)
#define apiID_XEVENTGROUPSYNC (292u)
#define apiID_XEVENTGROUPWAITBITS (293u)
#define apiID_XEVENTGROUPCLEARBITS (294u)
#define apiID_XEVENTGROUPCLEARBITSFROMISR (295u)
#define apiID_XEVENTGROUPGETBITSFROMISR (296u)
#define apiID_XEVENTGROUPSETBITS (297u)
#define apiID_VEVENTGROUPDELETE (298u)
#define apiID_VEVENTGROUPSETBITSCALLBACK (299u)
#define apiID_VEVENTGROUPCLEARBITSCALLBACK (300u)
#define apiID_XEVENTGROUPSETBITSFROMISR (301u)
#define apiID_UXEVENTGROUPGETNUMBER (302u)
#define apiID_VEVENTGROUPSETNUMBER (303u)
#define apiID_XSTREAMBUFFERGENERICCREATE (304u)
#define apiID_XSTREAMBUFFERGENERICCREATESTATIC (305u)
#define apiID_VSTREAMBUFFERDELETE (306u)
#define apiID_XSTREAMBUFFERRESET (307u)
#define apiID_XSTREAMBUFFERSETTRIGGERLEVEL (308u)
#define apiID_XSTREAMBUFFERSPACESAVAILABLE (309u)
#define apiID_XSTREAMBUFFERBYTESAVAILABLE (310u)
#define apiID_XSTREAMBUFFERSEND (311u)
#define apiID_XSTREAMBUFFERSENDFROMISR (312u)
#define apiID_XSTREAMBUFFERRECEIVE (313u)
#define apiID_XSTREAMBUFFERNEXTMESSAGELENGTHBYTES (314u)
#define apiID_XSTREAMBUFFERRECEIVEFROMISR (315u)
#define apiID_XSTREAMBUFFERISEMPTY (316u)
#define apiID_XSTREAMBUFFERISFULL (317u)
#define apiID_XSTREAMBUFFERSENDCOMPLETEDFROMISR (318u)
#define apiID_XSTREAMBUFFERRECEIVECOMPLETEDFROMISR (319u)
#define apiID_UXSTREAMBUFFERGETSTREAMBUFFERNUMBER (320u)
#define apiID_VSTREAMBUFFERSETSTREAMBUFFERNUMBER (321u)
#define apiID_UCSTREAMBUFFERGETSTREAMBUFFERTYPE (322u)
#define apiID_XTIMERGENERICCOMMANDFROMISR (323u)
#define apiID_XTIMERGENERICCOMMANDFROMTASK (324u)
#define apiID_VTASKCOREAFFINITYSET (325u)
#define apiID_VTASKCOREAFFINITYGET (326u)
#define apiID_VTASKPREEMPTIONDISABLE (327u)
#define apiID_VTASKPREEMPTIONENABLE (328u)
#define apiID_VTASKYIELDWITHINAPI (329u)
#define apiID_VTASKENTERCRITICALFROMISR (330u)
#define apiID_VTASKEXITCRITICALFROMISR (331u)
#define apiID_ULTASKGETRUNTIMECOUNTER (332u)
#endif /* USE_LEGACY_TRACE_API */
#if configUSE_SEGGER_SYSTEM_VIEWER_HOOKS /* << EST */
#include "McuSystemViewconfig.h" /* << EST */
#define traceSTART() SEGGER_SYSVIEW_Conf()
#if ( USE_LEGACY_TRACE_API != 0 )
#define traceTASK_NOTIFY_TAKE(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait)
#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKDELAY, xTicksToDelay)
#define traceTASK_DELAY_UNTIL(xTimeToWake) SEGGER_SYSVIEW_RecordVoid (apiID_OFFSET + apiID_VTASKDELAYUNTIL)
#define traceTASK_NOTIFY_GIVE_FROM_ISR(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken)
#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder)
#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#if McuSystemView_CONFIG_GENERATE_STEPTICK_EVENTS /* << EST */
#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump)
#endif
#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder)
#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#define traceTASK_NOTIFY(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue)
#define traceTASK_NOTIFY_FROM_ISR(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x5(apiID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken)
#define traceTASK_NOTIFY_WAIT(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait)
#if McuSystemView_CONFIG_GENERATE_QUEUE_EVENTS /* << EST */
#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType)
#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue))
#define traceQUEUE_PEEK( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, 1)
#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer))
#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer))
#define traceQUEUE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1)
#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1)
#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 0)
#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName); SEGGER_SYSVIEW_NameResource((uint32_t)xQueue, pcQueueName)
#if ( configUSE_QUEUE_SETS != 1 )
#define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
#else
#define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, xCopyPosition)
#endif
#define traceQUEUE_SET_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, 0)
#define traceQUEUE_SEND_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
#endif /* #if McuSystemView_CONFIG_GENERATE_QUEUE_EVENTS */
#if McuSystemView_CONFIG_GENERATE_STREAMBUFFER_EVENTS /* << EST */
#define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, (U32)pxStreamBuffer)
#define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, 0u)
#define traceSTREAM_BUFFER_DELETE( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VSTREAMBUFFERDELETE, (U32)xStreamBuffer)
#define traceSTREAM_BUFFER_RESET( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XSTREAMBUFFERRESET, (U32)xStreamBuffer)
#define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, (U32)xBytesSent)
#define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, 0u)
#define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSENDFROMISR, (U32)xStreamBuffer, (U32)xBytesSent)
#define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, (U32)xReceivedLength)
#define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, 0u)
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVEFROMISR, (U32)xStreamBuffer, (U32)xReceivedLength)
#endif /* #if McuSystemView_CONFIG_GENERATE_STREAMBUFFER_EVENTS */
#endif
#define traceTASK_DELETE( pxTCB ) { \
SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \
SYSVIEW_DeleteTask((U32)pxTCB); \
}
#if( portSTACK_GROWTH < 0 )
#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \
SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \
SYSVIEW_AddTask((U32)pxNewTCB, \
&(pxNewTCB->pcTaskName[0]), \
pxNewTCB->uxPriority, \
(U32)pxNewTCB->pxStack, \
((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \
); \
}
#else
#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \
SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \
SYSVIEW_AddTask((U32)pxNewTCB, \
&(pxNewTCB->pcTaskName[0]), \
pxNewTCB->uxPriority, \
(U32)pxNewTCB->pxStack, \
(U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \
); \
}
#endif
#if 0 /* << EST */
#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \
SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \
SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \
uxNewPriority \
); \
SYSVIEW_UpdateTask((U32)pxTask, \
&(pxTask->pcTaskName[0]), \
uxNewPriority, \
(U32)pxTask->pxStack, \
0 \
); \
}
#else /* << EST */
#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \
SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \
SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \
uxNewPriority \
); \
SYSVIEW_UpdateTask((U32)pxTask, \
&(pxTask->pcTaskName[0]), \
uxNewPriority, \
(U32)pxTask->pxStack, \
(portSTACK_GROWTH<0)? \
(U32)(pxTask->pxTopOfStack-pxTask->pxStack)\
:(U32)(pxTask->pxStack-pxTask->pxTopOfStack)\
); \
}
#endif /* << EST */
//
// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state.
//
#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
#define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xIdleTaskHandles[0]) { \
SEGGER_SYSVIEW_OnIdle(); \
} else { \
SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \
}
#else
#define traceTASK_SWITCHED_IN() { \
if (memcmp(pxCurrentTCB->pcTaskName, "IDLE", 5) != 0) { \
SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \
} else { \
SEGGER_SYSVIEW_OnIdle(); \
} \
}
#endif
#if 1 /* << EST */
#define traceMOVED_TASK_TO_READY_STATE(pxTCB)
#define tracePOST_MOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB)
#else
#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB)
#endif
#define traceREADDED_TASK_TO_READY_STATE(pxTCB)
#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2))
#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2))
#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3))
#if McuSystemView_CONFIG_GENERATE_ISR_EVENTS /* << EST */
#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler()
#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR()
#define traceISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR()
#endif /* #if McuSystemView_CONFIG_GENERATE_QUEUE_EVENTS */
#endif /* configUSE_SEGGER_SYSTEM_VIEWER_HOOKS */ /* << EST */
/*********************************************************************
*
* API functions
*
**********************************************************************
*/
#ifdef __cplusplus
extern "C" {
#endif
void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark);
void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark);
void SYSVIEW_DeleteTask (U32 xHandle);
void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize);
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,103 @@
/** Copyright (C) SEGGER Microcontroller GmbH */ /* << EST */
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2024 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* 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 SystemView and 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: *
* *
* o 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. *
* *
**********************************************************************
* *
* SystemView version: 3.56 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Int.h
Purpose : SEGGER SystemView internal header.
Revision: $Rev: 21281 $
*/
#ifndef SEGGER_SYSVIEW_INT_H
#define SEGGER_SYSVIEW_INT_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_Conf.h" /* << EST */
#include "SEGGER_SYSVIEW_ConfDefaults.h" /* << EST */
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Private data types
*
**********************************************************************
*/
//
// Commands that Host can send to target
//
typedef enum {
SEGGER_SYSVIEW_COMMAND_ID_START = 1,
SEGGER_SYSVIEW_COMMAND_ID_STOP,
SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME,
SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST,
SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC,
SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES,
SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC,
SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT = 127,
// Extended commands: Commands >= 128 have a second parameter
SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE = 128
} SEGGER_SYSVIEW_COMMAND_ID;
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/