86e1765078f7c1df2292527d7c7449f310109755
[openocd.git] / src / rtos / rtos_ecos_stackings.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #ifdef HAVE_CONFIG_H
4 #include "config.h"
5 #endif
6
7 #include "rtos.h"
8 #include "rtos_standard_stackings.h"
9 #include "target/armv7m.h"
10
11 /* For Cortex-M eCos applications the actual thread context register layout can
12 * be different between active threads of an application depending on whether
13 * the FPU is in use, configured for lazy FPU context saving, etc. */
14
15 /* Default fixed thread register context description used for older eCos
16 * application builds without the necessary symbolic information describing the
17 * actual configuration-dependent offsets. */
18 static const struct stack_register_offset rtos_ecos_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS] = {
19 { ARMV7M_R0, 0x0c, 32 }, /* r0 */
20 { ARMV7M_R1, 0x10, 32 }, /* r1 */
21 { ARMV7M_R2, 0x14, 32 }, /* r2 */
22 { ARMV7M_R3, 0x18, 32 }, /* r3 */
23 { ARMV7M_R4, 0x1c, 32 }, /* r4 */
24 { ARMV7M_R5, 0x20, 32 }, /* r5 */
25 { ARMV7M_R6, 0x24, 32 }, /* r6 */
26 { ARMV7M_R7, 0x28, 32 }, /* r7 */
27 { ARMV7M_R8, 0x2c, 32 }, /* r8 */
28 { ARMV7M_R9, 0x30, 32 }, /* r9 */
29 { ARMV7M_R10, 0x34, 32 }, /* r10 */
30 { ARMV7M_R11, 0x38, 32 }, /* r11 */
31 { ARMV7M_R12, 0x3c, 32 }, /* r12 */
32 { ARMV7M_R13, -2, 32 }, /* sp */
33 { ARMV7M_R14, -1, 32 }, /* lr */
34 { ARMV7M_PC, 0x40, 32 }, /* pc */
35 { ARMV7M_XPSR, -1, 32 }, /* xPSR */
36 };
37
38 const struct rtos_register_stacking rtos_ecos_cortex_m3_stacking = {
39 .stack_registers_size = 0x44,
40 .stack_growth_direction = -1,
41 .num_output_registers = ARMV7M_NUM_CORE_REGS,
42 .calculate_process_stack = rtos_generic_stack_align8,
43 .register_offsets = rtos_ecos_cortex_m3_stack_offsets
44 };

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)