Unlock file editing during debug in PSoC Creator?

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

cross mob
RiMo_301056
Level 3
Level 3
25 sign-ins First solution authored 10 replies posted

Hello!

I noticed that during a Debug session in PSoC Creator, all my source files are locked (and a padlock symbol appears near their name).

While this certainly makes sense in most situations (otherwise the source code could get out of sync of the binary code running on the chip), I would like to have the possibility to override this safety feature in some situations.

Just a few examples where this would be useful:

  • to add/edit a comment or a reminder ("FIXME later", ...)
  • to implement a fix in the code (being aware that it will be available only after the next compile)

When the changes are very small, this would save time (reduce the number of compiles) and flash memory wear (no need to re-flash just for an added comment)

In many SDKs, this is allowed (maybe with a warning).

Thank you for any suggestion!

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @RiMo_301056 ,

This was done intentionally so that during debug it reflects the same source code that was programmed into the device. If we did allow editing, even if it is a comment, it will affect the lines of the code and it might affect your debugging since the GDB and file are out of sync.  

I would recommend debugging and noting down where the changes need to be done. And then once debugging is stopped, you can always add in the lines of code and then program it again. Because it doesn't matter how minute the change is, the change needs to be recorded by the GDB debugger and this won't happen unless you program it again. 

I agree having a live editor with a warning would be nice, I will pass this feedback to the software team for evaluation. Appreciate the feedback. 

Regards,
Dheeraj

View solution in original post

0 Likes
2 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @RiMo_301056 ,

This was done intentionally so that during debug it reflects the same source code that was programmed into the device. If we did allow editing, even if it is a comment, it will affect the lines of the code and it might affect your debugging since the GDB and file are out of sync.  

I would recommend debugging and noting down where the changes need to be done. And then once debugging is stopped, you can always add in the lines of code and then program it again. Because it doesn't matter how minute the change is, the change needs to be recorded by the GDB debugger and this won't happen unless you program it again. 

I agree having a live editor with a warning would be nice, I will pass this feedback to the software team for evaluation. Appreciate the feedback. 

Regards,
Dheeraj

0 Likes

Dear Dheeraj,

thank you for your reply. I will mark it as a "Solution", even though I am not 100% happy with the fact that a solution to my request does actually not exist. But that's not your fault 😉.

Best regards

0 Likes