2

I'm trying to setup FreeRTOS with XC8 compiler with no success. I've searched over internet but there is not much information about it. I am using a PIC18F46K80 so I can't use C18 because it's not supported.

I am trying to compile this minimal program:

#include <p18f46k80.h>
#include <stdlib.h>

#include <FreeRTOS.h>

int main(int argc, char** argv) {

    return (EXIT_SUCCESS);
}

I have included the corresponding paths to the compiler:

enter image description here

And the error I'm getting is this:

FreeRTOS/Source/include\timers.h:71: error: (103) #error: "include FreeRTOS.h must appear in source files before include timers.h"

FreeRTOS/Source/include\task.h:71: error: (103) #error: "include FreeRTOS.h must appear in source files before include task.h"

You can clearly see I'm including FreeRTOS.h. I tried for example in timers.h to manually add the #define here:

#ifndef INC_FREERTOS_H
    #error "include FreeRTOS.h must appear in source files before include timers.h"
#endif

The error gets away but I get a lot of new errors. Is not possible to use FreeRTOS with XC8? Are there any other free RTOS available for XC8?

Andres
  • 6,080
  • 13
  • 60
  • 110

1 Answers1

0

I tried with C18 but the newest versions of FreeRTOS doesn't compile anymore. Due to fragmented architecture on PIC18 FreeRTOS is not supporting them anymore, neither the community, so if you want to use RTOS better to try with PIC24 or higher or try some simpler RTOS designed only for PIC18!

Andres
  • 6,080
  • 13
  • 60
  • 110