creating a binary that run on Psoc5LP

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

cross mob
AvIt_3966476
Level 1
Level 1

Hello, I'm trying to implement an OTA myself by using code used on other platforms.

the code download the requested binary,

write it from a defined address (matching dual-app configuration in the bootloader)

and in the end add signature the allow Bootloader_Start to run the code.

the problem is - this code needs crating a binary (in my case, address 0x4000 and on, or address 0x22000 and on)

and the binary created - does not run successfully.

I generate the binary using this command:

arm-none-eabi-objcopy .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_1.elf -O binary .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_1.bin  -j .text -j .eh_frame -j .rodata -j .ARM.exidx

but it seems important part is missing.

Any insights would be appreciated.

0 Likes
3 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Please note that OTA (Over the Air) bootloading is not possible in PSoC 5LP device as it doesn't have BLE IP inside it. So you can only use I2C/SPI/UART/USB bootloading.

Please let us know what is the communication interface that you are using for Bootloading.

If you are using Bootloader and Bootloadable components, you do not have to create any binaries manually. The Bootloadable component itself will generate a .cyacd file for you. For that you just have to link the .hex file of the bootloader to the Bootloadable in Bootloadable dependancies. You can directly bootload the .cyacd file using Bootloader host tool.

Please go through the code examples for Bootloader in PSoC 5LP devices. The steps to run the code example are present in code example document.

If you have not gone through this document before, please go through this also:

https://www.cypress.com/documentation/application-notes/an73854-psoc-introduction-bootloaders

Please update your queries after going through above documentation.

Thanks

Ganesh

0 Likes

Please let us know what is the communication interface that you are using for Bootloading.

we are using CanBus interface (CY_CAN_CAN_1), and it would be very helpful if in the future since will indeed be a host tool supporting it,

but since we want to perform OTA to remote devices, it don't help us currently.

as for my question,  for general reference:

arm-none-eabi-objcopy .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_2.elf -O binary .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_2.bin  -j .text -j .eh_frame -j .rodata -j .ARM.exidx -j .eh_frame_hdr -j .data -j .bss

this create a full image. in addition a bootloader and boot-loadable (image signature) should be added (but they can't be part of the binary)

0 Likes

Hi,

as for my question,  for general reference:

arm-none-eabi-objcopy .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_2.elf -O binary .\CortexM3\ARM_GCC_541\Debug/RBL_MainApp_2.bin  -j .text -j .eh_frame -j .rodata -j .ARM.exidx -j .eh_frame_hdr -j .data -j .bss

this create a full image. in addition a bootloader and boot-loadable (image signature) should be added (but they can't be part of the binary)

Sorry. I could not understand this properly. Can you please tell once more?

For PSoC 3,4 and 5 devices, the Bootloader and Bootloadable components will generate the .cyacd files automatically. The user just have to bootload those files using external host or Bootloader host tool.

Kindly let us know if you face any issues with this method.

Thanks

Ganesh

0 Likes