rtos: Freescale MQX rtos support

ARMv7E-M (CortexM4) architecture

- fix position offset of r2,r3 registers on exception stack
- switch 'calloc' arguments
- remove prototypes of internal function and typedefs
- add NULL check for alloc functions
- remove last line of license "Franklin Street, Fifth Floor"
  because of 'checkpatch' validation
- environment: jlink + twrk60n512

Change-Id: I70840ded15b17dd945ca190ce31e2775078da2d9
Signed-off-by: Marian Cingel <cingel.marian@gmail.com>
Reviewed-on: http://openocd.zylin.com/2353
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Marian Cingel
2014-10-03 14:15:16 +02:00
committed by Paul Fertser
parent dab4adb5ec
commit c50047bb41
5 changed files with 674 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ extern struct rtos_type eCos_rtos;
extern struct rtos_type Linux_os;
extern struct rtos_type ChibiOS_rtos;
extern struct rtos_type embKernel_rtos;
extern struct rtos_type mqx_rtos;
static struct rtos_type *rtos_types[] = {
&ThreadX_rtos,
@@ -43,6 +44,7 @@ static struct rtos_type *rtos_types[] = {
&Linux_os,
&ChibiOS_rtos,
&embKernel_rtos,
&mqx_rtos,
NULL
};
@@ -303,7 +305,7 @@ int rtos_thread_packet(struct connection *connection, char const *packet, int pa
if (detail->extra_info_str != NULL)
str_size += strlen(detail->extra_info_str);
char *tmp_str = malloc(str_size + 7);
char *tmp_str = calloc(str_size + 7, sizeof(char));
char *tmp_str_ptr = tmp_str;
if (detail->display_str != NULL)