FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2014 Threads]
Hi,
I need help with Trace recorder library integration. I'm using Keil and STM32F407.
I included recorder library in my project but when I try to compile I got an error which I don't know how to fix. Error is in code:
void prvTraceEnableIRQ(void)
{
asm volatile ("cpsie i");
}
void prvTraceDisableIRQ(void)
{
asm volatile ("cpsid i");
}
void prvTraceSetIRQMask(uint32_t priMask)
{
asm volatile ("MSR primask, %0;" : : "r" (priMask));
}
uint32t prvTraceGetIRQMask(void)
{
uint32t result;
asm volatile ("MRS %0, primask" : "=r" (result));
return result;
}
Error says:
GenericRecorderLibSrctrcHardwarePort.c(65): error: #20: identifier "asm" is undefined
GenericRecorderLibSrctrcHardwarePort.c(65): error: #65: expected a ";"
Thank you for your help!
It looks like you are trying to use GCC syntax in a Keil project. IAR will generally let you do that, but Keil won't.
You need to look in the Keil manual to see what to do, but as a head start
asm volatile ("cpsie i"); can be replaced with _enableirq();
Likewise asm volatile ("cpsid i"); can be replaced with _disableirq();
I imagine there is another such intrinsic to get the primask value.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.