TODOPIC
Otros Microcontroladores / Dispositivos programables => Microcontroladores ARM => Mensaje iniciado por: george.manson.69 en 16 de Junio de 2018, 11:21:04
-
Hola que tal a todos,
Requiero de su expertos conocimientos para resolver algo del uso de freeRTOS, pues tengo el siguiente código que he realizo en MCUxpresso, donde incluyo las librerías de freeRTOS, pero lo curioso es que antes de colocar una función de freeRTOS por ejemplo vTaskStartScheduler(); me compila muy bien, pero ya cuando agrego la función me marca el siguiente error:
Description Resource Path Location Type
undefined reference to `vTaskStartScheduler' main.c /Practica -13- RTOS/src line 49 C/C++ Problem
Según esto debo de incluir lo que es:
freeRTOSConfig.h
port.h
portmacro.h
El micro en que lo quiero implementar es en un LPC4357, segun estuve leyendo el freeRTOS solo funciona en el nuclo de M4 y en M0 no, hablando solo de este micro.
/*
===============================================================================
Name : main.c
Author : $(author)
Version :
Copyright : $(copyright)
Description : main definition
===============================================================================
*/
#if defined (__USE_LPCOPEN)
#if defined(NO_BOARD_LIB)
#include "chip.h"
#include "retarget.h"
#include "FreeRTOS.h"
#include "task.h"
#else
#include "board.h"
#endif
#endif
#include <cr_section_macros.h>
// TODO: insert other include files here
// TODO: insert other definitions and declarations here
char str[10];
float f;
int main(void) {
#if defined (__USE_LPCOPEN)
// Read clock settings and update SystemCoreClock variable
SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
#if defined (__MULTICORE_MASTER) || defined (__MULTICORE_NONE)
// Set up and initialize all required blocks and
// functions related to the board hardware
Board_Init();
#endif
// Set the LED to the state of "On"
Board_LED_Set(0, true);
#endif
#endif
// TODO: insert code here
vTaskStartScheduler();
// Enter an infinite loop, just incrementing a counter
while(1) {
}
return 0 ;
}
https://drive.google.com/open?id=1j4Yb2u6YBazrku6zz2hdRBSaOGr1M8m2 (https://drive.google.com/open?id=1j4Yb2u6YBazrku6zz2hdRBSaOGr1M8m2)
https://drive.google.com/open?id=139U9LTPJ1LRtghyz2nd4WxDhAKEwarcd (https://drive.google.com/open?id=139U9LTPJ1LRtghyz2nd4WxDhAKEwarcd)
https://drive.google.com/open?id=1QK787LlLc53JRU77ZSW8G4-DP8Q1cR_w (https://drive.google.com/open?id=1QK787LlLc53JRU77ZSW8G4-DP8Q1cR_w)
¡Gracias Saludos!
-
De botepronto veo que FreeRTOS.h solo se incluye si NO_BOARD_LIB y __USE_LPCOPEN estan definidos, ¿lo estan?
Saludos
-
De botepronto veo que FreeRTOS.h solo se incluye si NO_BOARD_LIB y __USE_LPCOPEN estan definidos, ¿lo estan?
Saludos
Gracias por tu respuesta Carl47D, claro si esta definidos y si entran correctamente la libreria.
Cuando compilo sin usar ninguna funcion del freeRTOS pero si inluyendo los archivos .H, me compila muy bien,
pero solo agregando cualquier función del freeRTOS me dice que no encontro definicion de tal funcion. :?
De hecho en las imágenes que subi al google drive puedes notar que se pone en color negro la librería que no se usa.
¡Saludos!
-
Faltara definir las rutas del include a la libreria del FreeRTOS ?
-
Faltara definir las rutas del include a la libreria del FreeRTOS ?
Lo estuve revisando lo que me comentas KILLERJC, posiblemente sea por ese camino, estaré revisando detenidamente las librerías que se importo hacia el proyecto de MCUxpresso.
Gracias,
¡Saludos!