These are chat archives for SmingHub/Sming

14th
Feb 2017
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 06:23

@Ivanhoee compiled simple log

...
# 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 0x30000 (196608) 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

use addres out/firmware/spiff_rom.bin---------->0x46000 and size 0x30000 (196608) bytes.

spiffs_mount_manual(0x46000, 196608); or spiffs_mount_manual(0x46000, 0x30000);
Ivanhoee
@Ivanhoee
Feb 14 2017 09:07
I'll try that .
slaff
@slaff
Feb 14 2017 12:32
@laurentppol Have you forgot to flashinit? Have you set the right SPI_SIZE?
laurentppol
@laurentppol
Feb 14 2017 13:19
@slaff no flashinit, so I have to put flashinit(); just before spiffs_mount()?
where do I set SPI_SIZE?
and this does NOT explain example crash, IMO
in makefile-user there is only SPI_MODE
which *.h file to include for flashinit()?
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 13:23
@laurentppol make flashinit; then make flash
laurentppol
@laurentppol
Feb 14 2017 13:26
in esptool command line there is -fs 4m, is it ok?
oops, same garbage :(
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 13:27
4Megabyte = 32m
laurentppol
@laurentppol
Feb 14 2017 13:27
I did
where do I set this?
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 13:28
@laurentppol SPI_SIZE =4M (in Megabytes) write in makefile-user
SPI_SIZE= 512K, 256K, 1M, 2M, 4M
laurentppol
@laurentppol
Feb 14 2017 13:29
ok, now I got 32m in esptool, will try new toolchain
laurentppol
@laurentppol
Feb 14 2017 13:52
do I need flashinit on every old/new toolchain switch, or I do need it once?
no matter what I do I get: "ERROR: ERROR in flash_read: r=1 at 404ab0fc"
same as my friend got on Win$
laurentppol
@laurentppol
Feb 14 2017 13:58
at least serial connection is ok
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 13:59
I think flashinit run once in new toolchain
try replase spiffs_mount() on spiffs_mount_manual()
laurentppol
@laurentppol
Feb 14 2017 14:02
how to get parameters for "manual"?
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 14:03

make simple log

...
# 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 0x30000 (196608) 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

use addres out/firmware/spiff_rom.bin---------->0x46000 and size 0x30000 (196608) bytes.

spiffs_mount_manual(0x46000, 196608); or spiffs_mount_manual(0x46000, 0x30000);
laurentppol
@laurentppol
Feb 14 2017 14:06
I got 0x4D000, so I put this in code
ooops, spiffs_rom.bin in out/firmware is 512kB...
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 14:09
@laurentppol 512kB is default value SPIFF_SIZE for 32m flash; you can set your values in makefile-user
laurentppol
@laurentppol
Feb 14 2017 14:11
on, now app wakes up, THANKS, but this:
1). shoul be clarified somewhere in "install instructions" (make flashinit),
2). fixed spiffs_mount, as "manual" is only workaround
address is DIFFERENT in OLD toolchain (0x4C000), how can I detect? (this address or at least Sming version) in C++ code?
laurentppol
@laurentppol
Feb 14 2017 14:17
size I can get using (SPI_SIZE * 8)? in code?
oops, not this
(SPIFFS_SIZE * 8)
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 14:18
@laurentppol SPIFFS_SIZE=size_in_kb*1024
laurentppol
@laurentppol
Feb 14 2017 14:21
ok, what about getting address / Sming version in C code?
Andriy Petrynchyn
@petrynchyn
Feb 14 2017 14:23
@laurentppol my skills not enough to correct spiffs_mount
laurentppol
@laurentppol
Feb 14 2017 14:24
:(
laurentppol
@laurentppol
Feb 14 2017 14:30
bizarre thing: I read keys on IO: 12, 3, 13. NO change in program, just mount / mount_manual, and in NEW toolchain looks like key on pin 3 is read all time as LOW...?
laurentppol
@laurentppol
Feb 14 2017 19:17
this is NOT pin-related, changed pin to 14, same thing :|
and after make I made make flashinit from NEW toolchain, I get a lot of "garbage debug": "chg_B1:-160". Where it comes from? How to disable this?
laurentppol
@laurentppol
Feb 14 2017 20:32
I changed pin from INPUT to INPUT_PULLUP (no effect on OLD toolchain), and looks WORKING!
laurentppol
@laurentppol
Feb 14 2017 21:08
more, looks working over Internet, GOOD WORK :)
laurentppol
@laurentppol
Feb 14 2017 21:15
and interesting: NO "garbage debug" after flashing program compiled with NEW toolchain :)