Hello World教程
时间:10-02
整理:3721RD
点击:
下面介绍在NXP LPC54110开发板写Hello World运行的方法,首先下载MCUXpresso IDE开发工具,需要注册账号并同意条款http://www.nxp.com/products/developer-resources/run-time-software/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide-v10.0.2:MCUXpresso-IDE?&tid=vanMCUXPRESSO/IDE
![](../imgqa/ele/mcu/mcu-3721rd.com-16169xmo1mt30iu3.png)
https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=9270427
下载后安装,注意选择如下型号设备
![](../imgqa/ele/mcu/mcu-3721rd.com-16170afjp5zov1um.jpg)
然后加入输出Hello World的UART代码
![](../imgqa/ele/mcu/mcu-3721rd.com-16171wqzx4xhtkls.jpg)
开发板上电后串口输出如下图
![](../imgqa/ele/mcu/mcu-3721rd.com-161723x5ut5vkd2t.jpg)
![](../imgqa/ele/mcu/mcu-3721rd.com-16169xmo1mt30iu3.png)
https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=9270427
下载后安装,注意选择如下型号设备
![](../imgqa/ele/mcu/mcu-3721rd.com-16170afjp5zov1um.jpg)
然后加入输出Hello World的UART代码
- ******************************************************************************/
- /*!
- * @brief Main function
- */
- int main(void)
- {
- char ch;
- /* Init board hardware. */
- /* attach 12 MHz clock to FLEXCOMM0 (debug console) */
- CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);
- BOARD_InitPins();
- BOARD_BootClockFROHF48M();
- BOARD_InitDebugConsole();
- PRINTF("hello world.\r\n");
- while (1)
- {
- ch = GETCHAR();
- PUTCHAR(ch);
- }
- }
![](../imgqa/ele/mcu/mcu-3721rd.com-16171wqzx4xhtkls.jpg)
开发板上电后串口输出如下图
![](../imgqa/ele/mcu/mcu-3721rd.com-161723x5ut5vkd2t.jpg)