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
https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=9270427
下载后安装,注意选择如下型号设备
然后加入输出Hello World的UART代码
开发板上电后串口输出如下图
https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=9270427
下载后安装,注意选择如下型号设备
然后加入输出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);
- }
- }
开发板上电后串口输出如下图