Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Dependents:   denki-yohou_b TestY201 Network-RTOS NTPClient_HelloWorld ... more

Issue: KL05Z (Closed: Fixed)

The mbed-rtos source are missing #ifdef options for the KL05Z. Importing the basic_rtos project and building fails.

To fix:

In RTX_Conf_CM.c Adding:

defined(TARGET_KL05Z)

after all the places where the KL25Z is defined

and in RTX_CM_lib.h Adding:

  1. elif defined(TARGET_KL05Z)
  2. define INITIAL_SP (0x20000C00UL)

after the similar section for the KL25Z

appears to fix things.

3 comments:

11 Apr 2014

Hello nicholas chen,

thanks for reporting an issue. The KL05Z is not supported by mbed RTOS at the moment. Are you familiar with git ? There is the mbed repository on github where you can issue a new pull request with this addition or also report issues.

I can test and add KL05Z there.

Regards,
0xc0170

11 Apr 2014

Sorry about mangling the code in my initial post.

Add defined(TARGET_KL05Z)" to the parts of the code that are ifdef based on the target. e.g.

RTX_Conf_CM.c

#  elif defined(TARGET_LPC11U24) || defined(TARGET_LPC11U35_401)  || defined(TARGET_LPC11U35_501) || defined(TARGET_LPC1114) || defined(TARGET_LPC812) || defined(TARGET_KL25Z) || defined(TARGET_KL05Z) || defined(TARGET_STM32F100RB)  || defined(TARGET_STM32F051R8)

And then add the following line:

RTX_CM_lib.h

// This define should be probably moved to the CMSIS layer
#if   defined(TARGET_LPC1768)
#define INITIAL_SP            (0x10008000UL)
<...>
#elif defined(TARGET_KL05Z)
#define INITIAL_SP            (0x20000C00UL)
<...>
11 Apr 2014

Ah, thanks for the pointer to the git site. I'll continue the discussion there.