main.c not updated?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
JoLo_1693126
Level 3
Level 3
First like received First like given

I initially started with the BLE and capsense project.  It created all the files without problem. Then I moved to the robot project (were it controls 2 motors).  What I did was copy the project and deleted what was on the TopDesign. Then create the attach on the TopDesign on the now empty TopDesign. But when I "Generate Application" from the Build menu, the main.c isn't updated.

Please advise.

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Joseph,

The main.c will not be re-generated just like the other part of the code. The component related code will be updated according to the changes in the settings you have made in the schematic. The required API's to control the component are created in the re-generated code. Now you can use main.c to pogram the device according to your need. You may have to modify the main.c file according to your requirement.


The following video series might be helpful to get used to PSoC environment.

https://www.cypress.com/video-library/PSoC/psoc-101-introduction-psoc-101/387726

Best Regards,
Vasanth

View solution in original post

3 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Joseph,

The main.c will not be re-generated just like the other part of the code. The component related code will be updated according to the changes in the settings you have made in the schematic. The required API's to control the component are created in the re-generated code. Now you can use main.c to pogram the device according to your need. You may have to modify the main.c file according to your requirement.


The following video series might be helpful to get used to PSoC environment.

https://www.cypress.com/video-library/PSoC/psoc-101-introduction-psoc-101/387726

Best Regards,
Vasanth

Hi Vasanth,

How is it that the BLE original project generated the correct main.c in the first place?  More details on my issue.  When I moved to the robot project, the main.c is still has code that reflects the BLE project and zero code for the robot project.

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Joseph,

From where did you get the project ? If you  have opened an archived project the main.c is will have contents. If you creating a project from scratch main.c is blank. I saw this main.c  file in github for the project you are looking for,

bleapp/main.c at master · cypresssemiconductorco/bleapp · GitHub

Best Regards,
Vasanth R S

0 Likes