PSoC Creator on build server: override user folders

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

cross mob
EnPa_1371286
Level 1
Level 1
5 replies posted 5 questions asked First reply posted

We have PSoC Creator running on our Build Server (TeamCity by JetBrains).

Version 4.0 runs nicely. Version 4.2 doesn't.

The issue seems to be the user folders.

If I log into the build server and start PSoC Creator 4.2, when I rebuild a project, I get this log entries:

--------------- Rebuild Started: 03/24/2020 10:01:47 Project: FooBar, Configuration: ARM GCC 5.4-2016-q2-update Release ---------------

Deleting file ".\FooBar.rpt"

cydsfit.exe -.appdatapath "C:\Users\my-censored-username\AppData\Local\Cypress Semiconductor\PSoC Creator\4.2" -.fdsnotice -.fdswarpdepfile=warp_dependencies.txt -.fdselabdepfile=elab_dependencies.txt -.fdsbldfile=generated_files.txt -.fdsreffile=referenced_files.txt -p C:\Temp\c5dec2e00197ebe2\FooBar.cydsn\FooBar.cyprj -d CY8C5268AXI-LP047 -s C:\Temp\c5dec2e00197ebe2\FooBar.cydsn\Generated_Source\PSoC5 -- -yv2 -q10 -ygs -o2 -v3 -.fftcfgtype=LE

Elaborating Design...

[...]

SRAM used: 3617 of 65536 bytes (5,5%). Stack: 2048 bytes. Heap: 128 bytes.

--------------- Rebuild Succeeded: 03/24/2020 10:03:05 ---------------

As you can see, the tool works in a directory that is dependent on the user starting PSoC Creator.

When running autonomously on the Build Agent, the application is started by a service running as system process and has hence no MyDocument folder or anything similar to that. This is part of the output in such a case:

[09:55:15][Step 1/1] Starting: "D:\BuildTools\Cypress\PSoC Creator\4.2\PSoC Creator\bin\cyprjmgr.exe" -wrk FooBarWorkSpace.cywrk -prj FooBar -c Release -rebuild

[09:55:15][Step 1/1] in directory: D:\TeamCity\BuildAgent\work\c5dec2e00197ebe2

[09:55:16][Step 1/1] Error: prj.M0274: Unable to initialize system dependencies. Absolute path is required. 'PSoC Creator\4.2' is not an absolute path.

[09:55:16][Step 1/1]

[09:55:17][Step 1/1] --------------- Rebuild Started: 03/24/2020 09:55:16 Project: FooBar, Configuration: ARM GCC 5.4-2016-q2-update Release ---------------

[09:55:17][Step 1/1] Cleaning...

[09:55:17][Step 1/1] Initializing Build...

[09:55:17][Step 1/1] cydsfit.exe -.appdatapath "C:\windows\system32\config\systemprofile\AppData\Local\Cypress Semiconductor\PSoC Creator\4.2" -.fdsnotice -.fdswarpdepfile=warp_dependencies.txt -.fdselabdepfile=elab_dependencies.txt -.fdsbldfile=generated_files.txt -.fdsreffile=referenced_files.txt -p D:\TeamCity\BuildAgent\work\c5dec2e00197ebe2\FooBar.cydsn\FooBar.cyprj -d CY8C5268AXI-LP047 -s D:\TeamCity\BuildAgent\work\c5dec2e00197ebe2\FooBar.cydsn\Generated_Source\PSoC5 -- -yv2 -q10 -ygs -o2 -v3 -.fftcfgtype=LE

[09:55:17][Step 1/1] Error: prj.M0274: Unable to initialize system dependencies. Absolute path is required. 'PSoC Creator\4.2' is not an absolute path.

[09:55:18][Step 1/1] Elaborating Design...

Do you know a workaround to this issue?

Thank you in advance

Enpa

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi EnPa_1371286,

The issue is because of the Web based content delivery feature which was not added until PSoC Creator 4.1.

PSoC Creator is not able to find the 'My Documents' folder in the user account.

Also note that, running Jenkins/TeamCity agents as LocalSystem on Windows has a potential for security hazards because that user account has full privileges (similar to 'root' on Unix). It is better to create a dedicated unprivileged account for the service. With a dedicated account it should be possible to configure the MyDocuments path.

This issue will be fixed in future releases. Thank you for bringing this to our notice.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
6 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi EnPa_1371286​,

Did you try the same with PSoC Creator 4.3? Do you observe the same issue?

Also, can you try adding the PSoC Creator path into the PATH system environment variable and see if this fixes the issue?

Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith M B

Thank you for looking into this.

I added D:\BuildTools\Cypress to the system PATH variable. Nothing changed.

I also tested PSoC Creator 4.3 and I get the same error.

Interestingly we have PSoC Creator 4.0 running on the very same server, controlled by the same build agent with the same parameters.

It's used to compile another project and works flawlessly.

Now I tried to compile this old project on the PSoC Creator 4.2 build configuration and get the same error here as well.

So, it seems not to be project specific, it doesn't seem to be related to the build server nor to the build agent, it's probably something that changed between version 4.0 and 4.2 of PSoC Creator.

Here the beginning of the build log for the two cases:

With V 4.0:

[Step 1/1] Starting: "D:\BuildTools\Cypress\PSoC Creator\4.0\PSoC Creator\bin\cyprjmgr.exe" -wrk OldWorkspace.cywrk -prj OldProject -c Release -rebuild

[Step 1/1] in directory: D:\TeamCity\BuildAgent\work\e9f5f9bf0de9e88f\ProjectXXX\ComponentYYY

[Step 1/1]

[Step 1/1] --------------- Rebuild Started: 03/27/2020 12:54:31 Project: OldProject, Configuration: ARM GCC 4.9-2015-q1-update Release ---------------

[Step 1/1] Cleaning...

[Step 1/1] Initializing Build...

With V 4.2:

[Step 1/1] Starting: "D:\BuildTools\Cypress\PSoC Creator\4.2\PSoC Creator\bin\cyprjmgr.exe" -wrk OldWorkspace.cywrk -prj OldProject -c Release -rebuild

[Step 1/1] in directory: D:\TeamCity\BuildAgent\work\e9f5f9bf0de9e88f\ProjectXXX\ComponentYYY

[Step 1/1] Error: prj.M0274: Unable to initialize system dependencies. Absolute path is required. 'PSoC Creator\4.2' is not an absolute path.

[Step 1/1]

[Step 1/1] ADD: fit.M0031: error: Clock Error: (Use of the Timer (WDT) ISR 'Auto generated' option requires the cy_lfclk component to be available in the design and it is not. To fix the problem either:

[Step 1/1] 1. Change the option to ''User provided" in the .cydwr file.

[Step 1/1] 2. Update the project Dependencies to include a 'Components' dependency on CyComponentLibrary.).

Kind regards, Enpa

0 Likes

Hi EnPa_1371286​,

In one of the cases, we were able to resolve this issue by adding the absolute path to PSoC Creator\4.2 into Path variable both in System Variables and in User Variables.

PSoC Creator is not able to access the 4.2 directory through the relative path provided. Are PSoC Creator 4.2 and 4.0 installed in the same directory?

Can you also try out the steps mentioned in this thread and let me know if that helps resolve your issue - Build PSoC projects via Jenkins (Error: prj.M0274)

I will be raising an internal ticket to look into this error.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith M B

Thank you for your answer.

The installation directories are as follows:

  • 😧
    • BuildTools
      • Cypress
        • Cypress Update Manager
        • PDL
        • Programmer
        • PSoC Creator
          • 4.0
            • ...
          • 4.2
            • PSoC Creator
              • bin
              • conf
              • ...
            • Updater
            • updates
          • 4.3
            • ...

Which directories would you add to the Path variable?

Just

D:\BuildTools\Cypress\PSoC Creator\4.2

or rather

D:\BuildTools\Cypress\PSoC Creator\4.2\PSoC Creator\bin

?

Or something different?

I added the command from the other thread to the build configuration as a powershell step.

(this command: Command: [System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::MyDocument )

It returns an empty string.

Kind regards, Enpa

0 Likes

Hi EnPa_1371286,

Which directories would you add to the Path variable?

This directory into Path variable both in System Variables and in User Variables -

D:\BuildTools\Cypress\PSoC Creator\4.2

Can you please reinstall  .NET framework that you have installed on your PC? This has worked in one of the cases. Link to .NET 4.5​.

Also, please run the Microsoft .NET Framework Repair Tool​ and let me know the results.

I have raised an internal ticket to look into this error. They will be evaluating this issue and if the issue is from our end they will be fixing it in future releases.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi EnPa_1371286,

The issue is because of the Web based content delivery feature which was not added until PSoC Creator 4.1.

PSoC Creator is not able to find the 'My Documents' folder in the user account.

Also note that, running Jenkins/TeamCity agents as LocalSystem on Windows has a potential for security hazards because that user account has full privileges (similar to 'root' on Unix). It is better to create a dedicated unprivileged account for the service. With a dedicated account it should be possible to configure the MyDocuments path.

This issue will be fixed in future releases. Thank you for bringing this to our notice.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes