Thanks for response. The thing is, that I don't use any ISRs yet. The
debugger doesn't even step into a SystemTask (PE_SystemTask()). Following
happens when I debug:
void main(void)
{
PE_low_level_init();
RandomSem = uCOS1_OSSemCreate(1);
OSStart();
}
void PE_low_level_init(void)
{
.....
Inhr1_Init(); //init timer for RTOS ticks
__EI();
OSInit();
OSTaskCreate(PE_SystemTask, NULL, (void *)&PE_SystemTaskStk[0], 0);
}
void OSStart (void)
{
INT8U y;
INT8U x;
if (OSRunning == FALSE) {
y = OSUnMapTbl[OSRdyGrp];
x = OSUnMapTbl[OSRdyTbl[y]];
OSPrioHighRdy = (INT8U)((y << 3) + x);
OSPrioCur = OSPrioHighRdy;
OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy];
OSTCBCur = OSTCBHighRdy;
OSStartHighRdy(); // <==== debugger jumps from
here to Inhr1_Init() and then back to the beginning of main.
}
}
It seems that there is some error in a port made by Processor Expert, or I do
something wrong (more likely)...I will be really grateful for help.
Regards
Bartek
l...@netscape.net napisa:
>Hello,
>
>You need to make sure that you save all of the registers in your interrupt
service routines using
>
>#pragma alignsp save_all
>
>and also add uCOS-II support code to your interrupt service routines.? This
code is:
>
>to the beginning of the routine add -
>
>? // support uCOS???
>? OS_ENTER_CRITICAL();????????????????????????????????????????
>???? OSIntNesting++;?????????????????? /* Increment interrupt nesting */???
>? OS_EXIT_CRITICAL();
>to the end of the routine add -
>
>? uCOS1_OSIntExit();???????????// Decrement the nesting counter
>?????????????????????????????????????? // and if 0 then determine if whether or
not
>?????????????????????????????????????? // a higher priority task has been
awakened
>?????????????????????????????????????? // by an ISR.???
>
>lmf
>-----Original Message-----
>From: wicherba
>To: m...
>Sent: Tue, 11 Sep 2007 11:10 am
>Subject: [motoroladsp] uCOS for dsp56807
>Hello,
>
>I am trying to make the uCOS-II (v. 2.76) work on the dsp56807 with
>use of CodeWarrior 7.0. PE does not provide any example of using uCOS
>with this CPU so I have:
>
>- created a new project for dsp56807
>- added the uCOS beam
>- added the uCOS files to the 'code' directory and to the project as
>'user beams'. I also made some minor changes in them (changing to ""
>in #includes, otherwise it doesn't compile)
>- copied a code from a uCOS example (CPUUtil) to my main project file
>- compiled the project
>
>It was possible to compile the project, but after running it, CPU was
>behaving at least weird. After invoking OSStart() the programm was
>returning to the very beginning of main() (it looks like a CPU
>reset). Does anybody know the reason of these problems? Have any of
>you tried to run uCOS dsp56807 (i.e. dsp568xx) ? Any hints?
>
>Regards
>
>Bartek
>