PSoC Creator 4.4 Cypd5126 notebook sample code won't compile

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

cross mob
apfel
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

Hi to all,

I wanted to get a feeling for the CYPD5126 and the PSoC Creator 4.4. so I used the sample code as template for a new project. However,
- there is an orphanded definition "const dpm_status_t *dpm_stat = dpm_get_info(port);" in app.c/app_ccgx_supply_change_cb which generates an error.

- once it's just removed the post-build.bat has a plethora of errors: it tries to copy non-existent files (the backup firmware, which isn't compiled) and calls cyelftool.exe without any path to the program -which fails of course.

- once I added the absolute path to cyelftool this tool in turn wanted to access nonexistent files as well.

and so on. 

Did anybody suceed in using the template? If so, how?

The final goal of the excercise would be to take a CYPD5126 and modify it's software so that it can control a USB3.0/DP muxer TUSB1046A from Ti to get a working USB3.0/DP alternate mode USB-C port.

Greetings and thanks for any replies.

0 Likes
1 Solution
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

Thank you for your feedback! It will be considered in future revisions.

do you know on which code sample the build-in firmware of the CYPD5126 is based on?

>> CYPD5126 comes with I2C bootloader out of factory. You will have to program the chip with notebook firmware. 

The CYPD5126-40LQXI_notebook project is a generic notebook project. Refer to Host SDK User Guide and Release notes for the features implemented in the project.

Best regards,
Pranava

View solution in original post

0 Likes
3 Replies
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

Section 3.1 and 3.2 of CCGx Host SDK User Guide explains how to setup PSoC Creator to build SDK projects.

Instead of adding absolute path to cyelftool.exe  please try adding the PSoC Creator installation path to environment variables as explained in Section 3.1 of User Guide.

I have tried it at my end and was able to successfully build the template project.

Do let me know if you face any issues even after following above instructions.

Best regards,
Pranava
0 Likes
apfel
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

Thanks for the reply. I was able to build the project eventually, both with the Keil and the GCC compiler, but I've had some Issues which I'd like to point out here:

  • The main project assumes that the backup firmware is built already and tries to copy the linked files from the subdirectory. However, it isn't, so you need to add the project "backup_fw" in the folder "backup_fw.cydsn" and build it first. I suggest to add the backup_fw project into the template and add a small comment so the end-user knows what to do first.
  • If you use another name than the default name the post-build script fails because the project name is hard-coded into the script. I suggest changing line 4 of the script into 
    @set "PROJ=%3"
    and adding the parameter
    ${ProjectShortName}
    as a third parameter into the post-build call in Build settings->(Project name)->ARM GCC xx->User Commands->Post Build
  • There is a third small issue: because -Werror ist set in the GCC compiler it will report unused variables as errors, so  both the backup_fw and the main firmware won't compile (probably project-dependent) because some pointers are defined in functions but aren't used because #ifdef-clauses remove part of the code. So I suggest to either add a -Wno-unused-variable or define a value with -D MY_PROJECT_FLAG  and specifically mask the offending lines with #ifndef MY_PROJECT_FLAG [...] #endif.

  • And finally a general comment on the PSoC creator: The very first issue I ran into was when I wanted to store the project in our cloud drive: the name of the drive contains an ampersand ("&") and the PSoC doesn't accept it. Yes, I know, absolutely bad karma to use special characters as part of drive name. However, it is what it is and I just want to mention it in case any programmer got some spare time (unlikely) and wants to include the ampersand into the list of acceptabe characters.

But once you've pinpointed the issues it will compile nicely. Now I'll just have to wait for the hardware to start coding in earnest.

Oh, a final question: do you know on which code sample the build-in firmware of the CYPD5126 is based on? As we want to use the chip I'd rather work from a "known-good" base and change only the few small things which will need to be changed instead of working from something I can't really test against a working version.

0 Likes
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

Thank you for your feedback! It will be considered in future revisions.

do you know on which code sample the build-in firmware of the CYPD5126 is based on?

>> CYPD5126 comes with I2C bootloader out of factory. You will have to program the chip with notebook firmware. 

The CYPD5126-40LQXI_notebook project is a generic notebook project. Refer to Host SDK User Guide and Release notes for the features implemented in the project.

Best regards,
Pranava
0 Likes