rtos: remove config.h includes from stackings headers
[openocd.git] / src / rtos / nuttx.c
index 87b28c632c372dc489f3fe33c1339286796b6229..78271181e2e13bcfb43c98d883e4c7f57323a483 100644 (file)
@@ -21,7 +21,7 @@
 #include "server/gdb_server.h"
 
 #include "nuttx_header.h"
-
+#include "rtos_nuttx_stackings.h"
 
 int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size);
 
@@ -85,62 +85,6 @@ static char *task_state_str[] = {
 #endif /* CONFIG_PAGING */
 };
 
-/* see arch/arm/include/armv7-m/irq_cmnvector.h */
-static const struct stack_register_offset nuttx_stack_offsets_cortex_m[] = {
-       { ARMV7M_R0,    0x28, 32 },             /* r0   */
-       { ARMV7M_R1,    0x2c, 32 },             /* r1   */
-       { ARMV7M_R2,    0x30, 32 },             /* r2   */
-       { ARMV7M_R3,    0x34, 32 },             /* r3   */
-       { ARMV7M_R4,    0x08, 32 },             /* r4   */
-       { ARMV7M_R5,    0x0c, 32 },             /* r5   */
-       { ARMV7M_R6,    0x10, 32 },             /* r6   */
-       { ARMV7M_R7,    0x14, 32 },             /* r7   */
-       { ARMV7M_R8,    0x18, 32 },             /* r8   */
-       { ARMV7M_R9,    0x1c, 32 },             /* r9   */
-       { ARMV7M_R10,   0x20, 32 },             /* r10  */
-       { ARMV7M_R11,   0x24, 32 },             /* r11  */
-       { ARMV7M_R12,   0x38, 32 },             /* r12  */
-       { ARMV7M_R13,     0,  32 },             /* sp   */
-       { ARMV7M_R14,   0x3c, 32 },             /* lr   */
-       { ARMV7M_PC,    0x40, 32 },             /* pc   */
-       { ARMV7M_XPSR,  0x44, 32 },             /* xPSR */
-};
-
-
-static const struct rtos_register_stacking nuttx_stacking_cortex_m = {
-       .stack_registers_size = 0x48,
-       .stack_growth_direction = -1,
-       .num_output_registers = 17,
-       .register_offsets = nuttx_stack_offsets_cortex_m
-};
-
-static const struct stack_register_offset nuttx_stack_offsets_cortex_m_fpu[] = {
-       { ARMV7M_R0,    0x6c, 32 },             /* r0   */
-       { ARMV7M_R1,    0x70, 32 },             /* r1   */
-       { ARMV7M_R2,    0x74, 32 },             /* r2   */
-       { ARMV7M_R3,    0x78, 32 },             /* r3   */
-       { ARMV7M_R4,    0x08, 32 },             /* r4   */
-       { ARMV7M_R5,    0x0c, 32 },             /* r5   */
-       { ARMV7M_R6,    0x10, 32 },             /* r6   */
-       { ARMV7M_R7,    0x14, 32 },             /* r7   */
-       { ARMV7M_R8,    0x18, 32 },             /* r8   */
-       { ARMV7M_R9,    0x1c, 32 },             /* r9   */
-       { ARMV7M_R10,   0x20, 32 },             /* r10  */
-       { ARMV7M_R11,   0x24, 32 },             /* r11  */
-       { ARMV7M_R12,   0x7c, 32 },             /* r12  */
-       { ARMV7M_R13,     0,  32 },             /* sp   */
-       { ARMV7M_R14,   0x80, 32 },             /* lr   */
-       { ARMV7M_PC,    0x84, 32 },             /* pc   */
-       { ARMV7M_XPSR,  0x88, 32 },             /* xPSR */
-};
-
-static const struct rtos_register_stacking nuttx_stacking_cortex_m_fpu = {
-       .stack_registers_size = 0x8c,
-       .stack_growth_direction = -1,
-       .num_output_registers = 17,
-       .register_offsets = nuttx_stack_offsets_cortex_m_fpu
-};
-
 static int pid_offset = PID;
 static int state_offset = STATE;
 static int name_offset =  NAME;
@@ -380,7 +324,7 @@ static int nuttx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list
        return 0;
 }
 
-struct rtos_type nuttx_rtos = {
+const struct rtos_type nuttx_rtos = {
        .name = "nuttx",
        .detect_rtos = nuttx_detect_rtos,
        .create = nuttx_create,

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)