PSoC 61 bootloading

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

cross mob
Morten
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi,

Regarding creating a bootloader for the 61 series of MCUs, it appears there are no examples available.  Some clarifying questions around the bootload process:

 

The default examples abstract away the application selection with what appears to be some global variables declared in the .ld files, and weak function declarations in the startup.s files. Is there some function, or clean way to simply start up "App1" directly from "App0" without a software reset call? Or are there various conflicting startup conditions that need to be met across applications?

What address does the default M4 application sit in for the PSoC 61? Are there any address selection options hidden away in the inaccessible M0 programming? The examples all seem to indicate M0 decides which application the M4 needs to boot into,  so are these devices even cleanly bootloadable?

Does PSoC Creator support programming /debugging directly to the "App1" address on PSoC 6? Or does this always have to be bootloaded via App0, and then debugged as an active target?

0 Likes
1 Solution
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

What address does the default M4 application sit in for the PSoC 61? 

>>To find the default address you can go the cm4.ld file and you can find the address there.

Alakananda_BG_0-1626168728933.png

Are there any address selection options hidden away in the inaccessible M0 programming?

>>NO

The examples all seem to indicate M0 decides which application the M4 needs to boot into,  so are these devices even cleanly bootloadable?

>>M0 starts M4, code in the M4 will switch to the application.

Does this always have to be bootloaded via App0, and then debugged as an active target?

>>Yes you can do this way and also you can merge the hex files of app0 and app1 using ELF tool and program both applications together.

Regards

Alakananda

View solution in original post

0 Likes
2 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

What address does the default M4 application sit in for the PSoC 61? 

>>To find the default address you can go the cm4.ld file and you can find the address there.

Alakananda_BG_0-1626168728933.png

Are there any address selection options hidden away in the inaccessible M0 programming?

>>NO

The examples all seem to indicate M0 decides which application the M4 needs to boot into,  so are these devices even cleanly bootloadable?

>>M0 starts M4, code in the M4 will switch to the application.

Does this always have to be bootloaded via App0, and then debugged as an active target?

>>Yes you can do this way and also you can merge the hex files of app0 and app1 using ELF tool and program both applications together.

Regards

Alakananda
0 Likes
Morten
Level 1
Level 1
5 sign-ins First reply posted First question asked

I believe I understand what my issues were. I had falsely assumed based on the examples that the bootload functionality was very dependent on the global "cy_bootload_appId" maintained across software resets.

This is simply an application specific mechanism, and realistically calling Cy_DFU_SwitchToApp(..) from anywhere reasonable, or the more direct SwitchToApp(.. , ..) without metadata is sufficient for an application swap.

0 Likes