File tree Expand file tree Collapse file tree 4 files changed +35
-4
lines changed Expand file tree Collapse file tree 4 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
#define DT_DRV_COMPAT segger_rtt_uart
11
11
12
+ extern struct k_mutex rtt_term_mutex ;
13
+
12
14
struct uart_rtt_config {
13
15
void * up_buffer ;
14
16
size_t up_size ;
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
#include <zephyr/kernel.h>
8
+ #include <zephyr/irq.h>
8
9
#include <zephyr/init.h>
9
10
#include "SEGGER_RTT.h"
10
11
@@ -30,4 +31,30 @@ static int rtt_init(const struct device *unused)
30
31
return 0 ;
31
32
}
32
33
34
+ #ifdef CONFIG_MULTITHREADING
35
+
36
+ void zephyr_rtt_mutex_lock (void )
37
+ {
38
+ k_mutex_lock (& rtt_term_mutex , K_FOREVER );
39
+ }
40
+
41
+ void zephyr_rtt_mutex_unlock (void )
42
+ {
43
+ k_mutex_unlock (& rtt_term_mutex );
44
+ }
45
+
46
+ #endif /* CONFIG_MULTITHREADING */
47
+
48
+ unsigned int zephyr_rtt_irq_lock (void )
49
+ {
50
+ return irq_lock ();
51
+ }
52
+
53
+ void zephyr_rtt_irq_unlock (unsigned int key )
54
+ {
55
+ irq_unlock (key );
56
+ }
57
+
58
+
59
+
33
60
SYS_INIT (rtt_init , PRE_KERNEL_1 , CONFIG_KERNEL_INIT_PRIORITY_OBJECTS );
Original file line number Diff line number Diff line change 8
8
#define SEGGER_SEGGER_SYSVIEW_CONF_H_
9
9
10
10
#include <stdint.h>
11
- #include <zephyr/irq.h>
12
11
13
12
#define SEGGER_SYSVIEW_GET_TIMESTAMP sysview_get_timestamp
14
13
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID sysview_get_interrupt
@@ -23,13 +22,16 @@ uint32_t sysview_get_interrupt(void);
23
22
#define SEGGER_SYSVIEW_SECTION ".dtcm_data"
24
23
#endif
25
24
25
+ extern unsigned int zephyr_rtt_irq_lock (void );
26
+ extern void zephyr_rtt_irq_unlock (unsigned int key );
27
+
26
28
/* Lock SystemView (nestable) */
27
29
#define SEGGER_SYSVIEW_LOCK () { \
28
30
unsigned int __sysview_irq_key = \
29
- irq_lock ()
31
+ zephyr_rtt_irq_lock ()
30
32
31
33
/* Unlock SystemView (nestable) */
32
- #define SEGGER_SYSVIEW_UNLOCK () irq_unlock (__sysview_irq_key); \
34
+ #define SEGGER_SYSVIEW_UNLOCK () zephyr_rtt_irq_unlock (__sysview_irq_key); \
33
35
}
34
36
35
37
#endif /* SEGGER_SEGGER_SYSVIEW_CONF_H_ */
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ manifest:
200
200
path : modules/lib/picolibc
201
201
revision : e87b2fc37345a62361478f0a6efd140e14180ba5
202
202
- name : segger
203
- revision : 3a52ab222133193802d3c3b4d21730b9b1f1d2f6
203
+ revision : d4e568a920b4bd087886170a5624c167b2d0665e
204
204
path : modules/debug/segger
205
205
groups :
206
206
- debug
You can’t perform that action at this time.
0 commit comments