Demo
This topic lists the steps to run a demo application using IAR, steps to run a demo application using MCUXpresso IDE, and steps to download LL firmware from the reference board. The following chapter uses RT1060 and peripheral_ht as an example.
Before you run the example, see the readme.txt in current the peripheral_ht directory and the Hardware Rework Guide for EdgeFast BT PAL document to set the jumper and connect the wireless module with development board.
The uSD type wireless module is similar to the Development board connector in the Run an IAR example section. If the module is M2 type, connect the module to the onboard M2 interface.
Run a demo application using IAR
This document uses EVKRT1060 EdgeFast Bluetooth Protocol Abstraction Layer API example to describe the steps to open a project, build an example, and run a project. For details, see Section 3 in Getting Started with MCUXpresso SDK User’s Guide(document MCUXSDKGSUG) atroot/docs/Getting Started with MCUXpresso SDK.pdf.
Open an IAR example
For the IAR Embedded Workbench, unpack the contents of the archive to a folder on a local drive.
The example projects are available at:
<root>/boards/evkmimxrt1060/edgefast_bluetooth_examples/peripheral_ht/iar
Open the IAR workspace file. For example, the highlighted *.eww format file
Parent topic:Run a demo application using IAR
Build an IAR example
Select
flexspi_nor_debug
orflexspi_nor_release
configurations from the drop-down selector above the project tree in the workspace.Build the EdgeFast Bluetooth Protocol Abstraction Layer project.
Note: Wireless module does not have flash hardware and requires 512 KB image loaded from board (such as RT1060) on system startup. The 512 KB image is kept on RT1060 side and only
flexspi_nor target
is supported for Bluetooth examples. Other targets are not supported because memory size limit.
Parent topic:Run a demo application using IAR
Run an IAR example
This document uses the peripheral_ht as an example to describe the steps to run an example. For details on other projects and compilers, see the readme file in the corresponding example directory.
The following figure shows the connection of RT1060 and the uSD wireless module.
Connect the USB debug console port to PC. For example, connect J14 of EVKRT1060 to the PC.
Connect a 5 V power source to the J1 jack in the Wireless module board.
Make the appropriate debugger settings in the project options window, as shown in the figure below.
Click the Download and Debug button to flash the executable onto the board, as shown in the following figure. After the download is complete, if you must test the function of HFP, stop IAR debugging, and then connect the PCM interface. Reset the target board by manually.
Linker layer (LL) Firmware running in wireless module loads from EVKRT1060 by SDIO interface, so need take a bit time to download the LL firmware, “Initialize AW-AM457-uSD Driver” prints in the debug console. For example, it depends on the firmware. For details, see readme.txt.
Note: The projects are configured to use “CMSIS DAP” as the default debugger. Ensure that the OpenSDA chip of the board contains a CMSIS. DAP firmware or that the debugger selection corresponds to the physical interface used to interface to the board.
Parent topic:Run a demo application using IAR
Parent topic:Demo
Run a demo application using MCUXpresso IDE
This document uses peripheral_ht example to describe the steps to open a project, build an example, and run a project on MCUXpresso IDE.
For details, see Section 3 in Getting Started with MCUXpresso SDK User’s Guide (document MCUXSDKGSUG) at root/docs/Getting Started with MCUXpresso SDK.pdf and refer to the readme file in the corresponding demo’s directory.
Open an MCUXpresso IDE example
Open MCUXpresso IDE and open an existing or a new workspace location.
Drag and drop the package archive into the MCUXpresso Installed SDKs area in the lower right of the main window.
After the SDK is loaded successfully, select the Import the SDK examples(s)… to add examples to your workspace.
Select the evkmimxrt1060 board and click the Next button to select the desired example(s).
Select the evkmimxrt1060 board EdgeFast Bluetooth example. For example, peripheral_ht.
Ensure to change SDK debug console from Semihost to UART.
Click Finish.
Parent topic:Run a demo application using MCUXpresso IDE
Build an MCUXpresso IDE example
Select desired target for your project.
Build MCUXpresso IDE EdgeFast Bluetooth Protocol Abstraction Layer project.
Parent topic:Run a demo application using MCUXpresso IDE
Run an MCUXpresso IDE example
For MCUXpresso IDE project running, all steps are similar to Run an IAR example except the steps of downloading image from compiler.
To download MCUXpresso IDE image to board, click the Debug button to download the executable file onto the board.
Parent topic:Run a demo application using MCUXpresso IDE
Parent topic:Demo
Run a demo application using MDK
This document uses peripheral_ht example to describe the steps to open a project, build an example, and run a project on MDK.
For details, see the related section in the Getting Started with MCUXpresso SDK User’s Guide (document: MCUXSDKGSUG) in the directory root/docs/ and the readme file in the corresponding demo’s directory.
Open an MDK project
For the IAR Embedded Workbench, unpack the contents of the archive to a folder on a local drive.
The example projects are available at:
<root>/boards/evkmimxrt1060/edgefast_bluetooth_examples/peripheral_ht/mdk
.Open the mdk workspace file. For example, the highlighted *.uvmpw format file.
Parent topic:Run a demo application using MDK
Build an MDK example
To build an MDK example:
Select flexspi_nor_debug or flexspi_nor_release configurations from the drop-down selector above the project tree in the workspace.
Click the highlighted icon to build the EdgeFast Bluetooth Protocol Abstraction Layer project.
Parent topic:Run a demo application using MDK
Run an MDK example
For MDK project running, all steps are similar to Run an IAR example except the steps of downloading image from compiler.
To download the MDK image to the board, click the Debug button. The executable file downloads to the board.
Parent topic:Run a demo application using MDK
Parent topic:Demo
Run a demo application using Arm GCC
This document uses peripheral_ht example to describe the steps to open a project, build an example, and run a project on MDK.
For details, see the related section in Getting Started with MCUXpresso SDK User’s Guide (document: MCUXSDKGSUG) at root/docs/ and the readme file in the corresponding demo’s directory.
Setup tool chains
See the section “Run a demo using Arm GCC” of getting start document. For example, Getting Started with MCUXpresso SDK for MIMXRT1160-EVK.
Parent topic:Run a demo application using Arm GCC
Build a GCC example
To build a GCC example:
Change the directory to the project directory:
<install_dir>\boards\evkmimxrt1060\edgefast_bluetooth_examples\peripheral_ht\armgcc
.Run the build script.
For windows, the script is build_flexspi_nor_debug.bat/ build_flexspi_nor_release.bat.
The build output is shown in the following figure.
Parent topic:Run a demo application using Arm GCC
Run a GCC example
Refer to the section “Run a demo using Arm GCC” of the getting start document. For example, see Getting Started with MCUXpresso SDK for MIMXRT1060-EVK. The peripheral_ht.elf is the target to download.
Parent topic:Run a demo application using Arm GCC
Parent topic:Demo
Download Linker Layer firmware from the reference board
Download the Linker Layer (LL) Firmware from Reference board EVKRT1060 by SDIO interface before running the Bluetooth Controller stack. The LL download is necessary because wireless module does not support flash.
Parent topic:Demo
Change board-specific parameters
There are some board-specific parameters that can be changed in the application layer for EdgeFast BT PAL.
Change HCI UART parameters
Since the controller can support different baud rates, the demo provides an interface with configurable baud rates. The functioncontroller_hci_uart_get_configuration is used to get HCI UART parameters, including the instance, default baud rate, which depends on the controller, running baud rate which defined by macro BOARD_BT_UART_BAUDRATE and so on. If this function returns ‘0’ and the running baud rate is inconsistent with the default baud rate, EdgeFast BT PAL switches the baud rate of the controller to the running baud rate.
Parent topic:Change board-specific parameters
Change USB Host stack parameters
Since the board supports multiple USB ports, the demo provides a configurable interface for USB Host stack. The functionUSB_HostGetConfiguration received the instance of USB for EdgeFast BT PAL. For the case where there is a USBPHY, the demo configures the properties of the PHY throughUSB_HostPhyGetConfiguration.
Note: There are series of hex bytes printed on the console after the wireless module resets. However, it does not impact the EdgeFast BT PAL application running.
Parent topic:Change board-specific parameters
Parent topic:Demo