cancel
Showing results for 
Search instead for 
Did you mean: 

CMSIS-RTOS RTX Version 4.74 osThreadID function compiling warning #144-D

jim_wei
Associate II
Posted on January 14, 2014 at 03:19

Hello,

I am using STM32F4 Discovery board, uVision V5.1.0.0 development environment which comes with CMSIS-RTOS RTX  Version 4.74.  In the document for this version of CMSIS-RTOS RTX, the following  code example is given:

void

threadX (

void

const

*argument);

/* Thread IDs */

/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/cmsis__os_8h.html&sharpadfeb153a84a81309e2d958268197617f

main_id;

/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/cmsis__os_8h.html&sharpadfeb153a84a81309e2d958268197617f

threadX_id;

/* Thread definitions */

/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/group___c_m_s_i_s___r_t_o_s___thread_mgmt.html&sharpgaee93d929beb350f16e5cc7fa602e229f

(threadX,

/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/group___c_m_s_i_s___r_t_o_s___thread_mgmt.html&sharpga7f2b42f1983b9107775ec2a1c69a849aa45a2895ad30c79fb97de18cac7cc19f1

, 1, 0);

However, when I compile my code:

void sine_gen(void);

osThreadDef (sine_gen, osPriorityAboveNormal, 1, 0);

The following warning message poped up:

src\DirtyFilter.c(76): warning:  &sharp144-D: a value of type ''void (*)(void)'' cannot be used to initialize an entity of type ''os_pthread'' osThreadDef (sine_gen, osPriorityAboveNormal, 1, 0);

I don't understand it.  Could anyone please help to explain?  Thanks in advance.

Jim

null
1 REPLY 1
chen
Associate II
Posted on January 14, 2014 at 11:42

Hi

The error is saying that the function you defined does not match the parameter argument list needed by osThreadDef ()

You wrote :

void sine_gen(void);

What is required :

void sine_gen(

void

 

const

 * args)