- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The device is developed using PSOC5 (PSoc Creator 4.3) on CY8C5888AXI-LP096.
Although cyPm.h is generated by the code generation at compile time, the following generated code causes a compile error.
#define CY_PM_WFI asm volatile ("WFI \n")
"__asm" should be generated, but "asm" is generated.
Please tell me how to solve it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To update the cy_boot, right click project and navigate to "Update Components" item. Click it and then the cy_boot shows as the following capture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried on my end that I have correct macro defined in line#205 cyPm.h -
#else /* ASM for GCC & IAR */
#define CY_PM_WFI __asm volatile ("WFI \n")
#endif /* (__ARMCC_VERSION) */
This file located in the following path on my end - C:\Program Files (x86)\Cypress\PSoC Creator\4.3\PSoC Creator\psoc\content\CyComponentLibrary\CyComponentLibrary.cylib\cy_boot_v5_90\PSoC5\API
What's your compiler used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your comment.
The compiler is using:
ARM GCC 5.4-2016-q2-update
Also, the gcc settings are attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you find out the specific cyPm.h file under your PSoC Creator installaiton path?
Is it correct or not correct? Generally, this file should has no such error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I investigated PSoC Creator installaiton path.
cy_boot_v4_x is defined as "asm", and cy_boot_v5_x is defined as "__asm".
The file header of the automatically generated cyPm.h is as follows.
* File Name: cyPm.h
* Version 4.0
I assume that using v5 components will clear the error, but I don't know how to select the version of the cy_boot component.
Please teach me how to select the version of the cy_boot component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To update the cy_boot, right click project and navigate to "Update Components" item. Click it and then the cy_boot shows as the following capture.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I stumbled upon this topic dealing with the same issue using PSoC Creator 2.2 and trying to compile my code using the C99 standard.
In that version of PSoC Creator, I did not have the option to upgrade to a newer cy_boot component.
The issue arises because the generated code uses "asm" for assembler code.
This is a construct that is gcc specific.
In the C99 standard, the construct "__asm__" is introduced.
So when gcc is configured to build with "-std=c99" it only allows the "__asm__" construct.
Therefore, in my case I needed to make sure not to compile with "-std=c99".