What is cycodeshareimport.scat and can I use this as shared linker script between cores?

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

cross mob
JoYa_4324706
Level 3
Level 3
5 sign-ins First solution authored 10 replies posted

Hi,

I'm using PSoC Creator 4.4 and PDL 3.1.3, and I have some variables that will be shared between CM0+ and CM4. I'm exploring ways to create a single linker script that contains specific sections that I can put these shared variables in.

I noticed there's a file named cycodeshareimport.scat and would like to know if I can use this to create my section, instead of having to put this section twice, once in M0 scatter file and the other in M4 scatter file?

 

Thanks!

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

Hi @JoYa_4324706

Please refer to the Generating a Code Sharing File section in the CyMCUElfTool User Guide and let me know if this helps. You can also refer to this bootloader application in which the post-build scripts have used this command to generate the code-sharing file. - CE220960 - PSoC 6 MCU BLE Upgradable Stack Bootloader

Thanks and Regards,
Rakshith M B

View solution in original post

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

Hi @JoYa_4324706

Please refer to the Generating a Code Sharing File section in the CyMCUElfTool User Guide and let me know if this helps. You can also refer to this bootloader application in which the post-build scripts have used this command to generate the code-sharing file. - CE220960 - PSoC 6 MCU BLE Upgradable Stack Bootloader

Thanks and Regards,
Rakshith M B
0 Likes
JoYa_4324706
Level 3
Level 3
5 sign-ins First solution authored 10 replies posted

Hi @Rakshith,

Do you also have an idea of what cycodeshareimport.scat  is for?

 

Thanks!

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

Hi @JoYa_4324706,

The cycodeshareimport/export files are used to import/export symbols from/to a different application. The idea is that the code-sharing flow extracts symbol locations (using toolchain-specific mechanisms) from the exporting application and uses them to generate a toolchain-specific input file pointing the importing application to those same locations. 
If the requirement is to share a variable between cores then a custom linker script is the recommended approach.

Thanks and Regards,
Rakshith M B
0 Likes