OLIMEX/ESP8266

Compile, then error ;-(

ly0 opened this issue · 3 comments

ly0 commented
latyas@zypher:~/ESP8266-master/IoT Firmware$ make
make[1]: Entering directory `/home/latyas/ESP8266-master/IoT Firmware/olimex'
make[2]: Entering directory `/home/latyas/ESP8266-master/IoT Firmware/olimex/user'
make[3]: Entering directory `/home/latyas/ESP8266-master/IoT Firmware/olimex/user/modules'
xt-xcc -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals  -DICACHE_FLASH   -I include -I ./ -I ../ -I ../../include/ets -I ../include -I ./ -I ../../include/ets -I ../../include -I ../../../include -I ../../../include/eagle  -o .output/eagle/debug/obj/mod_finger.o -c mod_finger.c
mod_finger.c: In function 'void finger_buff_init(uint32, uint8, uint16)':
mod_finger.c:17:65: error: 'pvPortZalloc' was not declared in this scope
   finger_buff = (finger_packet *)os_zalloc(sizeof(finger_packet));
                                                                 ^
mod_finger.c:25:28: error: 'vPortFree' was not declared in this scope
   os_free(finger_buff->data);
                            ^
mod_finger.c:31:25: error: 'pvPortZalloc' was not declared in this scope
   (uint8 *)os_zalloc(len)
                         ^
In file included from mod_finger.c:2:0:
mod_finger.c: In function 'void finger_send_buff()':
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:48:2: note: in expansion of macro 'debug'
  debug("\nFINGER: Sending packet...\n");
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:49:2: note: in expansion of macro 'debug'
  debug("Address: 0x%08x\n", finger_buff->address);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:50:2: note: in expansion of macro 'debug'
  debug("PID: 0x%02x\n", finger_buff->pid);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:51:2: note: in expansion of macro 'debug'
  debug("Len: 0x%04x\n", finger_buff->len);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:52:2: note: in expansion of macro 'debug'
  debug("Data: ");
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:55:3: note: in expansion of macro 'debug'
   debug("0x%02x ", finger_buff->data[j]);
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:57:2: note: in expansion of macro 'debug'
  debug("\n\n");
  ^
mod_finger.c: In function 'void finger_execute(uint32, uint8, uint8*, uint16)':
mod_finger.c:85:45: error: 'ets_memcpy' was not declared in this scope
   os_memcpy(finger_buff->data + 1, data, len);
                                             ^
In file included from mod_finger.c:2:0:
mod_finger.c: In function 'void finger_receive()':
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:97:3: note: in expansion of macro 'debug'
   debug("FINGER: Not initialized\n");
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:102:3: note: in expansion of macro 'debug'
   debug("FINGER: Address not match\n");
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:107:3: note: in expansion of macro 'debug'
   debug("FINGER: Checksum not match [0x%04x] [0x%04x]\n", finger_buff->check_sum, finger_check_sum());
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:114:2: note: in expansion of macro 'debug'
  debug("\nFINGER: Received packet\n");
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:115:2: note: in expansion of macro 'debug'
  debug("Address: 0x%08x\n", finger_buff->address);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:116:2: note: in expansion of macro 'debug'
  debug("PID: 0x%02x\n", finger_buff->pid);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:117:2: note: in expansion of macro 'debug'
  debug("Len: 0x%04x\n", finger_buff->len);
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:118:2: note: in expansion of macro 'debug'
  debug("Data: ");
  ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:121:3: note: in expansion of macro 'debug'
   debug("0x%02x ", finger_buff->data[i]);
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:123:2: note: in expansion of macro 'debug'
  debug("\n\n");
  ^
mod_finger.c: In function 'void finger_char_in(char)':
mod_finger.c:184:30: error: 'vPortFree' was not declared in this scope
     os_free(finger_buff->data);
                              ^
mod_finger.c:186:59: error: 'pvPortZalloc' was not declared in this scope
    finger_buff->data = (uint8 *)os_zalloc(finger_buff->len);
                                                           ^
In file included from mod_finger.c:2:0:
mod_finger.c: In function 'void finger_check()':
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:210:3: note: in expansion of macro 'debug'
   debug("FINGER: Device found\n");
   ^
../../../include/osapi.h:39:41: error: 'os_printf_plus' was not declared in this scope
  os_printf_plus(flash_str, ##__VA_ARGS__); \
                                         ^
../stdout.h:4:16: note: in expansion of macro 'os_printf'
  #define debug os_printf
                ^
mod_finger.c:212:3: note: in expansion of macro 'debug'
   debug("FINGER: Device not found\n");
   ^
mod_finger.c: In function 'void finger_init()':
mod_finger.c:232:36: error: 'setTimeout' was not declared in this scope
  setTimeout(finger_check, NULL, 500);
                                    ^
make[3]: *** [.output/eagle/debug/obj/mod_finger.o] Error 1
make[3]: Leaving directory `/home/latyas/ESP8266-master/IoT Firmware/olimex/user/modules'
make[2]: *** [.subdirs] Error 2
make[2]: Leaving directory `/home/latyas/ESP8266-master/IoT Firmware/olimex/user'
make[1]: *** [.subdirs] Error 2
make[1]: Leaving directory `/home/latyas/ESP8266-master/IoT Firmware/olimex'
make: *** [.subdirs] Error 2

You have to use following command sequence to compile firmware

make clean
make COMPILE=gcc SPI_SIZE=2048 BOOT=new APP=1

...this will generate bin/upgrade/user1.1024.new.bin

make clean
make COMPILE=gcc SPI_SIZE=2048 BOOT=new APP=2

...this will generate bin/upgrade/user2.1024.new.bin

Then you should power your ESP8266 while holding button pressed to enter in bootloader mode.
Command for uploading firmware is:

esptool/esptool.py --baud 576000 write_flash 0x00000 bin/boot_v1.2.bin 0x01000 bin/upgrade/user1.1024.new.bin 0x81000 bin/upgrade/user2.1024.new.bin --flash_size 16m

@ly0 Let me know if this resolves your problem

ly0 commented

Problem solved. thanks :-)