cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

JoYa_4324706
New Contributor II

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

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

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
JoYa_4324706
New Contributor II

Hi @Rakshith,

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

 

Thanks!

0 Likes
Rakshith
Moderator
Moderator

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
Top labels