hello_world_qspi_xip#
Overview#
The Hello World demo application provides a sanity check for the new SDK build environments and board bring up. The Hello World demo prints the “Hello World” string to the terminal using the SDK UART drivers. The purpose of this demo is to show how to use the UART, and to provide a simple project for debugging and further development. Note: Please input one character at a time. If you input too many characters each time, the receiver may overflow because the low level UART uses simple polling way for receiving. If you want to try inputting many characters each time, just define DEBUG_CONSOLE_TRANSFER_NON_BLOCKING in your project to use the advanced debug console utility.
Supported Boards#
FRDM-MCXN947
Hardware requirements
Type-C USB cable
FRDM-MCXN947 board
Personal Computer
Software requirements
BLHost 2.6.7 or later
Board settings
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) on the board
Determine the COM port number (See Appendix A in Getting started guide for description how to determine serial port number).
Open a command prompt and navigate to the BLHost executables folder (
\bin<OS environment>). Configure the BOOT_SRC in CMPA @0x01004000 using blhost. 4.1 Enter ISP mode so that the blhost could program the CMPA. Press and hold SW3(ISP key) => Press and release SW1 (N9 RST key) => Release SW3 Another way to enter ISP mode. nxpdebugmbox.exe -i pyocd ispmode -m 0 4.2 Type the following command into the command prompt blhost -p COMxx write-memory 0x01004000 <SDK_root>\boards<EVK name>\demo_apps\hello_world_qspi_xip\cm33_core0\bootfromflexspi.bin Note: “xx” in the command above should be replaced with the COM port number of your EVK.
After successfully running the script above, press and release the reset button (SW1 - N9 RST key).
Open a serial terminal with the following settings :
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The file bootfromflash.bin is used to reset the boot source to internal flash, follow step 4.1,4.2 to program the bootfromflash.bin to 0x01004000
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.
LPCXpresso54S018
Hardware requirements
Micro USB cable
LPCXpresso54S018 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This demo is an external flash XIP demo, CPU will execute the code in external flash:
Build the demo to generate a bin file. Note: If need to generate bin file using MCUXpresso IDE, below steps need to be followed: Set in example Properties->C/C++ Build->Settings->Build steps->Post-build steps->Edit enbable arm-none-eabi-objcopy -v -O binary “&{BuildArtifactFileName}” “&{BuildArtifactFileBaseName}.bin”
This plainload example linked the vector table to 0x10000000, but program to external flash 0x10000000.
Program the bin file to external on board flash via SEGGER J-FLASH Lite(V6.22 or higher):
a. Open SEGGER J-FLASH Lite, select device LPC54S018.
b. Click the ‘Erase Chip’ to erase the extrenal flash.(if can not success, press SW4 button and reset the board, and try to erase again)
c. Select the bin data file, set the ‘.bin/Erase Start’ address to 0x10000000, then click ‘Program Device’ Note: Please use above way to program the binary file built by armgcc tool chain to external flash. For IAR, KEIL, MCUXpresso IDE, you can use the IDE tool to program the external flash.
Press the reset button. The log below shows the output of the hello world demo in the terminal window:
hello world.
LPCXpresso54S018M
Hardware requirements
Micro USB cable
LPCXpresso54S018M board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This demo is an external flash XIP demo, CPU will execute the code in external flash:
Build the demo to generate a bin file. Note: If need to generate bin file using MCUXpresso IDE, below steps need to be followed: Set in example Properties->C/C++ Build->Settings->Build steps->Post-build steps->Edit enbable arm-none-eabi-objcopy -v -O binary “&{BuildArtifactFileName}” “&{BuildArtifactFileBaseName}.bin”
This plainload example linked the vector table to 0x10000000, but program to external flash 0x10000000.
Program the bin file to external on board flash via SEGGER J-FLASH Lite(V6.22 or higher):
a. Open SEGGER J-FLASH Lite, select device LPC54S018M.
b. Click the ‘Erase Chip’ to erase the extrenal flash.(if can not success, press SW4 button and reset the board, and try to erase again)
c. Select the bin data file, set the ‘.bin/Erase Start’ address to 0x10000000, then click ‘Program Device’ Note: Please use above way to program the binary file built by armgcc tool chain to external flash. For IAR, KEIL, MCUXpresso IDE, you can use the IDE tool to program the external flash.
Press the reset button. The log below shows the output of the hello world demo in the terminal window:
hello world.
LPCXpresso55S36
Hardware requirements
Mini/micro USB cable
LPCXpresso55S36 board
Personal Computer
Board settings
Connect pin 1-2 of JP41,JP42,JP43,JP44,JP45,JP62,JP64 and JP65. Close JP63,JP66,JP67,JP68 and JP69.
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board
Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Set boot mode to ISP boot with J43 to set ISP0 high, ISP1 low unshort J43 1-2 to make ISP0 high, short J43 3-4 to make ISP1 low
Write flash config block to flash offset 0x400(0x08000400) blhost -p com26 fill-memory 0x2000f000 4 0xC0000001 blhost -p com26 configure-memory 0x9 0x2000f000 blhost -p com26 flash-erase-region 0x08000000 0x1000 blhost -p com26 fill-memory 0x2000f004 4 0xf000000f blhost -p com26 configure-memory 0x9 0x2000f004 Note: The com26 need update based on your EVK com number
Configure PFR FLEXSPI_BOOT_CFG[0] @0x3E280 to reset flexspi flash use ROM with GPIO P1_14 blhost -p com26 write-memory 0x3E200 rom_reset_flexspi.bin Note: For customer board, the PFR page @0x3E200 should read back first, then update @3E280 based on customer board schematic. Command “blhost -p com26 read-memory 0x3E200 512 rom_reset_flexspi.bin” could be used to read PFR page @0x3E200.
Set boot mode to FlexSPI boot with J43 to set ISP0 low, ISP1 high Short J43 1-2 to make ISP0 low, unshort J43 3-4 to make ISP1 high
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Please note, when using FlexSPI boot, the PLL0 is used by FlexSPI and shall not change the Pll0. Suggest to use FRO or PLL1 for example clock instead.
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.
MCX-N5XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N5XX-EVK board
Personal Computer
Software requirements
BLHost 2.6.7 or later
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J5) on the board
Determine the COM port number (See Appendix A in Getting started guide for description how to determine serial port number).
Open a command prompt and navigate to the BLHost executables folder (
\bin<OS environment>). Configure the BOOT_SRC in CMPA @0x01004000 using blhost. 4.1 Enter ISP mode so that the blhost could program the CMPA. Press and hold SW3(ISP key) => Press and release SW1 (N9 RST key) => Release SW3 Another way to enter ISP mode. nxpdebugmbox.exe -i pyocd ispmode -m 0 4.2 Type the following command into the command prompt blhost -p COMxx write-memory 0x01004000 <SDK_root>\boards<EVK name>\demo_apps\hello_world_qspi_xip\cm33_core0\bootfromflexspi.bin Note: “xx” in the command above should be replaced with the COM port number of your EVK.
After successfully running the script above, press and release the reset button (SW1 - N9 RST key).
Open a serial terminal with the following settings :
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The file bootfromflash.bin is used to reset the boot source to internal flash, follow step 4.1,4.2 to program the bootfromflash.bin to 0x01004000
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.
MCX-N9XX-EVK
Hardware requirements
Mini/micro USB cable
MCX-N9XX-EVK board
Personal Computer
Software requirements
BLHost 2.6.7 or later
Board settings
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J5) on the board
Determine the COM port number (See Appendix A in Getting started guide for description how to determine serial port number).
Open a command prompt and navigate to the BLHost executables folder (
\bin<OS environment>). Configure the BOOT_SRC in CMPA @0x01004000 using blhost. 4.1 Enter ISP mode so that the blhost could program the CMPA. Press and hold SW3(ISP key) => Press and release SW1 (N9 RST key) => Release SW3 Another way to enter ISP mode. nxpdebugmbox.exe -i pyocd ispmode -m 0 4.2 Type the following command into the command prompt blhost -p COMxx write-memory 0x01004000 <SDK_root>\boards<EVK name>\demo_apps\hello_world_qspi_xip\cm33_core0\bootfromflexspi.bin Note: “xx” in the command above should be replaced with the COM port number of your EVK.
After successfully running the script above, press and release the reset button (SW1 - N9 RST key).
Open a serial terminal with the following settings :
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The file bootfromflash.bin is used to reset the boot source to internal flash, follow step 4.1,4.2 to program the bootfromflash.bin to 0x01004000
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Software requirements
BLHost 2.6.7 or later
Board settings
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) on the board
Determine the COM port number (See Appendix A in Getting started guide for description how to determine serial port number).
Open a command prompt and navigate to the BLHost executables folder (
\bin<OS environment>). Configure the BOOT_SRC in CMPA @0x01004000 using blhost. 4.1 Enter ISP mode so that the blhost could program the CMPA. Press and hold SW3(ISP key) => Press and release SW1 (N9 RST key) => Release SW3 Another way to enter ISP mode. nxpdebugmbox.exe -i pyocd ispmode -m 0 4.2 Type the following command into the command prompt blhost -p COMxx – flash-erase-region 0x11002000 0x400 blhost -p COMxx write-memory 0x11002000 <SDK_root>\boards<EVK name>\demo_apps\hello_world_qspi_xip\bootfromflexspi.bin Note: “xx” in the command above should be replaced with the COM port number of your EVK.
After successfully running the script above, press and release the reset button (SW1 - N9 RST key).
Open a serial terminal with the following settings :
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The file bootfromflash.bin is used to reset the boot source to internal flash, follow step 4.1,4.2 to program the bootfromflash.bin to 0x11002000
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Software requirements
BLHost 2.6.7 or later
Board settings
Prepare the Demo
Connect a type-c USB cable between the PC host and the MCU-Link USB port (J17) on the board
Determine the COM port number (See Appendix A in Getting started guide for description how to determine serial port number).
Open a command prompt and navigate to the BLHost executables folder (
\bin<OS environment>). Configure the BOOT_SRC in CMPA @0x01004000 using blhost. 4.1 Enter ISP mode so that the blhost could program the CMPA. Press and hold SW3(ISP key) => Press and release SW1 (N9 RST key) => Release SW3 Another way to enter ISP mode. nxpdebugmbox.exe -i pyocd ispmode -m 0 4.2 Type the following command into the command prompt blhost -p COMxx – flash-erase-region 0x11002000 0x400 blhost -p COMxx write-memory 0x11002000 <SDK_root>\boards<EVK name>\demo_apps\hello_world_qspi_xip\bootfromflexspi.bin Note: “xx” in the command above should be replaced with the COM port number of your EVK.
After successfully running the script above, press and release the reset button (SW1 - N9 RST key).
Open a serial terminal with the following settings :
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The file bootfromflash.bin is used to reset the boot source to internal flash, follow step 4.1,4.2 to program the bootfromflash.bin to 0x11002000
Running the demo
The log below shows the output of the hello world demo in the terminal window:
hello world.