openocd: src/rtos: replace the GPL-2.0-or-later license tag
[openocd.git] / src / rtos / nuttx_header.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright 2016,2017 Sony Video & Sound Products Inc. *
5 * Masatoshi Tateishi - Masatoshi.Tateishi@jp.sony.com *
6 * Masayuki Ishikawa - Masayuki.Ishikawa@jp.sony.com *
7 ***************************************************************************/
8
9 #ifndef OPENOCD_RTOS_NUTTX_HEADER_H
10 #define OPENOCD_RTOS_NUTTX_HEADER_H
11
12 /* gdb script to update the header file
13 according to kernel version and build option
14 before executing function awareness
15 kernel symbol must be loaded : symbol nuttx
16
17 define awareness
18 set logging off
19 set logging file nuttx_header.h
20 set logging on
21
22 printf "#define PID %p\n",&((struct tcb_s *)(0))->pid
23 printf "#define XCPREG %p\n",&((struct tcb_s *)(0))->xcp.regs
24 printf "#define STATE %p\n",&((struct tcb_s *)(0))->task_state
25 printf "#define NAME %p\n",&((struct tcb_s *)(0))->name
26 printf "#define NAME_SIZE %d\n",sizeof(((struct tcb_s *)(0))->name)
27 end
28
29
30 OR ~/.gdbinit
31
32
33 define hookpost-file
34
35 if &g_readytorun != 0
36 eval "monitor nuttx.pid_offset %d", &((struct tcb_s *)(0))->pid
37 eval "monitor nuttx.xcpreg_offset %d", &((struct tcb_s *)(0))->xcp.regs
38 eval "monitor nuttx.state_offset %d", &((struct tcb_s *)(0))->task_state
39 eval "monitor nuttx.name_offset %d", &((struct tcb_s *)(0))->name
40 eval "monitor nuttx.name_size %d", sizeof(((struct tcb_s *)(0))->name)
41 end
42
43 end
44
45 */
46
47 /* default offset */
48 #define PID 0xc
49 #define XCPREG 0x70
50 #define STATE 0x19
51 #define NAME 0xb8
52 #define NAME_SIZE 32
53
54 /* defconfig of nuttx */
55 /* #define CONFIG_DISABLE_SIGNALS */
56 #define CONFIG_DISABLE_MQUEUE
57 /* #define CONFIG_PAGING */
58
59
60 #endif /* OPENOCD_RTOS_NUTTX_HEADER_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)