10 years, 9 months ago.

Using RTOS with KL46Z

My project compiles and runs beautifully on mbed LPC1768, likewise on KL25Z, unable to compile for KL46Z target however, compiler reports errors :-

Error: Identifier "OS_TASKCNT" is undefined in "mbed-rtos/rtx/RTX_CM_lib.h", Line: 93, Col: 32

Error: Identifier "OS_CLOCK" is undefined in "mbed-rtos/rtx/RTX_CM_lib.h", Line: 95, Col: 32

Error: Identifier "INITIAL_SP" is undefined in "mbed-rtos/rtx/RTX_CM_lib.h", Line: 241, Col: 37

Error: Identifier "OS_SCHEDULERSTKSIZE" is undefined in "mbed-rtos/rtx/RTX_CM_lib.h", Line: 241, Col: 79

Not essential to run on KL46Z, but would be nice to say "it works on all three."

Thanks

1 Answer

10 years, 9 months ago.

This fork should work with the KL46Z: http://mbed.org/users/marcusbirkin/code/mbed-rtos/

The official one lacks some defines for the KL46Z. I would make them and create a pull request, problem is that I don't know what they should be. That fork has them on the same values as the KL25Z, but since the KL46Z has double the SRAM for example, that might not be ideal.

Accepted Answer

Thanks, can now also compile and test on KL46Z.

posted by Jon Freeman 07 Feb 2014

Yes the values have just been copied from the KL25Z, it was a quick fix to make it compile! At some point I'll read the datasheet and update the values.

posted by Marcus Birkin 14 Mar 2014