- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm implementing a solution to KBA229335 where I replace cy_syspm.c in a pre-build instruction.
However, I'd like to remove this fix when the PDL is updated, thus I would add a precompiler check in cy_syspm.c for the PDL version.
Is there such a macro? Something like:
#define PDL_MAJOR (3)
#define PDL_MINOR (1)
#define PDL_MICRO (2)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi user_1669321,
Apologies for the delay. I received an update from the internal team. Unfortunately, there is no such macro in PDL 3.x.x
Regards,
Rakshith
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi user_1669321,
Instead of a pre-build instruction, you could try changing the PDL files directly. Whenever the PDL is updated it creates a new folder and thus will not be affected. Please refer to the last two responses in this thread and let me know if this helps - deep sleep being blocked by IPC
Thanks and Regards,
Rakshith
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rakshith,
It's better for me to add the pre-build instruction than to ask every developer to change the file on their disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi user_1669321,
The PDL used for the build is present in the .cyprj file as shown -
I am not sure of a PDL version macro. I will check internally and get back to you.
Thanks and Regards,
Rakshith
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Rakshith,
If you tell me that there are no such macros, then I'll be able to do a program that parses the .cypjr and creates a .h with the necessary macros.
I'll wait for your feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi user_1669321,
Apologies for the delay. I received an update from the internal team. Unfortunately, there is no such macro in PDL 3.x.x
Regards,
Rakshith
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the confirmation, Rakshith.
For anyone with the same issue, I wrote these batch files that I run as a pre-build instruction in PSoC Creator. They must be in projet_name.cydsn, and the corrected cy_syspm.c must be at project_name.cydsn/fixed_syspm_folder/cy_syspm.c".
check_pdl_version.bat
@findstr /C:"<pdl_path_for_last_code_gen v=\"C:\Program Files (x86)\Cypress\PDL\3.1.2\" />" projet_name.cyprj
@if %errorlevel%==0 (
@echo PDL version is 3.1.2! We need to apply the KBA229335 fix.
) else (
@echo PDL is not 3.1.2 anymore, please remove the KBA229335 fix for 3.1.2 in the pre-build instructions
@exit /b
)
pre_build_core_0.bat
@echo ------------------------------------------
@echo Pre-build commands for Cortex-M0+ core
@echo ------------------------------------------
@rem We need to copy this file until PDL update because of KBA229335 (https://community.cypress.com/docs/DOC-18893)
@CALL check_pdl_version
@if %errorlevel%==1 (
@exit /b %errorlevel%
)
copy ".\fixed_syspm_folder\cy_syspm.c" ".\Generated_Source\PSoC6\pdl\drivers\peripheral\syspm\cy_syspm.c"
Then in Creator, in the Build Settings of the project:
CM0+ -> User Commands -> Pre Build -> Enter pre_build_core_0.bat
Fred