PSoC 4 OTA Update; cycodeshareimport.ld "missing"

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

cross mob
DJour
Level 1
Level 1
5 sign-ins First solution authored First reply posted

I have a legacy workspace which uses PSoC 4 BLE (CYBLE-224110-00). There are 3 projects in there: a launcher, a stack and an application project. The application project has a Bluetooth Low Energy component (3.54) which is in "profile only" mode; the stack project also has a BLE component which is "stack only". Basically exactly what's explained in the upgradeable stack example.

There are devices out there with this firmware.

Now I'd like to rewrite the application project. The stack and launcher should not be touched in any way.

My goal therefore was to setup a new workspace, create one (single) project in there, with a BLE component (in the correct version) in "profile only" mode (and a bootloadable component of course). I want this project to use the stack from the old workspace; without having to "see" anything from the stack/launcher projects or having to compile them and so on.

Therefore I took the following files from the Stack project:

- CortexM0/ARM_GCC_541/Release/Stack.elf

- CortexM0/ARM_GCC_541/Release/Stack.hex

- Generated_Source/PSoC4/CyBle.cysa

and copied them into the new workspace; and linked to these files from the BLE component dialog (for CyBle.cysa) and the Bootloadable component dialog (elf and hex file).

When I try to build the project I get:

....
arm-none-eabi-gcc.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -Wa,-alh=.\CortexM0\ARM_GCC_541\Debug/CyLFClk.lst -g -D DEBUG -D CY_CORE_ID=0 -Wall -ffunction-sections -ffat-lto-objects -Og -c Generated_Source\PSoC4\CyLFClk.c -o .\CortexM0\ARM_GCC_541\Debug\CyLFClk.o
arm-none-eabi-gcc.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -Wa,-alh=.\CortexM0\ARM_GCC_541\Debug/cy_em_eeprom.lst -g -D DEBUG -D CY_CORE_ID=0 -Wall -ffunction-sections -ffat-lto-objects -Og -c Generated_Source\PSoC4\cy_em_eeprom.c -o .\CortexM0\ARM_GCC_541\Debug\cy_em_eeprom.o
arm-none-eabi-as.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -alh=.\CortexM0\ARM_GCC_541\Debug/CyBootAsmGnu.lst -g -W -o .\CortexM0\ARM_GCC_541\Debug\CyBootAsmGnu.o Generated_Source\PSoC4\CyBootAsmGnu.s
Error: prj.M0265: Could not find bootloader output file cycodeshareimport.ld, which is required for code sharing.
--------------- Rebuild Failed: 03/03/2022 12:15:08 ---------------

 

So it is missing some cycodeshareimport.ld file. I do have this file in the old application project (in Generated_Source/PSoC 4). Copying that file to the new project doesn't change a thing.

Where / How is this file referenced?

As you can see; this is not even a linking error, but an error by the PSoC Creator thrown before even attempting to link the project.

0 Likes
1 Solution
DJour
Level 1
Level 1
5 sign-ins First solution authored First reply posted

I found out through trial and error that apparently the cycodeshareimport.ld file needs to be next to the CyBle.cysa file. It needs to contain lots of "PROVIDE" linker statements (for the symbols of the shared code).

View solution in original post

0 Likes
2 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Please refer to the BLE_OTA_Upgradable Stack example projects from the PSoC Creator. If it doesn't help then please share your project for testing at our end.

Thanks,
P Yugandhar.

0 Likes
DJour
Level 1
Level 1
5 sign-ins First solution authored First reply posted

I found out through trial and error that apparently the cycodeshareimport.ld file needs to be next to the CyBle.cysa file. It needs to contain lots of "PROVIDE" linker statements (for the symbols of the shared code).

0 Likes