Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Issue building demo code in Crossworks
Jump...
Cancel
Locked
Locked
Replies
2 replies
Subscribers
118 subscribers
Views
2538 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Issue building demo code in Crossworks
John Gill
over 12 years ago
Note: This was originally posted on 24th September 2010 at
http://forums.arm.com
I recently purchased (3) LCD-DEMO-LPC2158 kits for a home project. I am trying to compile the demo code provided by the manufacturer, FDI. The code was compiled in version 1.7 of uVision. When I try to compile in CrossWorks, I am getting errors. I am currently using the 30-day trial of Crossworks, and am not sure if there are limitations on the demo application, if I need to configure the tool, or if this code is not supported.
Snippet of code failing:
void CPUDisableInterrupts(void) __arm
{
__asm {
MRS R1, CPSR
ORR R1,R1,#0xC0
MSR CPSR_cxsf, R1
}
return;
}
Errors during build:
expected declaration specifiers before '__arm'
stray '#' in program
expected '=', ',',';', 'asm' or '__attribute__' before '{' token
Any help would be greatly appreciated
Martin Weidmann
over 12 years ago
Note: This was originally posted on 24th September 2010 at
http://forums.arm.com
By convention anything starting with "__" (double underscore) is something that is tool chain specific. The __asm directive with armcc (the Keil/RVDS compiler) lets you include inline assembler. It looks like the CrossWorks tools don't support __asm. They might have an equivalent, but it would mean porting the code.
Cancel
Vote up
0
Vote down
Cancel
Simon Craske
over 12 years ago
Note: This was originally posted on 24th September 2010 at
http://forums.arm.com
As far as I'm aware, CrossWorks doesn't support inline assembler, though its documentation suggests that this might work:
#include <libarm.h>
void CPUDisableInterrupts(void)
{
libarm_disable_irq_fiq();
}
hth
s.
Cancel
Vote up
0
Vote down
Cancel