Blink example builds but doesn't appear to run.

bradcb212
Posts: 2
Joined: Fri Oct 01, 2021 6:10 pm

Blink example builds but doesn't appear to run.

Postby bradcb212 » Fri Oct 01, 2021 7:23 pm

Modified the blink example to not blink an LED (as my Solo-1 DevkitC doesn't have a user-controllable LED).

Code: Select all

void app_main(void)
{
    /* Configure the IOMUX register for pad BLINK_GPIO (some pads are
       muxed to GPIO on reset already, but some default to other
       functions and need to be switched to GPIO. Consult the
       Technical Reference for a list of pads and their default
       functions.)
    */
    //gpio_reset_pin(BLINK_GPIO);
    /* Set the GPIO as a push/pull output */
    //gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);

    ESP_LOGI("blink.c","Code is executing.");

    while(1) {
        /* Blink off (output low) */
        printf("Turning off the LED\n");
        //gpio_set_level(BLINK_GPIO, 0);
        vTaskDelay(1000 / portTICK_PERIOD_MS);
        /* Blink on (output high) */
        printf("Turning on the LED\n");
        //gpio_set_level(BLINK_GPIO, 1);
        vTaskDelay(1000 / portTICK_PERIOD_MS);
    }
}
I simply commented out the lines that blink the LED and added the ESP_LOGI() because printf() clearly wasn't working for some reason. ESP_LOGI() also doesn't seem to do anything.

Perhaps this means app_main() isn't executing...

Building/Flashing succeeds.

Here's the serial monitor:

PS C:\Users\bradc\Documents\PersonalProjects\esp32\examples\blink>
PS C:\Users\bradc\Documents\PersonalProjects\esp32\examples\blink> C:\Users\bradc\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:\Users\bradc\esp\esp-idf\tools\idf.py -p COM4 monitor
Executing action: monitor
Running idf_monitor in directory c:\users\bradc\documents\personalprojects\esp32\examples\blink
Executing "C:\Users\bradc\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe C:\Users\bradc\esp\esp-idf\tools/idf_monitor.py -p COM4 -b 115200 --toolchain-prefix xtensa-esp32-elf- c:\users\bradc\documents\personalprojects\esp32\examples\blink\build\blink.elf -m 'C:\Users\bradc\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe' 'C:\Users\bradc\esp\esp-idf\tools\idf.py' '-p' 'COM4'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM4 instead...
--- idf_monitor on \\.\COM4 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:9524
load:0x40078000,len:14464
ho 0 tail 12 room 4
load:0x40080400,len:4004
0x40080400: _init at ??:?

entry 0x400806b0
I (29) boot: ESP-IDF v4.3.1-dirty 2nd stage bootloader
I (29) boot: compile time 12:06:00
D (29) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (35) boot: chip revision: 1
I (39) boot_comm: chip revision: 1, min. bootloader chip revision: 0
D (46) boot.esp32: magic e9
D (49) boot.esp32: segments 03
D (52) boot.esp32: spi_mode 02
D (55) boot.esp32: spi_speed 00
D (58) boot.esp32: spi_size 02
I (61) boot.esp32: SPI Speed : 40MHz
I (66) boot.esp32: SPI Mode : DIO
I (71) boot.esp32: SPI Flash Size : 4MB
I (75) boot: Enabling RNG early entropy source...
D (80) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=8000 src_addr_aligned=0
D (89) boot: mapped partition table 0x8000 at 0x3f408000
D (95) flash_parts: partition table verified, 4 entries
I (100) boot: Partition Table:
I (104) boot: ## Label Usage Type ST Offset Length
D (111) boot: load partition table entry 0x3f408000
D (116) boot: type=1 subtype=2
I (119) boot: 0 nvs WiFi data 01 02 00009000 00006000
D (127) boot: load partition table entry 0x3f408020
D (132) boot: type=1 subtype=1
I (135) boot: 1 phy_init RF data 01 01 0000f000 00001000
D (142) boot: load partition table entry 0x3f408040
D (147) boot: type=0 subtype=0
I (151) boot: 2 factory factory app 00 00 00010000 00100000
I (158) boot: End of partition table
D (162) boot: Trying partition index -1 offs 0x10000 size 0x100000
D (169) esp_image: reading image header @ 0x10000
D (173) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
D (180) esp_image: image header: 0xe9 0x06 0x02 0x02 40081080
I (186) boot_comm: chip revision: 1, min. application chip revision: 0
V (193) esp_image: loading segment header 0 at offset 0x10018
V (199) esp_image: segment data length 0x64fc data starts 0x10020
V (205) esp_image: segment 0 map_segment 1 segment_data_offs 0x10020 load_addr 0x3f400020
I (213) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=064fch ( 25852) map
D (222) esp_image: free data page_count 0x00000032
D (227) bootloader_flash: mmu set paddr=00010000 count=1 size=64fc src_addr=10020 src_addr_aligned=10000
V (246) esp_image: loading segment header 1 at offset 0x1651c
D (246) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (249) esp_image: segment data length 0x2898 data starts 0x16524
V (255) esp_image: segment 1 map_segment 0 segment_data_offs 0x16524 load_addr 0x3ffb0000
I (263) esp_image: segment 1: paddr=00016524 vaddr=3ffb0000 size=02898h ( 10392) load
D (272) esp_image: free data page_count 0x00000032
D (277) bootloader_flash: mmu set paddr=00010000 count=1 size=2898 src_addr=16524 src_addr_aligned=10000
V (290) esp_image: loading segment header 2 at offset 0x18dbc
D (292) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (299) esp_image: segment data length 0x7254 data starts 0x18dc4
V (305) esp_image: segment 2 map_segment 0 segment_data_offs 0x18dc4 load_addr 0x40080000
0x40080000: _WindowOverflow4 at C:/Users/bradc/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

I (313) esp_image: segment 2: paddr=00018dc4 vaddr=40080000 size=07254h ( 29268) load
D (322) esp_image: free data page_count 0x00000032
D (327) bootloader_flash: mmu set paddr=00010000 count=2 size=7254 src_addr=18dc4 src_addr_aligned=10000
V (348) esp_image: loading segment header 3 at offset 0x20018
D (349) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
V (351) esp_image: segment data length 0x12f60 data starts 0x20020
V (357) esp_image: segment 3 map_segment 1 segment_data_offs 0x20020 load_addr 0x400d0020
0x400d0020: _stext at ??:?

I (366) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=12f60h ( 77664) map
D (374) esp_image: free data page_count 0x00000032
D (379) bootloader_flash: mmu set paddr=00020000 count=2 size=12f60 src_addr=20020 src_addr_aligned=20000
V (417) esp_image: loading segment header 4 at offset 0x32f80
D (417) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (418) esp_image: segment data length 0x3974 data starts 0x32f88
V (424) esp_image: segment 4 map_segment 0 segment_data_offs 0x32f88 load_addr 0x40087254
0x40087254: xTaskGetSchedulerState at C:/Users/bradc/esp/esp-idf/components/freertos/tasks.c:4508

I (433) esp_image: segment 4: paddr=00032f88 vaddr=40087254 size=03974h ( 14708) load
D (441) esp_image: free data page_count 0x00000032
D (446) bootloader_flash: mmu set paddr=00030000 count=1 size=3974 src_addr=32f88 src_addr_aligned=30000
V (462) esp_image: loading segment header 5 at offset 0x368fc
D (462) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (468) esp_image: segment data length 0x10 data starts 0x36904
V (474) esp_image: segment 5 map_segment 0 segment_data_offs 0x36904 load_addr 0x50000000
I (482) esp_image: segment 5: paddr=00036904 vaddr=50000000 size=00010h ( 16) load
D (491) esp_image: free data page_count 0x00000032
D (496) bootloader_flash: mmu set paddr=00030000 count=1 size=10 src_addr=36904 src_addr_aligned=30000
V (505) esp_image: image start 0x00010000 end of last section 0x00036914
D (512) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
D (519) boot: Calculated hash: f194f6a6022e8e8fc0406f09cd4cea066ccaaac1930f68125aa524c5e73359ae
I (533) boot: Loaded app from partition at offset 0x10000
I (534) boot: Disabling RNG early entropy source...
D (539) boot: Mapping segment 0 as DROM
D (543) boot: Mapping segment 3 as IROM
D (547) boot: calling set_cache_and_start_app
D (551) boot: configure drom and irom and start
V (556) boot: d mmu set paddr=00010000 vaddr=3f400000 size=25852 n=1
V (562) boot: rc=0
V (565) boot: rc=0
V (567) boot: i mmu set paddr=00020000 vaddr=400d0000 size=77664 n=2
V (573) boot: rc=0
V (575) boot: rc=0
D (577) boot: start: 0x40081080
0x40081080: call_start_cpu0 at C:/Users/bradc/esp/esp-idf/components/esp_system/port/cpu_start.c:252

I (592) cpu_start: Pro cpu up.

That's it...

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Blink example builds but doesn't appear to run.

Postby ESP_Sprite » Sat Oct 02, 2021 4:32 am

Could you post your sdkconfig? Perhaps it's set to use another UART for console output?

Who is online

Users browsing this forum: No registered users and 28 guests