rtos: fix rtos no-auto configuration
[openocd.git] / src / rtos / FreeRTOS.c
index 93137733cb8010e7349d9e4a95814dd7a76facaf..6027d6739d021efb6a54297f43df9f84aa4326e0 100644 (file)
@@ -13,9 +13,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -101,7 +99,7 @@ static const struct FreeRTOS_params FreeRTOS_params_list[] = {
 
 #define FREERTOS_NUM_PARAMS ((int)(sizeof(FreeRTOS_params_list)/sizeof(struct FreeRTOS_params)))
 
-static int FreeRTOS_detect_rtos(struct target *target);
+static bool FreeRTOS_detect_rtos(struct target *target);
 static int FreeRTOS_create(struct target *target);
 static int FreeRTOS_update_threads(struct rtos *rtos);
 static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list);
@@ -223,7 +221,6 @@ static int FreeRTOS_update_threads(struct rtos *rtos)
                }
                rtos->thread_details->threadid = 1;
                rtos->thread_details->exists = true;
-               rtos->thread_details->display_str = NULL;
                rtos->thread_details->extra_info_str = NULL;
                rtos->thread_details->thread_name_str = malloc(sizeof(tmp_str));
                strcpy(rtos->thread_details->thread_name_str, tmp_str);
@@ -362,11 +359,10 @@ static int FreeRTOS_update_threads(struct rtos *rtos)
                        rtos->thread_details[tasks_found].thread_name_str =
                                malloc(strlen(tmp_str)+1);
                        strcpy(rtos->thread_details[tasks_found].thread_name_str, tmp_str);
-                       rtos->thread_details[tasks_found].display_str = NULL;
                        rtos->thread_details[tasks_found].exists = true;
 
                        if (rtos->thread_details[tasks_found].threadid == rtos->current_thread) {
-                               char running_str[] = "Running";
+                               char running_str[] = "State: Running";
                                rtos->thread_details[tasks_found].extra_info_str = malloc(
                                                sizeof(running_str));
                                strcpy(rtos->thread_details[tasks_found].extra_info_str,
@@ -430,7 +426,7 @@ static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, ch
                                                                                thread_id + param->thread_stack_offset,
                                                                                stack_ptr);
 
-       /* Check for armv7m with *enabled* FPU, i.e. a Cortex M4F */
+       /* Check for armv7m with *enabled* FPU, i.e. a Cortex-M4F */
        int cm4_fpu_enabled = 0;
        struct armv7m_common *armv7m_target = target_to_armv7m(rtos->target);
        if (is_armv7m(armv7m_target)) {
@@ -532,14 +528,14 @@ static int FreeRTOS_get_thread_ascii_info(struct rtos *rtos, threadid_t thread_i
 
 #endif
 
-static int FreeRTOS_detect_rtos(struct target *target)
+static bool FreeRTOS_detect_rtos(struct target *target)
 {
        if ((target->rtos->symbols != NULL) &&
                        (target->rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address != 0)) {
                /* looks like FreeRTOS */
-               return 1;
+               return true;
        }
-       return 0;
+       return false;
 }
 
 static int FreeRTOS_create(struct target *target)

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)