Thanks to rudi from this forum I have Nano32.
I'm using Platformio and i've managed to modify package https://github.com/platformio/platform-espressif32, for successfull built application (in this example it is 02_blink), against latest esp-idf (commit:abecab7).
The problem is that application hang up on nvs_flash_init() - function never return, the tail of verbose output is:
Code: Select all
...
D (390) boot: start: 0x400808e8
I (396) heap_alloc_caps: Initializing heap allocator:
I (404) heap_alloc_caps: Region 19: 3FFB4C14 len 0002B3EC tag 0
I (414) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (424) cpu_start: Pro cpu up.
I (429) cpu_start: Starting app cpu, entry point is 0x40080a48
I (0) cpu_start: App cpu up.
I (444) cpu_start: Pro cpu start user code
rtc v112 Sep 26 2016 22:32:10
XTAL 40M
I (481) cpu_start: Starting scheduler on PRO CPU.
I (43) cpu_start: Starting scheduler on APP CPU.
D (43) nvs: init start=6 count=3
If instead this code:
Code: Select all
nvs_flash_init();
system_init();
xTaskCreate(&blink_task, "blink_task", 512, NULL, 5, NULL);
Code: Select all
blink_task(0);
Exactly the same effect can be reproduced using MSYS2 environment from https://dl.espressif.com/dl/esp32_win32 ... 160816.zip and latest esp-idf, by set in menuconfig Optimization level to Release, which changes flag for compiler from -Og to -Os, but in Platformio changing this flag had no effect - app built in Platformio always hang on nvs_flash_init, so I think that optimization itself is not source of problem.
I'm not first-class programmer, rather semi-beginner and my guess can be totally wrong, but I think this problem can be related to memory mapping, wrong offset, misalign or overlap, maybe linker scripts need rework - don't know.
Maybe somebody can confirm this weird effect.
Best Regards