X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2FFreeRTOS.c;h=598e2d6627caebaf77ea5c6915abc3c7e354cf17;hp=51bd35e4ef4b4a9ff61d84a74ab2fc0b0c5eb1f8;hb=d36889e692788d4dc4acabd073d57f4a178e3172;hpb=b7d2cdc0d4fc319169c60362708a67e2ff626525 diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c index 51bd35e4ef..598e2d6627 100644 --- a/src/rtos/FreeRTOS.c +++ b/src/rtos/FreeRTOS.c @@ -15,7 +15,7 @@ * 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., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -72,7 +72,19 @@ const struct FreeRTOS_params FreeRTOS_params_list[] = { 0, /* thread_stack_offset; */ 52, /* thread_name_offset; */ &rtos_standard_Cortex_M3_stacking, /* stacking_info */ - } + }, + { + "nds32_v3", /* target_name */ + 4, /* thread_count_width; */ + 4, /* pointer_width; */ + 16, /* list_next_offset; */ + 20, /* list_width; */ + 8, /* list_elem_next_offset; */ + 12, /* list_elem_content_offset */ + 0, /* thread_stack_offset; */ + 52, /* thread_name_offset; */ + &rtos_standard_NDS32_N1068_stacking, /* stacking_info */ + }, }; #define FREERTOS_NUM_PARAMS ((int)(sizeof(FreeRTOS_params_list)/sizeof(struct FreeRTOS_params))) @@ -161,25 +173,7 @@ static int FreeRTOS_update_threads(struct rtos *rtos) } /* wipe out previous thread details if any */ - if (rtos->thread_details != NULL) { - int j; - for (j = 0; j < rtos->thread_count; j++) { - if (rtos->thread_details[j].display_str != NULL) { - free(rtos->thread_details[j].display_str); - rtos->thread_details[j].display_str = NULL; - } - if (rtos->thread_details[j].thread_name_str != NULL) { - free(rtos->thread_details[j].thread_name_str); - rtos->thread_details[j].thread_name_str = NULL; - } - if (rtos->thread_details[j].extra_info_str != NULL) { - free(rtos->thread_details[j].extra_info_str); - rtos->thread_details[j].extra_info_str = NULL; - } - } - free(rtos->thread_details); - rtos->thread_details = NULL; - } + rtos_free_threadlist(rtos); /* read the current thread */ retval = target_read_buffer(rtos->target,