{"id":2497,"date":"2016-12-20T14:02:17","date_gmt":"2016-12-20T22:02:17","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=2497"},"modified":"2021-03-07T08:17:08","modified_gmt":"2021-03-07T16:17:08","slug":"creating-projects-for-the-nordic-nrf52840-chip-with-visualgdb","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/arm\/nrf51\/nrf52840\/","title":{"rendered":"Creating Projects for the Nordic nRF52840 Chip with VisualGDB"},"content":{"rendered":"<p>This tutorial shows how to create a basic project for the nRF52840 chip using VisualGDB. We will create a basic &#8220;Blinking LED&#8221; project based on the example from the Nordic SDK and show how to build and debug it.<\/p>\n<ol>\n<li>Open the VisualGDB Embedded Project Wizard and select the MSBuild subsystem:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/03-msb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2500\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/03-msb.png\" alt=\"03-msb\" width=\"758\" height=\"570\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/03-msb.png 758w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/03-msb-300x226.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/li>\n<li>On the next page select the nRF52840_XXAA device and enable the &#8220;Provide default stubs for system calls&#8221; checkbox:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/04-device.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2501\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/04-device.png\" alt=\"04-device\" width=\"758\" height=\"656\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/04-device.png 758w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/04-device-300x260.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/li>\n<li>On the next page select a sample. We recommend starting with the LEDBlink (BSP) sample to test out the board connectivity before trying anything more complex. Select the PCA10056 board type that corresponds to the nRF52840 development kit:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/05-pca10056.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2502\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/05-pca10056.png\" alt=\"05-pca10056\" width=\"758\" height=\"656\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/05-pca10056.png 758w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/05-pca10056-300x260.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/li>\n<li>Install Segger J-Link software, then select &#8220;Segger J-Link&#8221; on the Debug Method page and press &#8220;Finish&#8221; to generate the project:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/06-debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2503\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/06-debug.png\" alt=\"06-debug\" width=\"758\" height=\"656\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/06-debug.png 758w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/06-debug-300x260.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/li>\n<li>Now you can build the project with Ctrl-Shift-B:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/07-build1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2507\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/07-build1.png\" alt=\"07-build\" width=\"1019\" height=\"644\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/07-build1.png 1019w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/07-build1-300x190.png 300w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/li>\n<li>Press F5 to begin debugging. Observe how the 4 LEDs on the board are blinking:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/board.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2505\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/board.jpg\" alt=\"board\" width=\"700\" height=\"334\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/board.jpg 700w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/board-300x143.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Set a breakpoint somewhere in the main loop to quickly check that breakpoints and stepping work:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/08-bkpt1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2508\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/08-bkpt1.png\" alt=\"08-bkpt\" width=\"1019\" height=\"644\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/08-bkpt1.png 1019w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2016\/12\/08-bkpt1-300x190.png 300w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/li>\n<li>Now you can try creating projects based on more complex samples. Keep in mind that the Alpha release of the SDK is unstable and some of the examples may not work. E.g. in our tests the BLE Mouse example did not work on the nRF52832 chip and only worked first time after erasing bonds on nRF52840.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to create a basic project for the nRF52840 chip using VisualGDB. We will create a basic<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2497"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=2497"}],"version-history":[{"count":2,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2497\/revisions"}],"predecessor-version":[{"id":7197,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2497\/revisions\/7197"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=2497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=2497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=2497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}