Turn off flash match compare function in modus when programming

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

cross mob
conradc2380
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

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
1 Solution

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.

 

View solution in original post

9 Replies
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

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 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

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
First comment on KBA 750 replies posted 250 sign-ins

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 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

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.

 

Hi Vison,

 

Thanks very much for this , it works nicely  🙂

Regards

c

0 Likes

Our software AE provides a better idea.  Click MTB-->Run-->Run Configurations.. to open the Run configurations windows, then select the ProjectNate_ Program (Kitprog3_Miniprog4) item, then add a "gdb_smart_program disable" command in the MTB launch configuration. 

This method can prevent modify the global gdb_smart_program enable/disable switch, just config current project.

Vison_Zhang_0-1675749640438.png

 

 

Hi Vison,

 

Thanks , yes that also a great idea .

Thanks

C

0 Likes