我在使用v1.4.0 SDK時, 想使用system_show_malloc(),但是在編譯時,出現下列的錯誤訊息
Code: Select all
In file included from user_devicefind.c:15:0:
user_devicefind.c: In function 'user_devicefind_init':
../../include/mem.h:25:43: error: 'mem_debug_file' undeclared (first use in this function)
#define os_zalloc(s) ({const char *file = mem_debug_file; pvPortZalloc(s, file, __LINE__);})
^
user_devicefind.c:116:39: note: in expansion of macro 'os_zalloc'
ptrespconn.proto.udp = (esp_udp *)os_zalloc(sizeof(esp_udp));
^
../../include/mem.h:25:43: note: each undeclared identifier is reported only once for each function it appears in
#define os_zalloc(s) ({const char *file = mem_debug_file; pvPortZalloc(s, file, __LINE__);})
^
user_devicefind.c:116:39: note: in expansion of macro 'os_zalloc'
ptrespconn.proto.udp = (esp_udp *)os_zalloc(sizeof(esp_udp));
^
make[1]: *** [.output/eagle/debug/obj/user_devicefind.o] Error 1
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v1.4.0_15_09_18/esp_iot_sdk_v1.4.0/app/user'
make: *** [.subdirs] Error 2
接著我到bbs.espressif.com上看到了v1.4.1,也試著來用用看這個system_show_malloc()函數,但是在編譯時,卻出現了下列的錯誤訊息
Code: Select all
/opt/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2: error: ld returned 1 exit status
我猜應該是irom0text.bin的size可能超過eagle.app.v6.ld檔案內irom0_0_seg的len=0x3C000。 於是我將0x3C000改為0x4C000,就能編譯成功。
但是當我要重新回來使用v1.4.0時(ld檔案內irom0_0_seg的len=0x3C000,不須修改),download結束之後,發現模組上電後的訊息,仍然是先前v1.4.1的內容。表示v1.4.0並沒有被燒寫進去,或者是沒有把v1.4.1覆蓋。
請問,我該如何處理才能讓v1.4.0編譯完成的bin檔案仍被正確的download以及執行 ?
謝謝!