你好,
我在研究SDK_2.7.0_EVK-MIMXRT1060 中 evkmimxrt1060_ota_demo_enet ,我发现在源文件main.c中mian函数,如下所示,只有这些。我看了readme.txt ,它里面写的是"IP address to the board is assigned by the DHCP server",但是在mian函数中,完全看不到 ip 地址的产生。主函数main中是否有网口的应用,我很疑问没有网络怎么与 AWS IOT 进行OTA的升级?这个例程主函数main(void)应用是否完整?
int main(void)
{
gpio_pin_config_t gpio_config = {kGPIO_DigitalOutput, 0, kGPIO_NoIntmode};
BOARD_ConfigMPU();
BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
BOARD_InitModuleClock();
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, true);
GPIO_PinInit(GPIO1, 9, &gpio_config);
GPIO_PinInit(GPIO1, 10, &gpio_config);
/* pull up the ENET_INT before RESET. */
GPIO_WritePinOutput(GPIO1, 10, 1);
GPIO_WritePinOutput(GPIO1, 9, 0);
delay();
GPIO_WritePinOutput(GPIO1, 9, 1);
SCB_DisableDCache();
CRYPTO_InitHardware();
xLoggingTaskInitialize(LOGGING_TASK_STACK_SIZE, LOGGING_TASK_PRIORITY, LOGGING_QUEUE_LENGTH);
vTaskStartScheduler();
for (;;)
;
}
Hi zhao yang ,
楼主你好,这个代码是基于freertos的代码,关于网络IP, 你可以看到main.c里面有这样一个函数:initNetwork
这个函数里面有对IP进行配置的。
希望能帮到你,如果还有问题,欢迎继续交流!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------