- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello to all,
I have build a project but there are some warnings & notes.
I want to revise the following warnings:
1、left shift count >= width of type [-Wshift-count-overflow]
2、listing the stack pointer register 'sp' in a clobber list is deprecated [-Wdeprecated]
Can you please help me to get rid of this warning?
Best Wishes,
JCD
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @JCD ,
1. I was not able to locate CY_STARTUP_CM0_DP_STATE and CY_STARTUP_IPC7_DP_OFFSET. Are these user defined macros? Also please let me know the modus toolbox version you are using as well.
2. I'm afraid this warning is due to the latest GCC compiler that is being used. If you refer to section 6.47.2.6 Clobbers and Scratch Registers of the "Extended Asm - Assembler Instructions with C Expression Operands" for GCC 10.3.0 (Modus Toolbox uses GCC 10.3.1), it is clearly mentioned that they are deprecating the use of stack pointer in the clobber list and in future version they may change this warning to an error.
I tried removing the clobber list in your code as below :
__asm volatile(" MSR msp, %[sp]\n"
" BX %[address]\n"::[sp]"r"(stackPointer),[address]"r"(address):);
This built without the stack pointer warning.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @JCD ,
1. I was not able to locate CY_STARTUP_CM0_DP_STATE and CY_STARTUP_IPC7_DP_OFFSET. Are these user defined macros? Also please let me know the modus toolbox version you are using as well.
2. I'm afraid this warning is due to the latest GCC compiler that is being used. If you refer to section 6.47.2.6 Clobbers and Scratch Registers of the "Extended Asm - Assembler Instructions with C Expression Operands" for GCC 10.3.0 (Modus Toolbox uses GCC 10.3.1), it is clearly mentioned that they are deprecating the use of stack pointer in the clobber list and in future version they may change this warning to an error.
I tried removing the clobber list in your code as below :
__asm volatile(" MSR msp, %[sp]\n"
" BX %[address]\n"::[sp]"r"(stackPointer),[address]"r"(address):);
This built without the stack pointer warning.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad the solution helps.
Thank you for using Infineon products and please reach out to us in case of any further queries you may have on our products.