- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a fix or setting adjustment for the main.c main loop code created?
Every new project I create sets up main loop "void main()" which results in warning that main does not return "int".
So far I change the line to "int main()" and it is fine.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
void main() was default setting in PSoC Creator 2.2 CP7 and older versions ....
int main() is required for actual PSoC Creator 3.0 SP1 version.
Manually edit and all is OK.
Regards,
Viktor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
void main() was default setting in PSoC Creator 2.2 CP7 and older versions ....
int main() is required for actual PSoC Creator 3.0 SP1 version.
Manually edit and all is OK.
Regards,
Viktor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Victor,
I have been editing it every time I create a new project. My post is regarding wthere there is an update, patch or setting that saves having to edit this every time I create a new project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I create a new empty project main.c contains the lines
#include <project.h>
and
int main()
Probably you missed an update, did you try the Cypress Update Manager?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
1. update to the PSoC Creator 3.0 SP1
2. If you wish, you can modify the template file ... according your wishes, tradition etc.
C:\Program Files\Cypress\PSoC Creator\3.0\PSoC Creator\templates\projects\psocexeprjbase\main.c
Regards,
Viktor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the version I have installed. I would have thought the latest version would have mad eth change as default and not need to delve into changing templates (I will have a look at the template though, as I want to correct this. It is not a major issue but becomes an annoyance when I am creating lots of little projects to learn PSOC.
Environment:
PSoC Creator 3.0 SP1 (3.0.0.3023)
Culture: English (United States)
OS Version: Microsoft Windows NT 6.2.9200.0
CLR Version: 2.0.50727.8000
Installed CyInstaller Products:
PSoC Programmer 3.20.1
PSoC Creator 3.0 SP1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My apologies,
Earlier today I went to "upgrade" and left the pull down in the upgrade manager set to "Remove". After creatore was removed and I realised what I had done, I reinstalled it.
Just now I checked the template and it does declare main with "int" return. Therefore, I proceeded to create a new project and now it does declare main loop with return type of "int"
Thanks guys.