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

ModusToolbox™ General Forum Discussions

conradc2380
Level 3
Level 3
5 likes given 10 replies posted First solution authored

Hi,

During the programming of the Psoc 6 with the kit prog 3 programming interface  the device does a flash compare function to see if the code I am uploading to the device is still the same as the code still on the device from a previous program.

Sometimes I just want to program a device again without making changes to the code , recompile and reload it again .

How do I disable this feature ? I know it will eat into my PSOC 6 flash R/W cycles ,but for testing and dev I am ok with this.

 

conradc2380_0-1673798226412.png

 

 

Some advisee will be great .

Regards

C

 

0 Likes
6 Replies
Vison_Zhang
Moderator
Moderator
Moderator
250 solutions authored 10 likes given 500 replies posted

Please try below method:

Step1: Go to Modustoolbox project path, find .mtbLaunchConfigs folder, open "Project_Name Erase (KitProg3_MiniProg4).launch" use notepad or notepad++

Step2:  Find the third line “<booleanAttribute key="com.cypress.studio.launch.hide" value="true"/>”, change "true" to "false" and save file, then you can find "erase" icon appear in Launches options.

Vison_Zhang_0-1673836920405.png

Step3: Click Erase before Program the silicon can make sure flash be programmed without skipping. 

 

0 Likes
conradc2380
Level 3
Level 3
5 likes given 10 replies posted First solution authored

Hi Vision,

 

Thanks for the input, It would be great if this is part of the run or debug launch that the erase automatically takes place before programming  and debugging.

Do you know if this is a setting that can be set to do this automatically?

regards

C

0 Likes
Vison_Zhang
Moderator
Moderator
Moderator
250 solutions authored 10 likes given 500 replies posted

ModusToolBox do not provides the setting to enable erase or disable flash match programming skipping feature in programming process.  I think change the script content in "Project_Name Program (KitProg3_MiniProg4).launch" can realize this feature, but I do not know how to change it.  Let me do some tests to find out how to change the script to realize this feature.

0 Likes

Hi Vison,

 

Hope you are well, Just a friendly follow up , did you manage to test the script change as you mentioned above?

Any Luck on this  🙂

regards

C

0 Likes
conradc2380
Level 3
Level 3
5 likes given 10 replies posted First solution authored

Hi Vision,

 

Thank you for the feedback, It would be good to have a the sequence erase, program, verify done with one button as most other IDE does. Appreciate your assistance.

regards

C

0 Likes

After multi tests, I found the way to turn off flash match compare function in MTB, please go to MTB install path "xxx\ModusToolbox\tools_3.0\openocd\scripts\target\mxs40\", open file "psoc6_common.cfg" and change the last line to "gdb_smart_program disable" 

However, this is a global switch, please restore to the original settings when you do not need this function, otherwise all PSOC6 projects on your computer will be affected by this setting.

 

0 Likes