Skip to content

Commit 5792675

Browse files
sigvartmhcarlescufi
authored andcommitted
segger: update to 3.40
Update to 3.40 of SystemView Target sources. Signed-off-by: Sigvart Hovland <[email protected]>
1 parent 4bfaf28 commit 5792675

16 files changed

+678
-239
lines changed

Config/Global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* *
4343
**********************************************************************
4444
* *
45-
* SystemView version: 3.30 *
45+
* SystemView version: 3.40 *
4646
* *
4747
**********************************************************************
4848
----------------------------------------------------------------------

Config/SEGGER_RTT_Conf.h

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
* *
4343
**********************************************************************
4444
* *
45-
* SystemView version: 3.30 *
45+
* SystemView version: 3.40 *
4646
* *
4747
**********************************************************************
4848
---------------------------END-OF-HEADER------------------------------
4949
File : SEGGER_RTT_Conf.h
5050
Purpose : Implementation of SEGGER real-time transfer (RTT) which
5151
allows real-time communication on targets which support
5252
debugger memory accesses while the CPU is running.
53-
Revision: $Rev: 21386 $
53+
Revision: $Rev: 24316 $
5454
5555
*/
5656

@@ -96,6 +96,8 @@ Revision: $Rev: 21386 $
9696

9797
#if defined(CONFIG_SEGGER_RTT_SECTION_DTCM)
9898
#define SEGGER_RTT_SECTION ".dtcm_data"
99+
#elif defined(CONFIG_SEGGER_RTT_SECTION_CUSTOM)
100+
#define SEGGER_RTT_SECTION CONFIG_SEGGER_RTT_SECTION_CUSTOM_NAME
99101
#endif
100102

101103
/*********************************************************************
@@ -113,7 +115,9 @@ Revision: $Rev: 21386 $
113115
#if defined(CONFIG_SEGGER_RTT_MEMCPY_USE_BYTELOOP)
114116
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 1 // 1: Use a simple byte-loop
115117
#else
118+
#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP
116119
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY
120+
#endif
117121
#endif
118122
//
119123
// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets
@@ -146,22 +150,22 @@ Revision: $Rev: 21386 $
146150
* Rowley CrossStudio and GCC
147151
*/
148152
#if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32))
149-
#if defined(__ZEPHYR__) && defined (CONFIG_SEGGER_RTT_CUSTOM_LOCKING)
150-
#ifdef CONFIG_MULTITHREADING
151-
extern void zephyr_rtt_mutex_lock(void);
152-
extern void zephyr_rtt_mutex_unlock(void);
153-
#define SEGGER_RTT_LOCK() zephyr_rtt_mutex_lock()
154-
#define SEGGER_RTT_UNLOCK() zephyr_rtt_mutex_unlock()
155-
#else
156-
extern unsigned int zephyr_rtt_irq_lock(void);
157-
extern void zephyr_rtt_irq_unlock(unsigned int key);
158-
#define SEGGER_RTT_LOCK() { \
159-
unsigned int key = zephyr_rtt_irq_lock()
160-
#define SEGGER_RTT_UNLOCK() zephyr_rtt_irq_unlock(key); \
161-
}
162-
#endif
163-
#define RTT_USE_ASM 0
164-
#elif (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__))
153+
#if defined(__ZEPHYR__) && defined (CONFIG_SEGGER_RTT_CUSTOM_LOCKING)
154+
#ifdef CONFIG_MULTITHREADING
155+
extern void zephyr_rtt_mutex_lock(void);
156+
extern void zephyr_rtt_mutex_unlock(void);
157+
#define SEGGER_RTT_LOCK() zephyr_rtt_mutex_lock()
158+
#define SEGGER_RTT_UNLOCK() zephyr_rtt_mutex_unlock()
159+
#else
160+
extern unsigned int zephyr_rtt_irq_lock(void);
161+
extern void zephyr_rtt_irq_unlock(unsigned int key);
162+
#define SEGGER_RTT_LOCK() { \
163+
unsigned int key = zephyr_rtt_irq_lock()
164+
#define SEGGER_RTT_UNLOCK() zephyr_rtt_irq_unlock(key); \
165+
}
166+
#endif
167+
#define RTT_USE_ASM 0
168+
#elif (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__))
165169
#define SEGGER_RTT_LOCK() { \
166170
unsigned int _SEGGER_RTT__LockState; \
167171
__asm volatile ("mrs %0, primask \n\t" \
@@ -199,7 +203,7 @@ Revision: $Rev: 21386 $
199203
); \
200204
}
201205

202-
#elif defined(__ARM_ARCH_7A__)
206+
#elif (defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__))
203207
#define SEGGER_RTT_LOCK() { \
204208
unsigned int _SEGGER_RTT__LockState; \
205209
__asm volatile ("mrs r1, CPSR \n\t" \

Config/SEGGER_SYSVIEW_Conf.h

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*********************************************************************
2+
* SEGGER Microcontroller GmbH *
3+
* The Embedded Experts *
4+
**********************************************************************
5+
* *
6+
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
7+
* *
8+
* www.segger.com Support: [email protected] *
9+
* *
10+
**********************************************************************
11+
* *
12+
* SEGGER SystemView * Real-time application analysis *
13+
* *
14+
**********************************************************************
15+
* *
16+
* All rights reserved. *
17+
* *
18+
* SEGGER strongly recommends to not make any changes *
19+
* to or modify the source code of this software in order to stay *
20+
* compatible with the SystemView and RTT protocol, and J-Link. *
21+
* *
22+
* Redistribution and use in source and binary forms, with or *
23+
* without modification, are permitted provided that the following *
24+
* condition is met: *
25+
* *
26+
* o Redistributions of source code must retain the above copyright *
27+
* notice, this condition and the following disclaimer. *
28+
* *
29+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
30+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
31+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
32+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
33+
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
34+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
35+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
36+
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
37+
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
38+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
39+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
40+
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
41+
* DAMAGE. *
42+
* *
43+
**********************************************************************
44+
* *
45+
* SystemView version: 3.40 *
46+
* *
47+
**********************************************************************
48+
-------------------------- END-OF-HEADER -----------------------------
49+
50+
File : SEGGER_SYSVIEW_Conf.h
51+
Purpose : SEGGER SystemView configuration file.
52+
Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here.
53+
Revision: $Rev: 21292 $
54+
55+
Additional information:
56+
Required defines which must be set are:
57+
SEGGER_SYSVIEW_GET_TIMESTAMP
58+
SEGGER_SYSVIEW_GET_INTERRUPT_ID
59+
For known compilers and cores, these might be set to good defaults
60+
in SEGGER_SYSVIEW_ConfDefaults.h.
61+
62+
SystemView needs a (nestable) locking mechanism.
63+
If not defined, the RTT locking mechanism is used,
64+
which then needs to be properly configured.
65+
*/
66+
67+
#ifndef SEGGER_SYSVIEW_CONF_H
68+
#define SEGGER_SYSVIEW_CONF_H
69+
70+
/*********************************************************************
71+
*
72+
* Defines, configurable
73+
*
74+
**********************************************************************
75+
*/
76+
77+
/*********************************************************************
78+
* TODO: Add your defines here. *
79+
**********************************************************************
80+
*/
81+
82+
83+
#endif // SEGGER_SYSVIEW_CONF_H
84+
85+
/*************************** End of file ****************************/

SEGGER/DebugMon/JLINK_MONITOR.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Purpose : Implementation of debug monitor for J-Link monitor mode debug on Corte
9797
**********************************************************************
9898
*/
9999

100-
101100
/*********************************************************************
102101
*
103102
* JLINK_MONITOR_OnExit()
@@ -127,8 +126,8 @@ void JLINK_MONITOR_OnExit(void) {
127126
* Notes
128127
* (1) Must not keep the CPU busy for more than 100 ms
129128
*/
130-
131129
void JLINK_MONITOR_OnEnter(void) {
130+
//
132131
// Add custom code here
133132
//
134133
// BSP_SetLED(0);
@@ -145,8 +144,12 @@ void JLINK_MONITOR_OnEnter(void) {
145144
* Notes
146145
* (1) Must not keep the CPU busy for more than 100 ms
147146
*/
148-
149147
void JLINK_MONITOR_OnPoll(void) {
148+
//
149+
// Add custom code here
150+
//
151+
// BSP_ToggleLED(0);
152+
// _Delay(500000);
150153
}
151154

152155
/****** End Of File *************************************************/

SEGGER/SEGGER.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
* *
4343
**********************************************************************
4444
* *
45-
* SystemView version: 3.30 *
45+
* SystemView version: 3.40 *
4646
* *
4747
**********************************************************************
4848
----------------------------------------------------------------------
4949
File : SEGGER.h
5050
Purpose : Global types etc & general purpose utility functions
51-
Revision: $Rev: 18102 $
51+
Revision: $Rev: 18102 $
5252
---------------------------END-OF-HEADER------------------------------
5353
*/
5454

0 commit comments

Comments
 (0)