I've just downloaded the RTOS sdk and follohwed the steps here:
https://github.com/espressif/ESP8266_RTOS_SDK
I can compile apps in examples folder. But I need to use gpio functionality, so wanted to generate driver lib.
I followed method 1 from, Readme.md present in driver_lib. But it results in the errors.
Please help.
Code: Select all
esp8266@esp8266-VirtualBox:~/ESP8266_RTOS_SDK/driver_lib$ ./make_lib.sh
+ echo 'make_lib.sh version 20160307'
make_lib.sh version 20160307
+ echo ''
+ cd
+ make clean
make: *** No rule to make target `clean'. Stop.
+ make COMPILE=gcc
make: *** No targets specified and no makefile found. Stop.
+ cp .output/eagle/debug/lib/lib.a ../../lib/lib.a
cp: cannot stat ‘.output/eagle/debug/lib/lib.a’: No such file or directory
+ xtensa-lx106-elf-strip --strip-unneeded ../../lib/lib.a
xtensa-lx106-elf-strip: '../../lib/lib.a': No such file
+ cd ..
esp8266@esp8266-VirtualBox:~/ESP8266_RTOS_SDK/driver_lib$ ./make_lib.sh driver
+ echo 'make_lib.sh version 20160307'
make_lib.sh version 20160307
+ echo ''
+ cd driver
+ make clean
rm -f -r .output/eagle/debug
+ make COMPILE=gcc
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json uart.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json spi_interface.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json i2c_master.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json hw_timer.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json gpio.c
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json -o .output/eagle/debug/obj/gpio.o -c gpio.c
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json -o .output/eagle/debug/obj/hw_timer.o -c hw_timer.c
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -I include -I ../include -I /home/esp8266/ESP8266_RTOS_SDK/include -I /home/esp8266/ESP8266_RTOS_SDK/extra_include -I /home/esp8266/ESP8266_RTOS_SDK/driver_lib/include -I /home/esp8266/ESP8266_RTOS_SDK/include/espressif -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK/include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK/include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK/include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK/include/ssl -I /home/esp8266/ESP8266_RTOS_SDK/include/json -o .output/eagle/debug/obj/i2c_master.o -c i2c_master.c
In file included from i2c_master.c:13:0:
i2c_master.c: In function 'i2c_master_getDC':
../include/gpio.h:193:66: error: 'BIT0' undeclared (first use in this function)
#define GPIO_INPUT_GET(gpio_no) ((gpio_input_get()>>gpio_no)&BIT0)
^
i2c_master.c:60:15: note: in expansion of macro 'GPIO_INPUT_GET'
sda_out = GPIO_INPUT_GET(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO));
^
../include/gpio.h:193:66: note: each undeclared identifier is reported only once for each function it appears in
#define GPIO_INPUT_GET(gpio_no) ((gpio_input_get()>>gpio_no)&BIT0)
^
i2c_master.c:60:15: note: in expansion of macro 'GPIO_INPUT_GET'
sda_out = GPIO_INPUT_GET(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO));
^
In file included from ../include/i2c_master.h:4:0,
from i2c_master.c:15:
i2c_master.c: In function 'i2c_master_gpio_init':
/home/esp8266/ESP8266_RTOS_SDK/include/espressif/esp8266/pin_mux_register.h:149:47: error: 'BIT2' undeclared (first use in this function)
SET_PERI_REG_MASK(PIN_NAME, (((FUNC & BIT2) << 2) | (FUNC & 0x3)) << PERIPHS_IO_MUX_FUNC_S); \
^
i2c_master.c:111:5: note: in expansion of macro 'PIN_FUNC_SELECT'
PIN_FUNC_SELECT(I2C_MASTER_SDA_MUX, I2C_MASTER_SDA_FUNC);
^
In file included from i2c_master.c:13:0:
../include/gpio.h:85:34: error: 'GPIO_PIN0_ADDRESS' undeclared (first use in this function)
#define GPIO_PIN_ADDR(i) (GPIO_PIN0_ADDRESS + i*4)
^
i2c_master.c:114:20: note: in expansion of macro 'GPIO_PIN_ADDR'
GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO)), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO))) | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)); //open drain;
^
i2c_master.c:114:158: error: 'GPIO_PAD_DRIVER_ENABLE' undeclared (first use in this function)
GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO)), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO))) | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)); //open drain;
^
i2c_master.c:115:20: error: 'GPIO_ENABLE_ADDRESS' undeclared (first use in this function)
GPIO_REG_WRITE(GPIO_ENABLE_ADDRESS, GPIO_REG_READ(GPIO_ENABLE_ADDRESS) | (1 << I2C_MASTER_SDA_GPIO));
^
make: *** [.output/eagle/debug/obj/i2c_master.o] Error 1
+ cp .output/eagle/debug/lib/libdriver.a ../../lib/libdriver.a
cp: cannot stat ‘.output/eagle/debug/lib/libdriver.a’: No such file or directory
+ xtensa-lx106-elf-strip --strip-unneeded ../../lib/libdriver.a
+ cd ..
esp8266@esp8266-VirtualBox:~/ESP8266_RTOS_SDK/driver_lib$