![]() ![]() While they also provide support for Keil, IAR, and GNU/GCC, the agreement with Segger is that they will licence it for free for use with Nordic chips. Nordic's Getting Started Guide v1.3, which covers the nRF51 DK, recommends Segger SES as the preferred development enviroment and is supported by Nordic. I decided I didn't need the feature of the nRF52/Cortex M4, which was my first mistake. In comparison, the later nRF52 series are M4 based, more capable but more expensive. It uses the nRF51422 which is Cortex M0 based, so I thought it would be a good way to do some M0 development work. The Development Kit comes in a handy sized board which only needs micro USB for power and data, and has a built in SEGGER JLink debug chip, as well as 4 user buttons and LEDs, and all the usual ports. If you would like to program the on-board FLASH memory using OpenOCD instead of the J-Link software, you can create a FLASH programming plugin similar to the one described in this tutorial.The nRF51 is recent enough to be supported by a mature development environment and to have lots of others try it out before me. Then Go to the “Debug Settings” page, select “Debug Methods” instead of “USB Devices”, pick OpenOCD, choose CMSIS-DAP as the JTAG/SWD programmer and edit the OpenOCD command line to use the configuration file from the project directory: Now you will be able to debug your program using the on-board CMSIS-DAP interface. Download this OpenOCD configuration script to your project directory.Change the linker script to the “xxxx_ram.ld” version:.Open the MSBuild Settings page of VisualGDB Project Properties and locate the linker script: In this tutorial we will switch the program to run entirely from SRAM in order to demonstrate CMSIS-DAP-based debugging. ![]() Note that CMSIS-DAP is relatively slow and as of January 2019, the OpenOCD tool used to debug the board with it cannot program the on-board FLASH memory unless you create a FLASH programming plugin. Now we will show how to use the on-board CMSIS-DAP interface instead of Segger J-Link.As the imported project includes all the necessary code from the SDK, you can use the CodeJumps popups to explore relations between different parts of the program itself and the i.MX RT SDK: You can use the regular debugging techniques to debug your program.Set a breakpoint near the GPIO_PortToggle() call and wait for it to trigger:.Verify that the on-board LED is blinking: Now you can build the project by pressing Ctrl-Shift-B:.Select “Segger J-Link” on the Debug Method page and click “Finish” to generate the project:.Connect J-Link to the 20-pin JTAG connector and plug both J-Link and the board into the USB ports: It comes with out-of-the-box support for on-board FLASH memory programming and is much faster than the on-board CMSIS-DAP interface. The easiest way to debug the i.MX RT devices would be using an external Segger J-Link device. The last page of the wizard allows configuring the debug interface.In this tutorial we will use use the “igpio_led_output” example: Click “KSDK Samples” to view the vendor-supplied samples instead. As the SDK was imported automatically, it won’t contain any VisualGDB-supplied example projects.VisualGDB will import the SDK and display the i.MX RT devices in the device list.Point VisualGDB to the folder where you have extracted the generated SDK:.On the second page of the wizard click “Import an MCUXpresso SDK”:.On the first page of the wizard select “Create a new project with MSBuild”:.Extract the downloaded SDK anywhere on your computer and open the VisualGDB Embedded Project Wizard:.Confirm your OS/toolchain settings (GCC ARM Embedded) and click “Download SDK”:.Open the MCUXpresso online SDK builder, select your board and click “Build MCUXpresso SDK”: Instead, you need to generate an SDK for your board online. The i.MX RT devices do not come with a regular stand-alone SDK.We will create a basic “Blinking LED” project for the IMXRT1050-EVB board and will show how to debug it using Segger J-Link and the on-board CMSIS-DAP-compatible interface. Before you begin, install VisualGDB 5.4 Beta 2 or later. This tutorial shows how to create a basic project targeting the i.MX RT device using Visual Studio and VisualGDB.
0 Comments
Leave a Reply. |