{"id":343,"date":"2018-11-18T15:42:51","date_gmt":"2018-11-18T20:42:51","guid":{"rendered":"http:\/\/drsmith.blog.yorku.ca\/?p=343"},"modified":"2018-11-18T15:42:51","modified_gmt":"2018-11-18T20:42:51","slug":"brokenbreakpoints","status":"publish","type":"post","link":"https:\/\/www.yorku.ca\/professor\/drsmith\/2018\/11\/18\/brokenbreakpoints\/","title":{"rendered":"My breakpoints are broken"},"content":{"rendered":"<p>I recently updated my MPLAB X installation to version 5.10.\u00a0 The compiler hasn't changed, just the IDE.\u00a0 Two surprises occurred.\u00a0 First is that my SAMD board now crashes the IDE when I plug it in.\u00a0 Only on Windows 10 on my HP tablet. Works fine on my Mac.\u00a0 But I won't get into that today.<\/p>\n<p>Today, I discovered that I broke my breakpoints using my PIC16 board.\u00a0 Specifically, using the PIC16f1619 Curiosity board.\u00a0 It's a relatively simple 8-bit device with a single hardware breakpoint in it.\u00a0 It appears that I've been misusing hardware breakpoints in C for a few years because of this warning:<\/p>\n<div id=\"attachment_344\" style=\"width: 1121px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-344\" class=\"size-full wp-image-344\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2018\/11\/pic16_software_breakpoints.png\" alt=\"Software Breakpoints in MPLAB X (v 5.10)\" width=\"1111\" height=\"429\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2018\/11\/pic16_software_breakpoints.png 1111w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2018\/11\/pic16_software_breakpoints-300x116.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2018\/11\/pic16_software_breakpoints-1024x395.png 1024w\" sizes=\"auto, (max-width: 1111px) 100vw, 1111px\" \/><p id=\"caption-attachment-344\" class=\"wp-caption-text\">As of version 5.10 (Nov. 2018) MPLAB X now asks you explicitly to enable software breakpoints.<\/p><\/div>\n<p>Never got this warning before so remained oblivious to the practical implementation of software breakpoints versus hardware ones. I typically put a single breakpoint in and let the code boot up and halt at it.\u00a0 Then, single-step to see what's going on.\u00a0 Apparently, that requires the use of additional software breakpoints.\u00a0 Well, now I know better.\u00a0 The software breakpoints add a bit of assembler code where you can't see it to halt the code.\u00a0 Time to get used to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently updated my MPLAB X installation to version 5.10.\u00a0 The compiler hasn't changed, just the IDE.\u00a0 Two surprises occurred.\u00a0 First is that my SAMD board now crashes the IDE when I plug it in.\u00a0 Only on Windows 10 on my HP tablet. Works fine on my Mac.\u00a0 But I won't get into that today. [&hellip;]<\/p>\n","protected":false},"author":762,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":""},"categories":[46,55],"tags":[89,90,104,115,9,208,209,234],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-c-programming","category-programming","tag-breakpoint","tag-breakpoints","tag-compiler","tag-debugging","tag-mplab-x","tag-pic16","tag-pic16f1619","tag-software-breakpoint"],"taxonomy_info":{"category":[{"value":46,"label":"c programming"},{"value":55,"label":"programming"}],"post_tag":[{"value":89,"label":"breakpoint"},{"value":90,"label":"breakpoints"},{"value":104,"label":"compiler"},{"value":115,"label":"debugging"},{"value":9,"label":"mplab x"},{"value":208,"label":"PIC16"},{"value":209,"label":"pic16F1619"},{"value":234,"label":"software breakpoint"}]},"featured_image_src_large":false,"author_info":{"display_name":"drsmith","author_link":"https:\/\/www.yorku.ca\/professor\/drsmith\/author\/drsmith\/"},"comment_info":"","category_info":[{"term_id":46,"name":"c programming","slug":"c-programming","term_group":0,"term_taxonomy_id":46,"taxonomy":"category","description":"","parent":0,"count":50,"filter":"raw","cat_ID":46,"category_count":50,"category_description":"","cat_name":"c programming","category_nicename":"c-programming","category_parent":0},{"term_id":55,"name":"programming","slug":"programming","term_group":0,"term_taxonomy_id":55,"taxonomy":"category","description":"","parent":0,"count":30,"filter":"raw","cat_ID":55,"category_count":30,"category_description":"","cat_name":"programming","category_nicename":"programming","category_parent":0}],"tag_info":[{"term_id":89,"name":"breakpoint","slug":"breakpoint","term_group":0,"term_taxonomy_id":89,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":90,"name":"breakpoints","slug":"breakpoints","term_group":0,"term_taxonomy_id":90,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":104,"name":"compiler","slug":"compiler","term_group":0,"term_taxonomy_id":104,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":115,"name":"debugging","slug":"debugging","term_group":0,"term_taxonomy_id":115,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":9,"name":"mplab x","slug":"mplab-x","term_group":0,"term_taxonomy_id":9,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":208,"name":"PIC16","slug":"pic16","term_group":0,"term_taxonomy_id":208,"taxonomy":"post_tag","description":"","parent":0,"count":12,"filter":"raw"},{"term_id":209,"name":"pic16F1619","slug":"pic16f1619","term_group":0,"term_taxonomy_id":209,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":234,"name":"software breakpoint","slug":"software-breakpoint","term_group":0,"term_taxonomy_id":234,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/users\/762"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":0,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}