These are chat archives for SmingHub/Sming

8th
Feb 2017
Andriy Petrynchyn
@petrynchyn
Feb 08 2017 07:25

I do not work correctly spiffs_mount () results

in flash_read: r=1 at 402620fc

ERROR: ERROR in flash_read: r=1 at 402640fc

ERROR: ERROR in flash_read: r=1 at 402660fc

ERROR: ERROR in flash_read: r=1 at 402680fc
...
ERROR: ERROR in flash_read: r=1 at 408800fc

ERROR: ERROR i

***** Software Watchdog Reset

================================================================
3ffff7b0:  4f525245 45203a52 524f5252 206e6920  
3ffff7c0:  73616c66 65725f68 203a6461 20313d72  
3ffff7d0:  34207461 32383830 0a636630 3f000a0d  
...
================================================================

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

good work spiffs_mount_manual(0x46000, 65536);
not compiled spiffs_mount_manual(0x46000, SPIFF_SIZE); SPIFF_SIZE = 65536 declared in Makefile-user.mk

C:\tools\Sming\samples\HttpServer_WebSockets>make ENABLE_CUSTOM_LWIP=1 
C+ app/CUserData.cpp
C+ app/application.cpp
app/application.cpp: In function 'void init()':
app/application.cpp:117:31: error: 'SPIFF_SIZE' was not declared in this scope
  spiffs_mount_manual(0x46000, SPIFF_SIZE);
                               ^
make: *** [out/build/app/application.o] Error 1
slaff
@slaff
Feb 08 2017 08:22

@petrynchyn First make sure that you have the latest version. This means:

cd  $SMING_HOME
git checkout develop
git pull

Get the original state of the HttpServer_WebSockets sample(stash your changes).

git stash

Then type:

cd $SMING_HOME/../samples/HttpServer_WebSockets
make clean
make flash V=1

and paste here the output that you get.

Andriy Petrynchyn
@petrynchyn
Feb 08 2017 08:35
@slaff I tried after
rm -rf  c:\tools\Sming
git clone https://github.com/SmingHub/Sming.git
cd c:/tools/Sming/Sming
make ENABLE_CUSTOM_LWIP=1 V=1
c:\tools\Sming>cd  $SMING_HOME
The system cannot find the path specified.

c:\tools\Sming>git checkout develop
M       Sming/third-party/esp-open-lwip
Your branch is up-to-date with 'origin/develop'.
Already on 'develop'

c:\tools\Sming>git pull
Already up-to-date.
slaff
@slaff
Feb 08 2017 08:46
ok, go to the HttpServer_WebSockets directory and from there type:
make clean
make flash V=1
and paste the output
Andriy Petrynchyn
@petrynchyn
Feb 08 2017 08:46
c:\tools\Sming\samples\HttpServer_WebSockets>make clean

c:\tools\Sming\samples\HttpServer_WebSockets>make flash SPI_SIZE=4M
C+ app/CUserData.cpp
C+ app/application.cpp
AR out/build/app_app.a
LD out/build/app.out

#Memory / Section info:
------------------------------------------------------------------------------
   Section|                   Description| Start (hex)|   End (hex)|Used space
------------------------------------------------------------------------------
      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8384|     900
    rodata|           ReadOnly Data (RAM)|    3FFE8390|    3FFEA360|    8144
       bss|      Uninitialized Data (RAM)|    3FFEA360|    3FFF1098|   27960
      text|            Cached Code (IRAM)|    40100000|    40106A22|   27170
irom0_text|           Uncached Code (SPI)|    4020A000|    40245A56|  244310
Total Used RAM : 37004
Free RAM : 44916
Free IRam : 5616
------------------------------------------------------------------------------
# Generating image...
Generate firmware images successully in folder out/firmware.
Done
# Generating spiffs_bin
Checking for spiffs files
files directory exists. Creating out/firmware/spiff_rom.bin
Creating rom 'out/firmware/spiff_rom.bin' of size 0x80000 (524288) bytes.
Adding files in directory 'files'.
Added 'index.html' to spiffs (1637 bytes).
Added 'index2.html' to spiffs (1638 bytes).
out/firmware/spiff_rom.bin---------->0x46000
Killing Terminal to free COM3
/C/Espressif/utils/esptool.exe -p COM3 -b 115200 write_flash -ff 40m -fm qio -fs 32m 0x00000 out/firmware/0x00000.bin 0x0a000 out/firmware/0x0a000.bin  0x46000 out/firmware/spiff_rom.bin
esptool.py v1.2-dev
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 36864 @ 0x0... 36864 (100 %)
Wrote 36864 bytes at 0x0 in 3.2 seconds (91.8 kbit/s)...
Writing 245760 @ 0xa000... 245760 (100 %)
Wrote 245760 bytes at 0xa000 in 21.2 seconds (92.6 kbit/s)...
Wrote 524288 bytes at 0x46000 in 45.3 seconds (92.6 kbit/s)...
Leaving...
c:\tools\Sming\samples\HttpServer_WebSockets>make clean

c:\tools\Sming\samples\HttpServer_WebSockets>make flash V=1 SPI_SIZE=4M
mkdir -p out/build/app
mkdir -p out/firmware
/C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -Iapp -Iapp/include -Iinclude -I/C/tools/sming/Sming/include -I/C/tools/sming/Sming/ -I/C/tools/sming/Sming/third-party/esp-open-lwip -I/C/tools/sming/Sming/system/include -I/C/tools/sming/Sming/Wiring -I/C/tools/sming/Sming/Libraries -I/C/tools/sming/Sming/SmingCore -I/C/tools/sming/Sming/Services/SpifFS -I/C/Espressif/ESP8266_SDK/../include -I/C/tools/sming/Sming/third-party/rboot -I/C/tools/sming/Sming/third-party/rboot/appcode -I/C/tools/sming/Sming/third-party/spiffs/src -I/C/Espressif/ESP8266_SDK/include -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=115200  -Os -g -fno-rtti -fno-exceptions -std=c++11 -felide-constructors -c app/CUserData.cpp -o out/build/app/CUserData.o
/C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -Iapp -Iapp/include -Iinclude -I/C/tools/sming/Sming/include -I/C/tools/sming/Sming/ -I/C/tools/sming/Sming/third-party/esp-open-lwip -I/C/tools/sming/Sming/system/include -I/C/tools/sming/Sming/Wiring -I/C/tools/sming/Sming/Libraries -I/C/tools/sming/Sming/SmingCore -I/C/tools/sming/Sming/Services/SpifFS -I/C/Espressif/ESP8266_SDK/../include -I/C/tools/sming/Sming/third-party/rboot -I/C/tools/sming/Sming/third-party/rboot/appcode -I/C/tools/sming/Sming/third-party/spiffs/src -I/C/Espressif/ESP8266_SDK/include -Wpointer-arith -Wundef -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -finline-functions -fdata-sections -ffunction-sections -D__ets__ -DICACHE_FLASH -DARDUINO=106 -DCOM_SPEED_SERIAL=115200  -Os -g -fno-rtti -fno-exceptions -std=c++11 -felide-constructors -c app/application.cpp -o out/build/app/application.o
/C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar cru out/build/app_app.a out/build/app/CUserData.o out/build/app/application.o
/C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -L/C/tools/sming/Sming/compiler/lib/ -L/C/Espressif/ESP8266_SDK/lib -T/C/tools/sming/Sming/compiler/ld/eagle.app.v6.cpp.ld -nostdlib -u call_user_start -Wl,-static -Wl,--gc-sections -Wl,-Map=out/firmware/firmware.map -Wl,-wrap,system_restart_local  -Wl,--start-group -lmicroc -lmicrogcc -lhal -lphy -lpp -lnet80211 -llwip_open -lwpa -lmain -lsming -lcrypto -lpwm -lsmartconfig out/build/app_app.a -Wl,--end-group -o out/build/app.out
if [ -f "out/fwMeminfo" ]; then \
          mv out/fwMeminfo out/firmware/fwMeminfo.old; \
        fi
/C/Espressif/utils/ESP8266/memanalyzer.exe /C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-objdump.exe out/build/app.out > out/firmware/fwMeminfo.new
if [ -f "out/firmware/fwMeminfo.new" -a -f "out/firmware/fwMeminfo.old" ]; then \
          awk -F "|" 'FILENAME == "out/firmware/fwMeminfo.old" { arr[$1]=$5 } FILENAME == "out/firmware/fwMeminfo.new" { if (arr[$1] != $5){printf "%s%s%+d%s", substr($0, 1, length($0) - 1)," (",$5 - arr[$1],")\n" } else {print $0} }' out/firmware/fwMeminfo.old out/firmware/fwMeminfo.new; \
        elif [ -f "out/firmware/fwMeminfo.new" ]; then \
          cat out/firmware/fwMeminfo.new; \
        fi
   Section|                   Description| Start (hex)|   End (hex)|Used space
------------------------------------------------------------------------------
      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8384|     900
    rodata|           ReadOnly Data (RAM)|    3FFE8390|    3FFEA360|    8144
       bss|      Uninitialized Data (RAM)|    3FFEA360|    3FFF1098|   27960
      text|            Cached Code (IRAM)|    40100000|    40106A22|   27170
irom0_text|           Uncached Code (SPI)|    4020A000|    40245A56|  244310
Total Used RAM : 37004
Free RAM : 44916
Free IRam : 5616
# Generating spiffs_bin
if [ -d "files" ]; then \
                echo "files directory exists. Creating out/firmware/spiff_rom.bin"; \
                /C/tools/s
Andriy Petrynchyn
@petrynchyn
Feb 08 2017 08:51
# Generating spiffs_bin
if [ -d "files" ]; then \
                echo "files directory exists. Creating out/firmware/spiff_rom.bin"; \
                /C/tools/sming/Sming/spiffy/spiffy 524288   files out/firmware/spiff_rom.bin; \
        else \
                echo "No files found in ./files."; \
                echo "Creating empty out/firmware/spiff_rom.bin"; \
                /C/tools/sming/Sming/spiffy/spiffy 524288   dummy.dir out/firmware/spiff_rom.bin; \
        fi
files directory exists. Creating out/firmware/spiff_rom.bin
Creating rom 'out/firmware/spiff_rom.bin' of size 0x80000 (524288) bytes.
Adding files in directory 'files'.
Added 'index.html' to spiffs (1637 bytes).
Added 'index2.html' to spiffs (1638 bytes).
/C/Espressif/utils/esptool.exe -p COM3 -b 115200 write_flash -ff 40m -fm qio -fs 32m 0x00000 out/firmware/0x00000.bin 0x0a000 out/firmware/0x0a000.bin  0x46000 out/firmware/spiff_rom.bin
esptool.py v1.2-dev
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 36864 @ 0x0... 36864 (100 %)
Wrote 36864 bytes at 0x0 in 3.2 seconds (91.8 kbit/s)...
Writing 245760 @ 0xa000... 245760 (100 %)
Wrote 245760 bytes at 0xa000 in 21.2 seconds (92.6 kbit/s)...
Wrote 524288 bytes at 0x46000 in 45.3 seconds (92.6 kbit/s)...
Leaving...
Andriy Petrynchyn
@petrynchyn
Feb 08 2017 09:24

@slaff When i compile first time

rm -rf  c:\tools\Sming
git clone https://github.com/SmingHub/Sming.git
cd c:/tools/Sming/Sming
make ENABLE_CUSTOM_LWIP=1 V=1

i have error windows cc1.exe "The program can't start because libgmp-10.dll is missing from your computer. Try reinstalling the program to fix this problem." when comand run gcc -O2 -Wall -Wno-unused-value -I../Services/SpifFS -I../third-party/spiffs/src -c spiffy.c -o spiffy.o
i run again make ENABLE_CUSTOM_LWIP=1 V=1 compiling good
log https://drive.google.com/open?id=0B1UGHRKqJ9AcQW54cXd2eDc5aWs
I created a virtual machine with Windows 10 x86 and instal UDK on this manual https://github.com/SmingHub/Sming/wiki/Windows---Manual-Installation

Andriy Petrynchyn
@petrynchyn
Feb 08 2017 10:13
@slaff new log SMING make ENABLE_CUSTOM_LWIP=1 V=1 https://drive.google.com/open?id=0B1UGHRKqJ9AcdmNzV0RkYnNkNjA
WIndows 10x86, UDK 2.2.1, ESP8266_NONOS_SDK_V2.0.0_16_07_19
slaff
@slaff
Feb 08 2017 10:14
@petrynchyn Please, try to fix your toolchain first and then open a ticket with the issue that you have.
Andriy Petrynchyn
@petrynchyn
Feb 08 2017 10:22
@slaff I do not know how to fix it. I did everything for instructions https://github.com/SmingHub/Sming/wiki/Windows---Manual-Installation in only just installed system (Windows 10 x84) in vmware machine
@slaff i try Install Chocolatey https://github.com/SmingHub/Sming/wiki/Windows-Quickstart in new vmware machine and only replase SDK to ESP8266_NONOS_SDK_V2.0.0_16_07_19
slaff
@slaff
Feb 08 2017 10:51
SDK 2.0 is ok
The latest code from develop should work with it
laurentppol
@laurentppol
Feb 08 2017 23:24
need help with C++: code compiles under C (AVR), shows error in C++:
[laurent@laptop2 Temperature_DS1820]$ make C+ app/virtual_lcd.cpp C+ app/do_1s_stuff.cpp app/do_1s_stuff.cpp: In function 'void do_1s_stuff()': app/do_1s_stuff.cpp:74:103: error: iteration 4u invokes undefined behavior [-Werror=aggressive-loop-optimizations] for (i = 0; i < 10; i++) { temp_2_filtered_10sec_100s_32 += (uint32_t)temp_2_filter_10sec_100s[i]; ^ app/do_1s_stuff.cpp:74:7: note: containing loop for (i = 0; i < 10; i++) { temp_2_filtered_10sec_100s_32 += (uint32_t)temp_2_filter_10sec_100s[i]; ^ cc1plus: all warnings being treated as errors make: *** [out/build/app/do_1s_stuff.o] Błąd 1
what is wrong?
laurentppol
@laurentppol
Feb 08 2017 23:48
it's a bit crazy, I've replaced loop with 10 "+=" program compiles ok...