using portSAVE_CONTEXT in IAR v850

alessand01 wrote on Monday, July 04, 2011:

Hi,
I’m having linking problems using portSAVE_CONTEXT and portRESTORE_CONTEXT. I’m using IAR for V850. I included <portmacro.h> in the cpp file that contains calls to these functions. I have also declared them as extern “C” functions but linker says:
Error: Undefined external “portSAVE_CONTEXT” referred in main

What 's wrong with that? Does it happens to anybody? Does anyone know the solution?

Thank you

rtel wrote on Monday, July 04, 2011:

You should never have to include portmacro.h in an application file, just FreeRTOS.h, then the header file that includes the API function you are using (tasks.h, queue.h, semphr.h or timers.h).

Does the project that comes in the FreeRTOS zip file download build, unmodified?

Regards.

alessand01 wrote on Monday, July 04, 2011:

Yes, it builds unmodified.

Thanks