Hi,
I've an issue using prozessor expert. When creating over USBDM in KDS 3.2., I get the following error.
C:/Users/Michael/workspace.kds/pe-learn-1/Generated_Code/PE_Types.h:127:8: error: expected identifier or '(' before '__asm'
Can you please check and correct the coworking of USBDM, PE and KDS 3.2.?
-Michael
I would really apprechiate any support here.
Dear Erich.
I definitly did not change anything on the toolchain, i used KDS3.2 right away, as it came from the installer. There was a 2015 version installed, you were right. Now I pressed update and have the following versions:
I made sure, that I've defined the arm-gcc nxp delivers:
(USBDM->Configure)
I decided to create a brand-new project with the USB-DM Wizzard.
and created a brand new project. I made sure, I selected the dialect you told me.
Hitting now compile returns the same error.
13:31:57 **** Incremental Build of configuration Debug for project pelearn4 ****
usbdm-make all
'Building file: ../Static_Code/System/CPU_Init.c'
'Invoking: ARM C Compiler'
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g3 -O3 -ffunction-sections -fdata-sections -DDEBUG_BUILD -DCPU_MK22FN512VLH12 -I"C:/Users/Michael/workspace.kds/pelearn4/Sources" -I"C:/Users/Michael/workspace.kds/pelearn4/Project_Headers" -I"C:/Users/Michael/workspace.kds/pelearn4/Generated_Code" -I"C:/Users/Michael/workspace.kds/pelearn4/Static_Code/IO_Map" -I"C:/Users/Michael/workspace.kds/pelearn4/Static_Code/PDD" -I"C:/Users/Michael/workspace.kds/pelearn4/Static_Code/System" -I"C:/Users/Michael/workspace.kds/pelearn4/Sources" -Wall -std=gnu11 -c -fmessage-length=0 -MT"Static_Code/System/CPU_Init.o" -MMD -MP -MF"Static_Code/System/CPU_Init.d" -MT"Static_Code/System/CPU_Init.d" -o "Static_Code/System/CPU_Init.o" ../Static_Code/System/CPU_Init.c
In file included from ../Static_Code/System/CPU_Init.c:51:0:
C:/Users/Michael/workspace.kds/pelearn4/Generated_Code/PE_Types.h:127:8: error: expected identifier or '(' before '__asm'
static __asm __inline void Cpu_EnterCritical(volatile uint8_t *SR_reg)
^
C:/Users/Michael/workspace.kds/pelearn4/Generated_Code/PE_Types.h:153:8: error: expected identifier or '(' before '__asm'
static __asm __inline void Cpu_ExitCritical(volatile uint8_t *SR_reg)
^
usbdm-make: *** [Static_Code/System/CPU_Init.o] Error 1
13:31:57 Build Finished (took 450ms)
Looking where the error is, we can see that it's the inline assembler.
/* Prevents the activation of all exceptions by writing to priority mask register */
#ifdef _lint
#define Cpu_EnterCritical(SR_reg) /* empty */
#else
static __asm __inline void Cpu_EnterCritical(volatile uint8_t *SR_reg)
{
PUSH {R0,R1}
MRS R1, FAULTMASK
CPSID f
STRB R1, [R0]
POP {R0,R1}
BX LR
ALIGN 4
}
#endif
I made as many screenshoots as possible so that you can understand where my problem is. I'm pretty desperate right now. Please help!
-Michael
Maybe I am looking in the wrong dialog?
Thanks for the help in advance.
-Michael
Hi Michael,
you are definitely not using the GNU ARM Eclipse build tool integration which comes by default with Kinetis Design Studio V3.2.0 which are these:
So it seems that you are a different kind of project/plugins?
What are you using?
Erich
Dear Erich, thanks for the quick reply.
[Clicking on Property]->Projects->MISC->And then i found your option. It looked a litte bit different, but I think C11 is already enabled.
Sorry, didn't fix it. Any more ideas?
Dear Michael,
I don't see that MISC page? Can you show a screenshot?
Erich
Hi Michael,
if __asm("....") is accepted or not depends on your compiler language settings. I think you ahve set it to C90 where asm() (and not __asm() is supported. I recommend you change the settings to C99 or C11:
I hope this helps,
Erich