38 io_conf.pull_down_en = 0;

39 //disable pull-up mode

40 io_conf.pull_up_en = 0;

41 //configure GPIO with the given settings

42 gpio_config(&io_conf);

43

44

45 printf(“Hello world!\n”);

46

47 /* Print chip information */

48 esp_chip_info_t chip_info;

49 esp_chip_info(&chip_info);

50 printf(“This is ESP32 chip with %d CPU cores, WiFi%s%s, ”,

51 chip_info.cores,

52 (chip_info.features & CHIP_FEATURE_BT) ? “/BT” : “”,

53 (chip_info.features & CHIP_FEATURE_BLE) ? “/BLE” : “”);

54

55 printf(“silicon revision %d, ”, chip_info.revision);

56

57 printf(“%dMB %s flash\n”, spi_flash_get_chip_size() / (1024 * 1024),

58 (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? “embedded” : “external”);

59

60 // for (int i = 10; i 》= 0; i--)

61 while(1)

62 {

63 //printf(“Restarting in %d seconds.。。\n”, i);

64 vTaskDelay(1000 / portTICK_PERIOD_MS);//延时

65 printf(“I am ZhiNianZhiZhan! \n”);

66 printf(“Try To Study ESP32\n”);

67 gpio_set_level(GPIO_OUTPUT_IO_LED, i % 2);//将板子上的led灯不断翻转IO,使其闪烁

68 i++;

69 if(i》499)i=0;

70 }

71 //printf(“Restarting now.\n”);

72

73 //fflush(stdout);

74 //esp_restart();//重启函数,屏蔽掉就不重启了。

75 }

接着,build。漫长的等待。。。。。.build成功会显示如下东西:

build成功后,就是下载了。