AnsweredAssumed Answered

using Keil RL-RTX with STemWin

Question asked by das.souvik on Sep 27, 2013
Latest reply on Sep 27, 2013 by Clive One

Dear Sir,

I'm using STM32F4-DISCOVERY. I've to run the STemWin on this board with keil RL-RTX. I've made all the necessary GUI and LCD configurations and have added GUI_X_RTX.c from the Segger folder in Keil uVision. I've packed the whole of the GUI part in a single task 'GRAPHICS' as follows in main function.
But my GRAPHICS task never runs.I'm not having any compiling or linking errors though.

 

How can I use KEIL RL-RTX to do this job?I found examples of implementing emWin with embos ang freertos kernel, but haven't found any hint or anything to do it with Keil RL-RTX. I've done all my project with this. so can't just swich to some other RTOS. My main.c looks like this.

""

#include <RTL.h>
#include "stm32f4xx.h"
#include "stm32f4_discovery.h"
#include "GUI.h"
#include "bsp.h"

#include "DIALOG.h"

OS_TID t_GRAPHICS;
OS_TID t_STEPPER;

extern void MainTask(void);
extern void LED_Init (void);
U16 COUNTER1;

/*********************************************************************
* Externals
*********************************************************************/
WM_HWIN CreateIntro(void);
uint8_t GUI_Initialized = 0;

* Main
*/
__task void GRAPHICS (void) {

os_evt_wait_and(0x0002,0xffff); NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);

//STM32f4_Discovery_LCD_Init();

/* Initilize the BSP layer */ BSP_Init();

/* Activate the use of memory device feature */ WM_SetCreateFlags(WM_CF_MEMDEV);

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);

/* Init the STemWin GUI Library */ GUI_Init();

/*WM_SelectWindow(WM_HBKWIN); WM_SetDesktopColor(GUI_BLACK);*/

GUI_Initialized = 1;

MainTask(); for (;;);
}

__task void STEPPER (void) {

for(;;) {
os_evt_wait_and(0x0001,0xffff);
/* my code*/

}
}

void BSP_Background (void)
{ static uint32_t LED_ticks = 0; static uint32_t POINTER_ticks = 0;

if ( LED_ticks++ > 100 ) { LED_ticks = 0;

/* toggle LED1..4 each 100ms */ /* STM_EVAL_LEDToggle(LED4); STM_EVAL_LEDToggle(LED3); STM_EVAL_LEDToggle(LED5); STM_EVAL_LEDToggle(LED6);*/ }

if ( POINTER_ticks++ > 50 ) { POINTER_ticks = 0; /* Capture input event and updade cursor */ if(GUI_Initialized == 1) { BSP_Pointer_Update(); } }
}

#ifdef USE_FULL_ASSERT
/** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */
void assert_failed(uint8_t* file, uint32_t line)
{ /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

/* Infinite loop */ while (1) {}
} #endif

void delay(__IO uint32_t nCount)
{ __IO uint32_t index = 0; for (index = (100000 * nCount); index != 0; index--);
}

__task void init (void) {

 
t_GRAPHICS= os_tsk_create(GRAPHICS,0);
t_STEPPER= os_tsk_create(STEPPER,1);
os_evt_set (0x0001, t_STEPPER);
os_tsk_delete_self (); }

int main (void) {
LED_Init();
os_sys_init (init); /* Initialize RTX and start init */} ""

kindly someone help me to do this this....Just can't find what else I've to modify....

Outcomes