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

cross mob
lock attach
Attachments are accessible only for community members.
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

Hello.

 

I am using CY8C6247.

I am implementing DFU and want some advice on whether the following configuration is correct.

 

  1. Merge M0/M4 application files.
  2. Write a value indicating DFU entry in the common ram part of the CM4 core, and perform a soft reset.
  3. After reset, check common ram value in bootloader and proceed DFU.

           If there is no specific value, M0 core is executed immediately.

 

IAR is used, and the APP ID and linker files are changed.

 

1. bootloader

define CY_APP_ID=0

linker file : dfu_cm0p_app0.icf

2. M0P application

Define CY_APP_ID=1

Linker file : Linker_m0_dfu.icf

3. M4 application

Define CY_APP_ID=2

Linker file : Linker_m4_dfu.icf

 

I attach the corresponding link file

 

Thanks.

0 Likes
1 Solution
Rohan136
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 50 replies posted

Hi @air ,

 

Below are the comments for your implementation:

1. You can merge the hex files of M0 and M4 by adding the names of project in MERGE variable in Makefile. The combined hex file will be generated in build folder of the project.

2. Linker file looks fine as area for all 3 applications are different in flash and common ram area is in the range of SRAM address. Just Make sure you are using appId inside the source files also to switch between the apllications.

 

Regards,

Rohan

View solution in original post

0 Likes
1 Reply
Rohan136
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 50 replies posted

Hi @air ,

 

Below are the comments for your implementation:

1. You can merge the hex files of M0 and M4 by adding the names of project in MERGE variable in Makefile. The combined hex file will be generated in build folder of the project.

2. Linker file looks fine as area for all 3 applications are different in flash and common ram area is in the range of SRAM address. Just Make sure you are using appId inside the source files also to switch between the apllications.

 

Regards,

Rohan

0 Likes