Baje el port del sitio de micrium para el PIC24, solo que no utilizo el pic para el que esta hecho el port, sino para el 24FJ256GB110. Luego lo "limpie" dejando solamente la tarea principal y a partir de ella solo quiero crear una tarea para hacer parpadear un led por ahora.
Logre hacer que compile, cosa que el original bajado no lo hacia.
A pesar de que compila, el codigo no vuelve nunca de la funcion OSTimeDly la primera vez que se la llama, se queda "dando vueltas" en OS_Sched().
Pongo a continuacion el app.c (archivo donde recomiendan poner el port):
/*
*********************************************************************************************************
* uC/OS-II
* The Real-Time Kernel
*
* (c) Copyright 2006, Micrium, Weston, FL
* All Rights Reserved
*
*
* Microchip Application Code
*
* File : APP.C
* By : Eric Shufo
*********************************************************************************************************
*/
#include <includes.h>
/*
*********************************************************************************************************
* CONSTANTS
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* STACKS
*********************************************************************************************************
*/
#define APP_TASK_START_STK_SIZE 128
/*
*********************************************************************************************************
* VARIABLES
*********************************************************************************************************
*/
OS_STK Start_TaskStk[APP_TASK_START_STK_SIZE];
OS_STK DisplayStk[APP_TASK_START_STK_SIZE];
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
void Displays(void *pdata);
/*
*********************************************************************************************************
* STARTUP TASK
*
* Description : This is an example of a startup task. As mentioned in the book's text, you MUST
* initialize the ticker only once multitasking has started.
*
* Arguments : p_arg is the argument passed to 'AppStartTask()' by 'OSTaskCreate()'.
*
* Notes : 1) The first line of code is used to prevent a compiler warning because 'p_arg' is not
* used. The compiler should not generate any code for this statement.
* 2) Interrupts are enabled once the task start because the I-bit of the CCR register was
* set to 0 by 'OSTaskCreate()'.
*********************************************************************************************************
*/
void Task_START(void *p_arg)
{
int i_data;
CPU_INT08U i;
CPU_INT08U j;
(void)p_arg;
BSP_Init(); /* Initialize BSP functions */
//#if OS_TASK_STAT_EN > 0
// OSStatInit(); /* Determine CPU capacity */
//#endif
OSTaskCreate(Displays, (void *)0, &DisplayStk[0], 1);
i_data = *((int *)p_arg);
// task loop
for(;
{
OSTimeDly(100);
}
}
/*
*********************************************************************************************************
* main()
*
* Description : This is the standard entry point for C code.
* Arguments : none
*********************************************************************************************************
*/
CPU_INT16S main (void)
{
CPU_INT08U err;
int i_data;
BSP_IntDisAll(); /* Disable all interrupts until we are ready to accept them */
OSInit(); /* Initialize "uC/OS-II, The Real-Time Kernel" */
OSTaskCreate(Task_START, (void *)0, &Start_TaskStk[0], 0);
OSStart(); /* Start multitasking (i.e. give control to uC/OS-II) */
return (-1); /* Return an error - This line of code is unreachable */
}
void Displays(void *p_arg)
{
while(1)
{
PORTFbits.PORTF3=1;
OSTimeDlyHMSM(0,0,1,0);
PORTFbits.PORTF3=0;
OSTimeDlyHMSM(0,0,2,0);
}
}
Alguien logro hacer andar el PORT?? Mejor aun, con el 24FJ256GB110???