Hello,
I am evaluating RTX on various platforms. The first evaluation kit I tried was AT91SAM9263 and using examples and it went well. Since RTX example is not available for Cortex M3 (LM3S1968) applications, I used to common M config file (RTX_Config.h). However it doesn't proceed over os_sys_init (task1). Even after setting up the sysclktick (SysTickPeriodSet and SysTickEnable()) the os_sys_init enters IntDefaultHandler B area.
Please advise.
You need to start debugging to see what causes it to enter IntDefaultHandler...
It runs into INTDefaultHandler after SVC 0x00 command... May be I am missing some configuration related to SVC Handler...
0x00000938 F7FFFC37 BL.W os_set_env (0x000001AA) 0x0000093C 2200 MOVS r2,#0x00 0x0000093E 4611 MOV r1,r2 0x00000940 F2AF00ED ADR.W r0,{pc}-0xE9 ; @0x00000857 0x00000944 F8DFC024 LDR.W r12,[pc,#36] ; @0x0000096C 0x00000948 DF00 SVC 0x00
C code: os_sys_init (task1);
where task1 is:
__task void init (void) { t_phaseA = os_tsk_create (phaseA, 0); /* start task phaseA */ t_phaseB = os_tsk_create (phaseB, 0); /* start task phaseB */ t_ticker = os_tsk_create (ticker, 0);
os_sys_init_prio(ticker, 1); os_sys_init_prio(phaseA, 2); os_sys_init_prio(phaseB, 3);
os_tsk_delete_self (); }
Hello yanki doodle,
There are a lot of RTX examples for Cortex-M3 devices.
If you are looking for a RTX example for a Luminary CM3 device please check .\Keil\ARM\Boards\Luminary\ek-lm3s6965\RTX_Blinky. I think this example can easily be ported to a LM3S1968 device.
Best Regards, Martin Guenther
Thanks Martin... I referred the example, SVC_Handler was not set and hence it was a problem. I am not getting IntHandler any more, however there is a problem with timings. If I continue in debug mode by stepping or using breakpoints, the tasks are switched as expected (ofcourse not in real time). In the debug mode if I run the code from beginning it visits a ticker task only once and runs into os_idle_demon task.
The ticker task is as follows:
__task void ticker(void) { while (1) { os_evt_set (0x1, t_phaseA); os_dly_wait(50); //os_evt_set (0x1, t_phaseB); //os_dly_wait(50); } }
Just to add that the code is running in flash and display is updated, meaning tasks are running however debugger (ULIN2) is not stopping on the breakpoint after expected delay.
result = os_evt_wait_or(0x1, 10000);
if (result != OS_R_TMO) { <<breakpoint>> RIT128x96x4StringDraw(&pucHello[ulCol++], 0, 0, 11); .... .... ....
Any setting that I am missing which is required in RTX debugging?
Setting optimization level to zero does the trick, now breakpoints do take place.