Universal build settings using cyprjmgr.exe and .cywrk file

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

cross mob
PaBr_4578176
Level 2
Level 2
First like given Welcome!

Hi,

My goal is to build my project using Jenkins which has different usernames than engineers. I would like to ask, is it an option in PSoC Creator to save build settings e.g. -NDEBUG flag (Release) which are NOT assigned to the user, but to the project? In my understanding, these information are saved in <proj_name>.cyprj.<username>

0 Likes
1 Solution

When building the project through command line, note that the -build flag will build the project with DEBUG configuration by default. If you want to build using RELEASE configuration, add the -c flag at the end as shown below:

>> cyprjmgr.exe -wrk "<path_to_workspace>./<workspace_name>.cywrk" -build -c "Release"

Hope this helps

Regards,
Dheeraj

View solution in original post

0 Likes
5 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The build settings are stored in the <proj_name>.cyprj file and not the <proj_name>.cyprj.<username> file. So, the settings are actually being applied to the project file itself and not the user file. You can open up the .cyprj file and search for this flag, you should be able to see it.

pastedImage_0.png

Let me know if I'm understanding your issue differently.

Regards,
Dheeraj

0 Likes

Hmm.. so why when I try delete all <proj_name>.cyprj.<username> files and build project using

"C:\Program Files (x86)\Cypress\PSoC Creator\4.3\PSoC Creator\bin\cyprjmgr.exe" -wrk "<path_to_proj>\<proj_name>.cywrk" -build command in the result I see:

...

Cleanup...

Project 1 of 2: Pre-build Steps...

Project 1 of 2: Compiling...

arm-none-eabi-gcc.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -Wa,-alh=.\CortexM0\ARM_GCC_541\Debug/main.lst -g -D DEBUG -Wall -ffunction-sections -ffat-lto-objects -Os -c main.c -o .\CortexM0\ARM_GCC_541\Debug\main.o

arm-none-eabi-gcc.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -Wa,-alh=.\CortexM0\ARM_GCC_541\Debug/cyfitter_cfg.lst -g -D DEBUG -Wall -ffunction-sections -ffat-lto-objects -Os -c Generated_Source\PSoC4\cyfitter_cfg.c -o .\CortexM0\ARM_GCC_541\Debug\cyfitter_cfg.o

...

But when these files are included, I can build a project with the NDEBUG flag. It looks like without these additional config files (.<username>) project is building in the DEBUG mode by default.

0 Likes

Right click on your project > Configuration > Release if you want to change the configuration from Debug to Release mode. This configuration is what gets used during build. And like you already observed, it doesn't depend on any config files.

Regards,

Dheeraj

0 Likes

Please, Could you try this scenario in yours some project:

     1. Change build configuration on Release (rebuild the project) <- on this step, build shall be correct (Release configuration)

     2. After that delete all files with .<username> extension and build using <path_to_build_program>/cyprjmgr.exe -wrk "<path_to_proj>\       <proj_name>.cywrk" -build  <- here build is incorrect (Debug configuration), despite of change build configuration to Release

Am I doing something wrong? I would like to delete those files because during working in a team on the same project with system version control, and nobody wants temporary files with some other username.

0 Likes

When building the project through command line, note that the -build flag will build the project with DEBUG configuration by default. If you want to build using RELEASE configuration, add the -c flag at the end as shown below:

>> cyprjmgr.exe -wrk "<path_to_workspace>./<workspace_name>.cywrk" -build -c "Release"

Hope this helps

Regards,
Dheeraj

0 Likes