Announcements

Ever wondered how you could shape the future in collaboration with others? Join us at OktoberTech Asia Pacific and get inspired. Click here to sign up FREE of charge.

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

PSoC™ 6 Forum Discussions

JoYa_4324706
Level 3
10 replies posted 10 questions asked 5 replies posted
Level 3

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 1000 replies posted 750 replies posted 500 replies posted
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 1000 replies posted 750 replies posted 500 replies posted
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
0 Likes
JoYa_4324706
Level 3
10 replies posted 10 questions asked 5 replies posted
Level 3

Hi @Rakshith,

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

 

Thanks!

0 Likes
Rakshith
Moderator
Moderator 1000 replies posted 750 replies posted 500 replies posted
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