Giter Site home page Giter Site logo

FOTA example about esp8266 HOT 7 CLOSED

raburton avatar raburton commented on August 16, 2024
FOTA example

from esp8266.

Comments (7)

fvpalha avatar fvpalha commented on August 16, 2024

Hi Richard.

I do this:

3) Symlink or copy rboot.h, rboot-api.h and rboot-api.c in to this directory.
4) Edit the Makefile to set the paths to the SDK and esptool2.
5) Set WIFI_SSID & WIFI_PWD as env vars or in the makefile.

and the result was:

mingw32-make.exe -f C:/Trabalho/raburton-esp8266-master/rboot-sampleproject/Makefile all 
CC main.c
main.c: In function 'wifi_config_station':
main.c:49:2: error: stray '\' in program
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
  ^
main.c:49:2: error: stray '\' in program
<command-line>:0:13: error: 'dd' undeclared (first use in this function)
main.c:49:31: note: in expansion of macro 'WIFI_SSID'
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
                               ^
<command-line>:0:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:31: note: in expansion of macro 'WIFI_SSID'
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
                               ^
main.c:49:2: error: stray '\' in program
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
  ^
main.c:49:2: error: stray '\' in program
<command-line>:0:16: error: 'wrt' undeclared (first use in this function)
main.c:49:31: note: in expansion of macro 'WIFI_SSID'
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
                               ^
main.c:49:2: error: stray '\' in program
  os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
  ^
main.c:49:2: error: stray '\' in program
main.c:49:2: error: stray '\' in program
main.c:49:2: error: stray '\' in program
main.c:50:2: error: stray '\' in program
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
  ^
main.c:50:2: error: stray '\' in program
<command-line>:0:19: error: stray '@' in program
main.c:50:35: note: in expansion of macro 'WIFI_PWD'
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
                                   ^
main.c:50:2: error: stray '\' in program
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
  ^
main.c:50:2: error: stray '\' in program
<command-line>:0:12: error: 'ESP8266' undeclared (first use in this function)
main.c:50:35: note: in expansion of macro 'WIFI_PWD'
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
                                   ^
main.c:50:2: error: stray '\' in program
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
  ^
main.c:50:2: error: stray '\' in program
<command-line>:0:19: error: stray '@' in program
main.c:50:55: note: in expansion of macro 'WIFI_PWD'
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
                                                       ^
main.c:50:2: error: stray '\' in program
  os_strcpy(&stationConf.password, WIFI_PWD, os_strlen(WIFI_PWD));
  ^
main.c:50:2: error: stray '\' in program
mingw32-make.exe: *** [build/main.o] Error 1

from esp8266.

raburton avatar raburton commented on August 16, 2024

Did you copy the files in to the sample directory, as per the instructions in the readme? Also rememeber to set SDK_BASE. If you do it compiles fine here with UDK:

D:\Projects\esp8266\rboot-sampleproject>ls
Makefile              rboot-api.c           rom0.ld
blank4.bin            rboot-api.h           rom1.ld
eagle.rom.addr.v6.ld  rboot-ota.c           uart.c
license.txt           rboot-ota.h           uart.h
main.c                rboot.h               uart_register.h
main.h                readme.txt            user_config.h

D:\Projects\esp8266\rboot-sampleproject>SET SDK_BASE=c:\Espressif\ESP8266_SDK_120

D:\Projects\esp8266\rboot-sampleproject>make
CC main.c
CC rboot-api.c
CC uart.c
CC rboot-ota.c
LD rom0.elf
FW rom0.bin
LD rom1.elf
FW rom1.bin

D:\Projects\esp8266\rboot-sampleproject>

from esp8266.

raburton avatar raburton commented on August 16, 2024

mingw32-make.exe -f C:/Trabalho/raburton-esp8266-master/rboot-sampleproject/Makefile all
CC main.c
main.c: In function 'wifi_config_station':
main.c:49:2: error: stray '' in program
os_strcpy(&stationConf.ssid, WIFI_SSID, os_strlen(WIFI_SSID));
^

Best guess here you have some odd characters in WIFI_SSID & WIFI_PWD.

from esp8266.

fvpalha avatar fvpalha commented on August 16, 2024

Hi Richard.

I edited the Makefile:

#
# Makefile for rBoot sample project
# https://github.com/raburton/esp8266
#

# use wifi settings from environment or hard code them here
WIFI_SSID ?= "dd-wrt"
WIFI_PWD  ?= "ESP8266@"

# Base directory for the compiler
XTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin

#SDK_BASE   ?= /opt/esp-open-sdk/sdk
SDK_BASE    ?= c:/Espressif/ESP8266_SDK
SDK_LIBDIR  = lib
SDK_INCDIR  = include

ESPTOOL2     ?= ../esptool2/esptool2
FW_SECTS      = .text .data .rodata
FW_USER_ARGS  = -quiet -bin -boot2

and SET the environment variable SDK_BASE

SDK_BASE    ?= c:/Espressif/ESP8266_SDK

But this not solve the problem.

from esp8266.

raburton avatar raburton commented on August 16, 2024

Which problem? You appear to have already got past the original problem you reported.

That whole page of errors you posted next appears to be complaining about the variables WIFI_SSID & WIFI_PWD. I assume you have some none standard characters in them, which probably need to be escaped to become valid C strings. e.g. if your password has a \ in it it'll need to be replaced with , etc.

from esp8266.

fvpalha avatar fvpalha commented on August 16, 2024

Hi Richard.

I changed the Makefile, I removed the "" in:

WIFI_SSID ?= dd-wrt
WIFI_PWD  ?= ESP8266@

and now this occurs:

mingw32-make.exe -f C:/Trabalho/raburton-esp8266-master/rboot-sampleproject/Makefile all 
CC main.c
CC rboot-api.c
CC rboot-ota.c
CC uart.c
LD rom0.elf
FW rom0.bin
process_begin: CreateProcess(NULL, ../esptool2/esptool2 -quiet -bin -boot2 build/rom0.elf firmware/rom0.bin .text .data .rodata, ...) failed.
make (e=2): O sistema não pode encontrar o arquivo especificado.

mingw32-make.exe: *** [firmware/rom0.bin] Error 2

from esp8266.

fvpalha avatar fvpalha commented on August 16, 2024

Thank you Richard.

I opened the prompt, and:

Setting environment for using Unofficial Development Kit for Espressif ESP8266 t
ools.

C:\Espressif\examples>cd C:\Trabalho\raburton-esp8266-master\esptool2

C:\Trabalho\raburton-esp8266-master\esptool2>make
CC esptool2.c
gcc -O2 -Wall -c esptool2.c -o esptool2.o
esptool2.c: In function 'CreateHeaderFile':
esptool2.c:214: warning: format '%08x' expects type 'unsigned int', but argument
 3 has type 'Elf32_Addr'
esptool2.c:235: warning: format '%08x' expects type 'unsigned int', but argument
 4 has type 'Elf32_Addr'
esptool2.c:235: warning: format '%d' expects type 'int', but argument 6 has type
 'Elf32_Word'
CC esptool2_elf.c
gcc -O2 -Wall -c esptool2_elf.c -o esptool2_elf.o
LD esptool2
gcc -o esptool2 esptool2.o esptool2_elf.o

C:\Trabalho\raburton-esp8266-master\esptool2>cd C:\Trabalho\raburton-esp8266-mas
ter\rboot-sampleproject

C:\Trabalho\raburton-esp8266-master\rboot-sampleproject>make
CC main.c
CC rboot-api.c
CC rboot-ota.c
CC uart.c
LD rom0.elf
FW rom0.bin
LD rom1.elf
FW rom1.bin

C:\Trabalho\raburton-esp8266-master\rboot-sampleproject>

Soon I will send new doubts.

Best regards.

from esp8266.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.