Giter Site home page Giter Site logo

esp8266's Issues

give rBoot it's own repo

I've been using rBoot for a couple months now and I'm pretty much sold on it.

Now I'm just getting to the point I'm cleaning up my first project using it and with any
luck will be using it in an upcoming client project. With that it would be super handy
to have rBoot at a git submodule, but that requires it being in its own repo.

Hopefully this isn't an issue, thanks for you work on this, it's vastly improved my workflow.

Error on compile

Hi
I am receiving error upon compiling.
gcc -O2 -Wall -c esptool2.c -o esptool2.o
In file included from esptool2.c:26:
esptool2.h:33:20: stdint.h: No such file or directory
In file included from esptool2_elf.h:27,
from esptool2.c:27:
elf.h:25: error: parse error before "Elf32_Addr"
elf.h:25: warning: type defaults to int' in declaration ofElf32_Addr'
elf.h:25: warning: data definition has no type or storage class
elf.h:26: error: parse error before "Elf32_Off"
elf.h:26: warning: type defaults to int' in declaration ofElf32_Off'
elf.h:26: warning: data definition has no type or storage class
elf.h:27: error: parse error before "Elf32_Half"

This was building sometime back.

OTA leads to corrupt ROM

This is most likely due to lack of understanding surrounding the linker scripts. These are the steps I've performed, it all seems to make sense but in practice the update fails, while reporting success.

I'm using an ESP8266-03 from Electrodragon with 512k of flash. I'm using the rboot-sampleproject as my starting point.

Modify rom1.ld

$ head rom1.ld 
/* This linker script generated from xt-genldscripts.tpp for LSP . */
/* Linker Script for ld -N */
MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40242010, len = 0x3C000
}

Changed irom0_0_seg in rom1.ld from 0x40282010 to 0x40242010

Build

$ make
Building esptool2 firmware tool
make[1]: Entering directory `/home/morgan/devel/ESP8266/raburton-esp8266/esptool2'
CC esptool2.c
gcc -O2 -Wall -c esptool2.c -o esptool2.o
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
make[1]: Leaving directory `/home/morgan/devel/ESP8266/raburton-esp8266/esptool2'
Building rBoot boot loader
make[1]: Entering directory `/home/morgan/devel/ESP8266/raburton-esp8266/rboot'
mkdir -p build
mkdir -p firmware
CC rboot-stage2a.c
LD build/rboot-stage2a.elf
FW build/rboot-hex2a.h
CC rboot.c
LD build/rboot.elf
FW firmware/rboot.bin
make[1]: Leaving directory `/home/morgan/devel/ESP8266/raburton-esp8266/rboot'
Building rBoot sample project
make[1]: Entering directory `/home/morgan/devel/ESP8266/raburton-esp8266/rboot-sampleproject'
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
make[1]: Leaving directory `/home/morgan/devel/ESP8266/raburton-esp8266/rboot-sampleproject'

Nothing surprising there.

Flashing

$ esptool.py --port /dev/XBeeX write_flash -fs 4m 0x00000 rboot/firmware/rboot.bin 0x2000 rboot-sampleproject/firmware/rom0.bin 0x42000 rboot-sampleproject/firmware/rom1.bin

Connecting...
Erasing flash...
Wrote 3072 bytes at 0x00000000 in 0.3 seconds (82.9 kbit/s)...
Erasing flash...
Wrote 190464 bytes at 0x00002000 in 18.5 seconds (82.2 kbit/s)...
Erasing flash...
Wrote 190464 bytes at 0x00042000 in 18.5 seconds (82.3 kbit/s)...

Leaving...

Adjust -fs to 4m and second rom location to 0x42000, flashes without incident.

Connect, perform switch (twice), perform OTA

$ miniterm.py --rts=0 --dtr=0 /dev/XBeeX 115200
--- Miniterm on /dev/XBeeX: 115200,8,N,1 ---
--- Quit: Ctrl+]  |  Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
--- forcing DTR inactive
--- forcing RTS inactive
****CUT JUNK****                                                                                                                                                                �nn��n����|~�n��l`��r�BC�C��Boot Sample Project

Currently running rom 0.
type "help" and press <enter> for help...
switch
Swapping from rom 0 to rom 1.
Restarting...


 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1476, room 16 
tail 4
chksum 0xfb
load 0x3ffe8000, len 672, room 4 
tail 12
chksum 0xf5
csum 0xf5

rBoot v1.2.1 - [email protected]
Flash Size:   4 Mbit
Flash Mode:   QIO
Flash Speed:  40 MHz

Booting rom 1.
r�BC�C��Boot Sample Project

Currently running rom 1.
type "help" and press <enter> for help...
switch
Swapping from rom 1 to rom 0.
Restarting...


 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1476, room 16 
tail 4
chksum 0xfb
load 0x3ffe8000, len 672, room 4 
tail 12
chksum 0xf5
csum 0xf5

rBoot v1.2.1 - [email protected]
Flash Size:   4 Mbit
Flash Mode:   QIO
Flash Speed:  40 MHz

Booting rom 0.
r�BC�C��Boot Sample Project

Currently running rom 0.
type "help" and press <enter> for help...
ota
Updating...
Firmware updated, rebooting to rom 1...

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1476, room 16 
tail 4
chksum 0xfb
load 0x3ffe8000, len 672, room 4 
tail 12
chksum 0xf5
csum 0xf5

rBoot v1.2.1 - [email protected]
Flash Size:   4 Mbit
Flash Mode:   QIO
Flash Speed:  40 MHz

Rom 1 is bad.
Booting rom 0.
r�BC�C��Boot Sample Project

Currently running rom 0.
type "help" and press <enter> for help...

And that's where I end up, Rom 1 is bad.

Any insight as to what I've missed would be appreciated.

esptool2 doesn't return 0 on success

Esptool2 doesn't return anything on success, which make interprets as a failure (on linux at least). This terminates the build attempt, but by repeatedly running make you can get it to finally build.

rboot-ota/rboot-ota.c contains HTTP example code

In rboot-ota/rboot-ota.c contains HTTP receive parsing code that IMO belongs to the rboot-sampleproject. I think rboot-ota/rboot-ota should only contain code that is about writing (chunked), switching roms, etc.. The actual download should be left to the user and should be in rboot-sampleproject.

Furthermore the HTTP response parser is very assumptious about how the data arrives, it expects the entire header to arrive all at once. But of course there is no guarantee this will happen. For instance when using SimpleHTTPServer from python all the header lines arrive one by one resulting in failed upgrades. But then again if this code is not part of rboot-ota anymore then it is not that big a deal as it is an exercise left to the user.

DS1307 - Supply Voltage

Reading your comments on the DS1307 being flaky, I think it should be noted that it doesn't run from 3v3 - its a 5V part. DS1307 is not suited to for a ESP8266 (I now have 5 useless clocks! :)

The latter device can run in the range of 3v to 5v

Richard

Second reset fails

UPDATE : issue corrected, my own code was overwriting in the middle of the flash.
Issue closed, sorry for any inconvenience.

I created a .bin and loaded into flash, it contains the rboot image and the executable. The first time I push the reset button the code starts up correctly. When I push the reset button a second time, the bootloader tells it didn't find any correct rom image. I guess the first reset creates a config entry at 0x1000, which the second reset tries to use.

Project can be found here : https://github.com/vortex314/esp_gtw

I'm using a nodemcu module 32mbit.

Extracing bin and flashing :
../tools/esptool.py elf2image ../Debug/$PROJECT
./esptool2 -debug -bin -boot2 -4096 -dio -40 ../Debug/$PROJECT $PROJECT.bin .text .data .rodata
../tools/esptool.py --p /dev/ttyUSB0 -b 921600 write_flash -ff 40m -fm dio -fs 32m 0x02000 esp_gtw.bin 0x00000 rboot.bin

LD image address
MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
/* irom0_0_seg : org = 0x40240000, len = 0x3C000 */
irom0_0_seg : org = 0x40202010, len = 0x7C000
}

undefined reference to rBoot

How do I resolve this?
c:/tools/sming/Sming/SmingCore/Boards.h:17: undefined reference to `rBootHttpUpdate::rBootHttpUpdate()'

Bug in rboot-ota.c:upgrade_recvcb()

There appears to be a small bug in the upgrade_recvcb() function of rboot-ota.c. On some servers it appears that the first chunk just details information about the file that will be downloaded (e.g. does not contain any actually rom data). Subsequent chunks actually contain the data. So the check below:

if (upgrade->totallength == 0) {

is not a good check because when using a simple Python server to serve up the roms the totallength is still set to zero (0) after the first chunk of the download has been processed (e.g. length -= (ptrData - pusrdata) == 0). So the second chunk isn't processed correctly. My fix was to key off the "sumlength" field that will be zero prior to the first chunk and non-zero on subsequent chunks.

if (upgrade->sumlength == 0 ) {

Perhaps not the most elegant fix but it seems to work for me. I've been able to integrate the rboot OTA mechanism into my Sming-based project.

i have problem with WiFiClientSecure :(

hi
i am thanks for your help to peaple for publishin your good project
in this code i want give data from google Sheet and send data in telegram bot,
i use this project to give data from google sheet:
https://github.com/lorol/Googlesheet_DHT_simple
and use this project for recive and send data from telegram robat:
https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot
i use esp8266
i merge two above project but i cant compile because i give error , because two project use WiFiClientSecure.h library , and same client :(

i changed the client name , and code ha been compiled, but in serial monitor , program crashed
i changed "HTTPSRedirect* client= nullptr;" to "HTTPSRedirect* test= nullptr;" and change every client in the code to test,
i also change below code, in the next change

WiFiClientSecure client;
UniversalTelegramBot bot(BOTtoken, client);

to :

WiFiClientSecure test;
UniversalTelegramBot bot(BOTtoken, test);

and you can see my Serial monitor in both time:

Starting ...
Connecting to hooshmandsazan3
.

WiFi connected

Exception (29):
epc1=0x4000e1cc epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000204 depc=0x00000000

ctx: cont 
sp: 3fff0fd0 end: 3fff18e0 offset: 01a0

>>>stack>>>
3fff1170:  00410000 3fffb59c 3fffb75c 40224e3f  
3fff1180:  3fffb63c 3fffb87c 00000081 40225aa1  

i add Serial.println() in the code for debugging
this is my code:

#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
#include "HTTPSRedirect.h"




//======================From Telegram===============================
#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h>

#define BOTtoken "339475786:AAH7IjXu51xPom_sMx8IRnvQbcTD5FfO2Wc"  // your Bot Token (Get from Botfather)
WiFiClientSecure client;
UniversalTelegramBot bot(BOTtoken, client);

int Bot_mtbs = 1000; //mean time between scan messages
long Bot_lasttime;   //last time messages' scan has been done
bool Start = false;

const int ledPin = 2;
int ledStatus = 0;

void handleNewMessages(int numNewMessages) {
  //Serial.println(F("handleNewMessages"));
  //Serial.println(String(numNewMessages));

  for (int i=0; i<numNewMessages; i++) {
    String chat_id = String(bot.messages[i].chat_id);
    String text = bot.messages[i].text;

    String from_name = bot.messages[i].from_name;
    if (from_name == "") from_name = "Guest";

    if (text == "/ledon") {
      digitalWrite(ledPin, HIGH);   // turn the LED on (HIGH is the voltage level)
      ledStatus = 1;
      bot.sendMessage(chat_id, "Led is ON", "");
    }

    if (text == "/ledoff") {
      ledStatus = 0;
      digitalWrite(ledPin, LOW);    // turn the LED off (LOW is the voltage level)
      bot.sendMessage(chat_id, "Led is OFF", "");
    }

    if (text == "/status") {
      if(ledStatus){
        bot.sendMessage(chat_id, "Led is ON", "");
      } else {
        bot.sendMessage(chat_id, "Led is OFF", "");
      }
    }

    if (text == "/start") {
      String welcome = "Welcome to Universal Arduino Telegram Bot library, " + from_name + ".\n";
      welcome += "This is Flash Led Bot example.\n\n";
      welcome += "/ledon : to switch the Led ON\n";
      welcome += "/ledoff : to switch the Led OFF\n";
      welcome += "/status : Returns current status of LED\n";
      bot.sendMessage(chat_id, welcome, "Markdown");
    }
  }
}
//***************************************************************************




#define WRITE_INTERVAL_MINITES 1

#define MAX_CONNECT 200 //reuse 2 times same clent
#define MAX_ERROR 100 //restart everything

const char *ssid =  "sajjad";
const char *pass =  "1q2w3e4r5t6y";

const char* host = "script.google.com";
const int httpsPort = 443;

int seconds = (WRITE_INTERVAL_MINITES * 60) - 20; // schedule first sending to TS in 20 sec after start

char *GScriptId = "AKfycbxRzkMt87iyiyU9EDY6REoRDpl5C9oHdjVyCSF6A4QN7jkNMGHD";   // Put your  GScriptId   here

// Access to Google Spreadsheet
String url = String("/macros/s/") + GScriptId + "/exec?";


HTTPSRedirect* test = nullptr;


float hum;
float tem;

void setup() {
  Serial.begin(115200);
  Serial.println();
  delay(200);
  Serial.println(F("Starting ..."));

  delay(200);
 
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.mode(WIFI_STA);
  if (WiFi.status() != WL_CONNECTED) WiFi.begin(ssid, pass);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500); 
    Serial.println(F("."));
  }
  Serial.println("");
  Serial.println("WiFi connected");
  pinMode(ledPin, OUTPUT); // initialize digital ledPin as an output.
  delay(10);
  digitalWrite(ledPin, LOW); // initialize pin as off
}

void loop() {
  Serial.println("1");
  
  //==============================From telegram=========================================
  if (millis() > Bot_lasttime + Bot_mtbs)  {
    Serial.println("2");
    int numNewMessages = bot.getUpdates(bot.last_message_received + 1);
    
    while(numNewMessages) {
      Serial.println("3");
      Serial.println("got response");
      handleNewMessages(numNewMessages);
      numNewMessages = bot.getUpdates(bot.last_message_received + 1);
    }
    Serial.println("4");
    Bot_lasttime = millis();
  }
  //***********************************************************************
  Serial.println("5");
  static int error_count = 0;
  static int connect_count = 0;
  static bool flag = false;

  if (!flag){
    Serial.println("6");
    test = new HTTPSRedirect(httpsPort);
    flag = true;
    test->setPrintResponseBody(true); // or false and use String getResponseBody();
    Serial.println("6a");
    test->setContentTypeHeader("application/json");  
    Serial.println("6b");
    if (!test->connected()) test->connect(host, httpsPort);
    Serial.println("6c");
    ++connect_count;
    Serial.println("6d");
  }

   // 30 sec after writing 
  

    if (test != nullptr){
      Serial.println("7");
      if (!test->connected()){
        test->connect(host, httpsPort);
      }
    }
    else{
      Serial.println(F("Error2 creating client object!"));
      error_count = -10;
      Serial.println("7a");
    }
    Serial.println("7b");
    Serial.println(F("========================="));
    if (test->GET(url + String("readrow=last"), host)){
      Serial.println("8");
      DynamicJsonBuffer jsonBuffer;
      JsonObject& json = jsonBuffer.parseObject(test->getResponseBody());
      //json.printTo(Serial);
      String Timestamp = json["values"][0];
      int MaxT0        = json["values"][1];
      int minT0        = json["values"][2];
      String Con0      = json["values"][3];
      int Hu0          = json["values"][4];
      String WS0       = json["values"][5];
      String WD0       = json["values"][6];

      int MaxT1        = json["values"][7];
      int minT1        = json["values"][8];
      String Con1      = json["values"][9];
      int Hu1          = json["values"][10];
      String WS1       = json["values"][11];
      String WD1       = json["values"][12];

      int MaxT2        = json["values"][13];
      int minT2        = json["values"][14];
      String Con2      = json["values"][15];
      int Hu2          = json["values"][16];
      String WS2       = json["values"][17];
      String WD2       = json["values"][18];

      int MaxT3        = json["values"][19];
      int minT3        = json["values"][20];
      String Con3      = json["values"][21];
      int Hu3          = json["values"][22];
      String WS3       = json["values"][23];
      String WD3       = json["values"][24];
      
      float TEMP       = json["values"][25];
      float Hu         = json["values"][26];
      
      Serial.println(Timestamp);
      Serial.println(MaxT0);
      Serial.println(minT0);
      Serial.println(Con0);
      Serial.println(Hu0);
      Serial.println(WS0);
      Serial.println(WD0);

      Serial.println("");
      Serial.println(MaxT1);
      Serial.println(minT1);
      Serial.println(Con1);
      Serial.println(Hu1);
      Serial.println(WS1);
      Serial.println(WD1);

      Serial.println("");
      Serial.println(MaxT2);
      Serial.println(minT2);
      Serial.println(Con2);
      Serial.println(Hu2);
      Serial.println(WS2);
      Serial.println(WD2);

      Serial.println("");
      Serial.println(MaxT3);
      Serial.println(minT3);
      Serial.println(Con3);
      Serial.println(Hu3);
      Serial.println(WS3);
      Serial.println(WD3);

      Serial.println("");
      Serial.println(TEMP);
      Serial.println(Hu);      
      ++connect_count;
    } else {
      Serial.println("9");
      ++error_count;
      Serial.println(F("GET Last row val failed!"));
      seconds = 10; // stage again in 10 sec
    }


   if (error_count > MAX_ERROR){
    Serial.println("10");
     Serial.println(F("Errors > MAX_ERROR...")); 
     //delete client;
     //client = nullptr;
     //connect_count = -1;
     //error_count = 0;
     //flag = false;
     ESP.restart(); 
   }

   if (connect_count > MAX_CONNECT){
      Serial.println("11");
      Serial.println(F("Connects > MAX_CONNECT... rebuild"));
      connect_count = -1;
      flag = false;
      delete test;
     
      //return;  //where?
   }
   
   seconds++;
   delay(1000); //1 sec loop
}

when the code arive to "6b" program go to hang,
when arive to :
if (!test->connected()) test->connect(host, httpsPort);
this is my output:

Starting ...
Connecting to sajjad
.
.
.
.
.
.
.
.

WiFi connected
1
2
4
5
6
6a
6b

Exception (29):
epc1=0x4000dfd9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff1000 end: 3fff1850 offset: 01a0

>>>stack>>>
3fff11a0:  3fff073c 000011c9 000011c9 4022ab8c  
3fff11b0:  3fff1584 00000012 00000003 00000000  

Hardware

Hardware: NodeMcu Lua WIFI Board Based on ESP8266 CP2102 Module (ESP-12E)

Description

Problem description

Settings in IDE

Module: Adafruit HUZZAH esp8266
Flash Size: 4MB(3MB SPIFFS)
CPU Frequency: 80Mhz
Upload Using: SERIAL 115200

please help me please :(

Make file error

Hi,

Thanks for your great project. But I couldn't get it worked. I always get this error

FW build/rboot-hex2a.h
make[1]: /opt/esp-open-sdk/esp8266/esptool2/esptool2.exe: Command not found

I am not a linux guy, but I am using a ubuntu VM. I know the esptool2.exe is there but it is not compiling it.

Could you please help on this?

Thanks.

Commit bba5f02 breaks rboot-sampleproject using ESP-01

This appears to be related to the updated ld scripts and I can't figure out why but the ESP-01 no longer boots (zero output - not even rboot) starting at this commit. Works as expected if compiled using the previous commit. Maybe I have to update the other ld scripts in rboot-sampleproject?

OTA - Firmware update failed!

Hi Richard.

I edited the rboot-ota.h:

// ota server details
#define OTA_IP { 192, 168, 0, 42 }
#define OTA_PORT 8080
#define OTA_ROM0 "rom0.bin"
#define OTA_ROM1 "rom1.bin"

I opened the terminal:

ip
ip: 192.168.1.108, mask: 255.255.255.0, gw: 192.168.1.1
ota
Updating...
Firmware update failed!

The server (192.168.0.42) find the ESP8266 (192.168.1.108).

Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\palha>ping 192.168.1.108

Disparando 192.168.1.108 com 32 bytes de dados:
Resposta de 192.168.1.108: bytes=32 tempo=29ms TTL=255
Resposta de 192.168.1.108: bytes=32 tempo=48ms TTL=255
Resposta de 192.168.1.108: bytes=32 tempo=71ms TTL=255
Resposta de 192.168.1.108: bytes=32 tempo=93ms TTL=255

Estatísticas do Ping para 192.168.1.108:
    Pacotes: Enviados = 4, Recebidos = 4, Perdidos = 0 (0% de
             perda),
Aproximar um número redondo de vezes em milissegundos:
    Mínimo = 29ms, Máximo = 93ms, Média = 60ms

C:\Users\palha>

What is wrong? How I can debug?

new ld scripts for SDK 1.1.0 (rboot-sampleproject)

SDK 1.1.0 ld scripts has new sections in them (various ExceptionVector).

Running rboot-sampleproject that is compiled and linked using current rom*.ld and SDK 1.1.0 causes exception to be printed on serial monitor.

Booting rom 0.
Fatal exception (0):
epc1=0x40106f38, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

0x40106f38 is call_user_start on that rom0.elf

Using the new ld scripts from SDK 1.1.0 to compile and link them allow successfull running of the sampleproject.

on the latter rom0.elf call_user_start is on 0x40100004

OTA and slot 0

I'm probably doing something wrong, but I'm stuck.

I have my own code that updates the flash area of the firmware for OTA updates.

It uses the spi_flash... functions from the 1.4.1 SDK to erase and write the flash sectors.

Using an ESP-1 module I write the fw to 0x2000 (slot 0) and 0x42000 (slot 1) (linked with their own corresponding linking script) with esptool.py

That goes well. I can then switch between them and both copies of the fw work.

If I run from slot 0 I can then erase and write fw to slot 1 and switch with no problems.

If I run from slot 1 when I try to erase slot 0 I think the memory gets corrupted. It doesn't finish the erase and I get:

Erasing 56 sectors starting with 0x2

ets Jan 8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 1580, room 16
tail 12
chksum 0xbf
ho 0 tail 12 room 4
load 0x3ffe8000, len 724, room 12
tail 8
chksum 0x9f
csum 0x9f

rBoot v1.2.1 - [email protected] (modified)
Flash Size: 4 Mbit
Flash Mode: QIO
Flash Speed: 40 MHz

Booting rom 1.
Fatal exception (0):
epc1=0x4028298c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x4028298c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x4028298c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):

Unless I am miscalculating the flash sectors I don't see how this would happen.

This is on a ESP-1 so I'm assuming 512KB flash.

Any suggestions on what I should look at?

Thanks,

Alberto

rBoot in Sming

How do I implement rBoot in any of the examples in Sming framework? Can you tell me the steps involved?

OTA failure: Broken pipe

First, thanks for working on the bootloader! I've definitely thought about having >2 ROMs but I didn't feel comfortable embarking on such a project on my own.

Unfortunately, I've run into some troubles. Here's what I'm seeing:

  1. ESP connects to the wifi network
  2. ESP sends the GET request for the new firmware
  3. Webserver (Flask) receives the GET request
  4. Webserver responds with 200
  5. Webserver throws a "Broken pipe" exception

Here's the call stack:

Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

Is this the "python server" that sends headers in multiple chunks?

FOTA example

Hi Richard.

I am developping with Unofficial Development Kit for Espressif ESP8266 and I want to add FOTA feature in our project.

I am studing the rboot-sampleproject, but this error occurs:

mingw32-make.exe -f C:/Trabalho/raburton-esp8266-master/rboot-sampleproject/Makefile all 
CC main.c
In file included from main.c:16:0:
rboot-ota.h:12:23: fatal error: rboot-api.h: No such file or directory
compilation terminated.
mingw32-make.exe: *** [build/main.o] Error 1

rboot-sampleproject

Do you have a tip?

Best regards.

ota fail on local server

Hi I have started a wamp server and placed roms in the root directory. The ota sample proj is throwing following error.
rBoot Sample Project

Currently running rom 0.
type "help" and press for help...
connect
wifi connecting...
network retry, status: 1
ip: 192.168.0.135
ota
GET /rom1.bin HTTP/1.1
Host: 192.168.0.191
Connection: keep-alive
Cache-Control: no-cache
User-Agent: rBoot-Sample/1.0
Accept: /

Updating...
Connection error.
Firmware update failed!

Any ideas?

License?

From https://github.com/raburton/esp8266/blob/master/rboot/readme.txt :

  • Open source (written in C).

A project is not open source unless it comes with (explicit) Open Source license. Please add a LICENSE file which discloses licensing terms (as this repository contains multiple projects, each of them should rather have separate LICENSE file (consider a case of someone tarring up a subdirectory); also consider splitting up different projects to separate repos).

Thanks.

restart on rBoot-sampleproject does not always restart

I've been playing with rBoot-sampleproject and overall it works great. OTA update is smooth. Sometimes, however, restart is not successful. Here is an example output from the usb serial port with the original code, unaltered in function from the git repository:

    V1 available commands
  help - display this message
  ip - show current ip address
  connect - connect to wifi
  restart - restart the esp8266
  switch - switch to the other rom and reboot
  ota - perform ota update, switch rom and reboot
  info - show esp8266 info

ip
  network status: 255
connect
       wifi connecting...
network retry, status: 1
ip: 192.168.43.5
restart
       Restarting...



 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset

at this point the 8266 hangs indefinitely until I reset it again.

ESP12-e on nodeMCU dev 1.0 board. latest commit 978b3cf (13 days ago at the time of this post).

rboot-sampleproject won't compile on Windows with UDK>2.0.6

When compiling with UnofficialDevelopmentKit > 2.0.6 I get:

CC main.c
In file included from main.c:9:0:
main.c: In function 'network_wait_for_ip':
C:/Espressif/ESP8266_SDK/include/osapi.h:31:25: error: implicit declaration of function 'ets_timer_disarm' [-Werror=implicit-function-declaration]
 #define os_timer_disarm ets_timer_disarm
                         ^
main.c:27:2: note: in expansion of macro 'os_timer_disarm'
  os_timer_disarm(&network_timer);
  ^
C:/Espressif/ESP8266_SDK/include/osapi.h:34:21: error: implicit declaration of function 'ets_sprintf' [-Werror=implicit-function-declaration]
 #define os_sprintf  ets_sprintf
                     ^
main.c:31:3: note: in expansion of macro 'os_sprintf'
   os_sprintf(page_buffer,"ip: %d.%d.%d.%d\r\n",IP2STR(&ipconfig.ip));
   ^
C:/Espressif/ESP8266_SDK/include/osapi.h:32:24: error: implicit declaration of function 'ets_timer_setfn' [-Werror=implicit-function-declaration]
 #define os_timer_setfn ets_timer_setfn
                        ^
main.c:38:3: note: in expansion of macro 'os_timer_setfn'
   os_timer_setfn(&network_timer, (os_timer_func_t *)network_wait_for_ip, NULL);

probable Reason:
WIth UDK 2.0.7 the gcc is moved from 4.8.2 to 5.1.0

rboot Rom 1 is bad

Try to run Basic_rBoot. All compiles and flashed and even downloaded with the ota command.
However when try to switch get the following:

swapping from rom 0 to rom 1.
Restarting...

state: 5 -> 0 (0)
rm 0
del if0
usl

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 1588, room 16 
tail 4
chksum 0xb6
load 0x3ffe8000, len 700, room 4 
tail 8
chksum 0xfe
csum 0xfe

rBoot v1.2.1 - [email protected]
Flash Size:   32 Mbit
Flash Mode:   QIO
Flash Speed:  40 MHz
rBoot Option: Big flash

Rom 1 is bad.
Booting rom 0.
don't use rtc mem data
sdS

etc.
Still running on slot 0

Sming 2.1.0 sdk 1.5.2(7eee54f4) nodemcu (esp-12) USB powered.
Downloaded file with a browser matches the original rom0.bin
Help appreciated

Help edit the Makefile

Hi Richard.

Please, I need a help to build the ROM.

I am trying to add the target "otaall".

#############################################################
#
# Root Level Makefile
#
# (c) by CHERTS <[email protected]>
#
#############################################################

BUILD_BASE  = build
FW_BASE     = firmware

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

# base directory of the ESP8266 SDK package, absolute
SDK_BASE    ?= c:/Espressif/ESP8266_SDK

# esptool path and port
SDK_TOOLS   ?= c:/Espressif/utils
ESPTOOL     ?= $(SDK_TOOLS)/esptool.exe
ESPPORT     ?= COM1
ESPBAUD     ?= 115200

# BOOT = none
# BOOT = old - boot_v1.1
# BOOT = new - boot_v1.3+
BOOT?=none
# APP = 0 - eagle.flash.bin + eagle.irom0text.bin
# APP = 1 - user1.bin
# APP = 2 - user2.bin
APP?=0
# SPI_SPEED = 20MHz, 26.7MHz, 40MHz, 80MHz
SPI_SPEED?=40
# SPI_MODE: QIO, QOUT, DIO, DOUT
SPI_MODE?=QIO
# SPI_SIZE: 256KB, 512KB, 1024KB, 2048KB, 4096KB
SPI_SIZE?=512
#SPI_SIZE?=1024

ifeq ($(BOOT), new)
    boot = new
else
    ifeq ($(BOOT), old)
        boot = old
    else
        boot = none
    endif
endif

ifeq ($(APP), 1)
    app = 1
else
    ifeq ($(APP), 2)
        app = 2
    else
        app = 0
    endif
endif

ifeq ($(SPI_SPEED), 26.7)
    freqdiv = 1
    flashimageoptions = -ff 26m
else
    ifeq ($(SPI_SPEED), 20)
        freqdiv = 2
        flashimageoptions = -ff 20m
    else
        ifeq ($(SPI_SPEED), 80)
            freqdiv = 15
            flashimageoptions = -ff 80m
        else
            freqdiv = 0
            flashimageoptions = -ff 40m
        endif
    endif
endif

ifeq ($(SPI_MODE), QOUT)
    mode = 1
    flashimageoptions += -fm qout
else
    ifeq ($(SPI_MODE), DIO)
        mode = 2
        flashimageoptions += -fm dio
    else
        ifeq ($(SPI_MODE), DOUT)
            mode = 3
            flashimageoptions += -fm dout
        else
            mode = 0
            flashimageoptions += -fm qio
        endif
    endif
endif

# flash larger than 1024KB only use 1024KB to storage user1.bin and user2.bin
ifeq ($(SPI_SIZE), 256)
    size = 1
    flash = 256
    flashimageoptions += -fs 2m
else
    ifeq ($(SPI_SIZE), 1024)
        size = 2
        flash = 1024
        flashimageoptions += -fs 8m
    else
        ifeq ($(SPI_SIZE), 2048)
            size = 3
            flash = 1024
            flashimageoptions += -fs 16m
        else
            ifeq ($(SPI_SIZE), 4096)
                size = 4
                flash = 1024
                flashimageoptions += -fs 32m
            else
                size = 0
                flash = 512
                flashimageoptions += -fs 4m
            endif
        endif
    endif
endif

ifeq ($(flash), 512)
  ifeq ($(app), 1)
    addr = 0x01000
  else
    ifeq ($(app), 2)
      addr = 0x41000
    endif
  endif
else
  ifeq ($(flash), 1024)
    ifeq ($(app), 1)
      addr = 0x01000
    else
      ifeq ($(app), 2)
        addr = 0x81000
      endif
    endif
  endif
endif

# name for the target project
TARGET      = app

# which modules (subdirectories) of the project to include in compiling
MODULES     = driver user
EXTRA_INCDIR    = include $(SDK_BASE)/../include

# libraries used in this project, mainly provided by the SDK
LIBS        = c gcc hal phy pp net80211 lwip wpa main

# compiler flags using during compilation of source files
CFLAGS      = -Os -g -O2 -std=gnu90 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -mno-serialize-volatile -D__ets__ -DICACHE_FLASH

# linker flags used to generate the main object file
LDFLAGS     = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static

# linker script used for the above linkier step
LD_SCRIPT   = eagle.app.v6.ld

ifneq ($(boot), none)
ifneq ($(app),0)
    LD_SCRIPT = eagle.app.v6.$(boot).$(flash).app$(app).ld
    BIN_NAME = user$(app).$(flash).$(boot)
endif
else
    app = 0
endif

# various paths from the SDK used in this project
SDK_LIBDIR  = lib
SDK_LDDIR   = ld
SDK_INCDIR  = include include/json

# select which tools to use as compiler, librarian and linker
CC      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
AR      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
LD      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
OBJCOPY := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
OBJDUMP := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objdump

# no user configurable options below here
SRC_DIR     := $(MODULES)
BUILD_DIR   := $(addprefix $(BUILD_BASE)/,$(MODULES))

SDK_LIBDIR  := $(addprefix $(SDK_BASE)/,$(SDK_LIBDIR))
SDK_INCDIR  := $(addprefix -I$(SDK_BASE)/,$(SDK_INCDIR))

SRC     := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.c))
OBJ     := $(patsubst %.c,$(BUILD_BASE)/%.o,$(SRC))
LIBS        := $(addprefix -l,$(LIBS))
APP_AR      := $(addprefix $(BUILD_BASE)/,$(TARGET)_app.a)
TARGET_OUT  := $(addprefix $(BUILD_BASE)/,$(TARGET).out)

LD_SCRIPT   := $(addprefix -T$(SDK_BASE)/$(SDK_LDDIR)/,$(LD_SCRIPT))

INCDIR  := $(addprefix -I,$(SRC_DIR))
EXTRA_INCDIR    := $(addprefix -I,$(EXTRA_INCDIR))
MODULE_INCDIR   := $(addsuffix /include,$(INCDIR))

VERBOSE := 1
V ?= $(VERBOSE)
ifeq ("$(V)","1")
Q :=
vecho := @echo
else
Q := @
vecho := @echo
endif

vpath %.c $(SRC_DIR)

define compile-objects
$1/%.o: %.c
    $(vecho) "CC $$<"
    $(Q) $(CC) $(INCDIR) $(MODULE_INCDIR) $(EXTRA_INCDIR) $(SDK_INCDIR) $(CFLAGS)  -c $$< -o $$@
endef

.PHONY: all checkdirs clean flash flashinit flashonefile rebuild

all: checkdirs $(TARGET_OUT)

$(TARGET_OUT): $(APP_AR)
    $(vecho) "LD $@"
    $(Q) $(LD) -L$(SDK_LIBDIR) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group $(LIBS) $(APP_AR) -Wl,--end-group -o $@
    $(vecho) "------------------------------------------------------------------------------"
    $(vecho) "Section info:"
    $(Q) $(OBJDUMP) -h -j .data -j .rodata -j .bss -j .text -j .irom0.text $@
    $(vecho) "------------------------------------------------------------------------------"
    $(vecho) "Section info:"
    $(Q) $(SDK_TOOLS)/memanalyzer.exe $(OBJDUMP).exe $@
    $(vecho) "------------------------------------------------------------------------------"
    $(vecho) "Run objcopy, please wait..."
    $(Q) $(OBJCOPY) --only-section .text -O binary $@ eagle.app.v6.text.bin
    $(Q) $(OBJCOPY) --only-section .data -O binary $@ eagle.app.v6.data.bin
    $(Q) $(OBJCOPY) --only-section .rodata -O binary $@ eagle.app.v6.rodata.bin
    $(Q) $(OBJCOPY) --only-section .irom0.text -O binary $@ eagle.app.v6.irom0text.bin
    $(vecho) "objcopy done"
    $(vecho) "Run gen_appbin.exe"
ifeq ($(app), 0)
    $(Q) $(SDK_TOOLS)/gen_appbin.exe $@ 0 $(mode) $(freqdiv) $(size)
    $(Q) mv eagle.app.flash.bin $(FW_BASE)/eagle.flash.bin
    $(Q) mv eagle.app.v6.irom0text.bin $(FW_BASE)/eagle.irom0text.bin
    $(Q) rm eagle.app.v6.*
    $(vecho) "No boot needed."
    $(vecho) "Generate eagle.flash.bin and eagle.irom0text.bin successully in folder $(FW_BASE)."
    $(vecho) "eagle.flash.bin-------->0x00000"
    $(vecho) "eagle.irom0text.bin---->0x40000"
else
    ifeq ($(boot), new)
        $(Q) $(SDK_TOOLS)/gen_appbin.exe $@ 2 $(mode) $(freqdiv) $(size)
        $(vecho) "Support boot_v1.3 and +"
    else
        $(Q) $(SDK_TOOLS)/gen_appbin.exe $@ 1 $(mode) $(freqdiv) $(size)
        $(vecho) "Support boot_v1.1 and +"
    endif
    $(Q) mv eagle.app.flash.bin $(FW_BASE)/upgrade/$(BIN_NAME).bin
    $(Q) rm eagle.app.v6.*
    $(vecho) "Generate $(BIN_NAME).bin successully in folder $(FW_BASE)/upgrade."
    $(vecho) "boot_v1.x.bin------->0x00000"
    $(vecho) "$(BIN_NAME).bin--->$(addr)"
endif
    $(vecho) "Done"

$(APP_AR): $(OBJ)
    $(vecho) "AR $@"
    $(Q) $(AR) cru $@ $^

checkdirs: $(BUILD_DIR) $(FW_BASE)

$(BUILD_DIR):
    $(Q) mkdir -p $@

$(FW_BASE):
    $(Q) mkdir -p $@
    $(Q) mkdir -p $@/upgrade

flashonefile: all
    $(OBJCOPY) --only-section .text -O binary $(TARGET_OUT) eagle.app.v6.text.bin
    $(OBJCOPY) --only-section .data -O binary $(TARGET_OUT) eagle.app.v6.data.bin
    $(OBJCOPY) --only-section .rodata -O binary $(TARGET_OUT) eagle.app.v6.rodata.bin
    $(OBJCOPY) --only-section .irom0.text -O binary $(TARGET_OUT) eagle.app.v6.irom0text.bin
    $(SDK_TOOLS)/gen_appbin_old.exe $(TARGET_OUT) v6
    $(SDK_TOOLS)/gen_flashbin.exe eagle.app.v6.flash.bin eagle.app.v6.irom0text.bin 0x40000
    rm -f eagle.app.v6.data.bin
    rm -f eagle.app.v6.flash.bin
    rm -f eagle.app.v6.irom0text.bin
    rm -f eagle.app.v6.rodata.bin
    rm -f eagle.app.v6.text.bin
    rm -f eagle.app.sym
    mv eagle.app.flash.bin $(FW_BASE)/
    $(vecho) "No boot needed."
    $(vecho) "Generate eagle.app.flash.bin successully in folder $(FW_BASE)."
    $(vecho) "eagle.app.flash.bin-------->0x00000"
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(FW_BASE)/eagle.app.flash.bin

flashboot: all flashinit
ifeq ($(boot), new)
    $(vecho) "Flash boot_v1.3 and +"
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(SDK_BASE)/bin/boot_v1.3\(b3\).bin
endif
ifeq ($(boot), old)
    $(vecho) "Flash boot_v1.1 and +"
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(SDK_BASE)/bin/boot_v1.1.bin
endif
ifeq ($(boot), none)
    $(vecho) "No boot needed."
endif

flash: all
ifeq ($(app), 0) 
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(FW_BASE)/eagle.flash.bin 0x40000 $(FW_BASE)/eagle.irom0text.bin
else
ifeq ($(boot), none)
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x00000 $(FW_BASE)/eagle.flash.bin 0x40000 $(FW_BASE)/eagle.irom0text.bin
else
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) $(addr) $(FW_BASE)/upgrade/$(BIN_NAME).bin
endif
endif


flashinit:
    $(vecho) "Flash init data:"
    $(vecho) "Clear old settings (EEP area):"
    $(vecho) "clear_eep.bin-------->0x79000"
    $(vecho) "Default config (Clear SDK settings):"
    $(vecho) "blank.bin-------->0x7E000"
    $(vecho) "esp_init_data_default.bin-------->0x7C000"
    $(ESPTOOL) -p $(ESPPORT) -b $(ESPBAUD) write_flash $(flashimageoptions) 0x79000 $(SDK_BASE)/bin/clear_eep.bin 0x7c000 $(SDK_BASE)/bin/esp_init_data_default.bin 0x7e000 $(SDK_BASE)/bin/blank.bin

rebuild: clean all

clean:
    $(Q) rm -f $(APP_AR)
    $(Q) rm -f $(TARGET_OUT)
    $(Q) rm -rf $(BUILD_DIR)
    $(Q) rm -rf $(BUILD_BASE)
    $(Q) rm -rf $(FW_BASE)

$(foreach bdir,$(BUILD_DIR),$(eval $(call compile-objects,$(bdir))))


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

ESPTOOL2     ?= $(SDK_TOOLS)/esptool2
FW_SECTS      = .text .data .rodata
FW_USER_ARGS  = -quiet -bin -boot2

otaall: $(OTA_BUILD_DIR) $(FW_BASE) $(FW_BASE)/rom0.bin $(FW_BASE)/rom1.bin

$(OTA_BUILD_DIR)/%.o: %.c %.h
    @echo "CC $<"
    @$(CC) -I. $(SDK_INCDIR) $(CFLAGS) -o $@ -c $<

$(OTA_BUILD_DIR)/%.elf: $(O_FILES)
    @echo "LD $(notdir $@)"
    @$(LD) -L$(SDK_LIBDIR) -T$(notdir $(basename $@)).ld $(LDFLAGS) -Wl,--start-group $(LIBS) $^ -Wl,--end-group -o $@

$(FW_BASE)/%.bin: $(OTA_BUILD_DIR)/%.elf
    @echo "FW $(notdir $@)"
    @$(ESPTOOL2) $(FW_USER_ARGS) $^ $@ $(FW_SECTS)

$(OTA_BUILD_DIR):
    @mkdir -p $@

But the result is:

16:49:55 **** Build of configuration Default for project TMS_ESP8266_OTA ****
mingw32-make.exe -f C:/Trabalho/TMS_ESP8266/branches/r48_ota/Makefile otaall 
mkdir -p firmware
mkdir -p firmware/upgrade
LD rom0.elf
C:\Espressif\ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty':
(.irom0.text+0x3b0): undefined reference to `user_init'
C:\Espressif\ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_rf_pre_init':
(.irom0.text+0x5f4): undefined reference to `user_init'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [/rom0.elf] Error 1

Thank you.
Best regards.

including ntp fails to link

trying to build using ntp and I'm receiving errors. I've seen errors like this before but only when trying to use malloc/zalloc vs os_zalloc as you are (I thought) correctly using.

/home/morgan/devel/ESP8266/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: build/rom0.elf section `.text' will not fit in region `iram1_0_seg'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o):(.literal+0x10): undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o): In function `_malloc_r':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2152: undefined reference to `_sbrk_r'
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2189: undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(freer.o): In function `_malloc_trim_r':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:3309: undefined reference to `_sbrk_r'
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:3351: undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(freer.o):C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:3327: more undefined references to `_sbrk_r' follow
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o):(.literal+0x0): undefined reference to `_read_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o):(.literal+0x4): undefined reference to `_write_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o):(.literal+0x8): undefined reference to `_lseek_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o):(.literal+0xc): undefined reference to `_close_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o): In function `__sread':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/stdio.c:47: undefined reference to `_read_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o): In function `__swrite':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/stdio.c:84: undefined reference to `_write_r'
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/stdio.c:76: undefined reference to `_lseek_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o): In function `__sseek':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/stdio.c:103: undefined reference to `_lseek_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(stdio.o): In function `__sclose':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/stdio.c:120: undefined reference to `_close_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(makebuf.o):(.literal+0x8): undefined reference to `_fstat_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(makebuf.o): In function `__smakebuf':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdio/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdio/makebuf.c:52: undefined reference to `_fstat_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(sysfstat.o): In function `fstat':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\syscalls/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\syscalls/sysfstat.c:12: undefined reference to `_fstat_r'
collect2: error: ld returned 1 exit status
make: *** [build/rom0.elf] Error 1

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.