- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using CMake to build a PSoC 4 project. Until now I was doing some manual work to update or at least validate the CMakeLists.txt after regenerating the cypress API.
Now I discovered that those manual steps could be automated using `cyprjmgr -wrk ... -prj ... -export ...` command.
I tried exporting for all targets that are listed available. All of them throwed an unhandled exception:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at CyDesigner.Common.ProjMgmt.CyPrjMgr.BuildActionComplete[T](CyBuildStatus status, T buildDone)
at CyDesigner.Common.ProjMgmt.Model.CyPrjMgmtDebugBuildProvider.BuildSucceededOrSkipped(CyBuildStatus status, BuildDone callback)
at CyDesigner.Common.ProjMgmt.Model.CyBuildManager.<>c__DisplayClass6`1.<BeginBuild>b__4(CyBuildStatus status)
at CyDesigner.Common.ProjMgmt.Model.CyBuildManager.BuildExecutor.ExecuteBuild()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
It would also simplify things for me a lot if the makefile target would be available. Since the PSoC creator seems to know how to export a project to makefile, I suppose that it could also be possible with the help of the cyprjmgr CLI.
Thanks for all the help in advance and best regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vacovnik,
Can you please let me know the entire command that you tried? I tried it with a PSoC Creator PSoC 4 project and for me the export command succeded -
Unfortunately, makefile is not a valid target for the cyprjmgr tool.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vacovnik,
Can you please let me know the entire command that you tried? I tried it with a PSoC Creator PSoC 4 project and for me the export command succeded -
Unfortunately, makefile is not a valid target for the cyprjmgr tool.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rakshith,
Thank you for a quick reply.
Below, you can see the command I've been trying to use to export the project.
As stated before, I am mainly looking for option to export a project to makefile and then parse the output to set the target sources with CMake, but I think I could live with some other format, too. I will just need to learn how to parse it and mainly relate on `Export/PSoCCreatorExportIde.xml` file.
However I noticed something weird running the following command to regenerate the API:
The command finishes successfully, but no additional export data is created.
Best regards,
Marko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marko,
Can you please confirm if the project is building successfully in the PSoC Creator IDE? It seems like the issue is not with the export command. Would it be possible to share the project?
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rakshith,
Sorry for a late response.
I didn't work on that project much in the past week.
I did not try to build the project in the PSoC Creator IDE. I am writing the code in c++ so the only thing I would like the Creator to do for me is its API for my peripheral configuration.
However the API could be successfully generated from within the IDE and also exporting to makefile works just fine in IDE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vacovnik,
You did mention that the files/APIs were successfully generated from within the IDE. Can you please try the export command after this step? This is just to confirm whether the export command works at your end.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Rakshith,
As stated before, both API generation and exporting to makefiles work within the IDE.
Best regards,
Marko