arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.19k stars 4.81k forks source link

Sonoff Touch compiles but is to large to flash. #485

Closed chuxxsss closed 6 years ago

chuxxsss commented 7 years ago

Hi, My problem is the Sonoff Touch cannot save flash program as it is to large.

Error: The program size (479877 bytes) is greater than maximum allowed (434160 bytes) Error Took 27.37 seconds

Enviroment sonoff [ERROR] Enviroment sonoff-touch-4ch [ERROR] Enviroment esp8285 [ERROR]

================[ERROR} Took 113.74 seconds ======================

I used Atom/Platformio to do this as well. https://www.youtube.com/watch?v=FoJu-UNPrJU

Anyway of shorting the program would be helpful. I use Node-Red as my MQTT server so don't need the other stuff. Thank you for any help in advance, and it look like a great program.

queuetue commented 7 years ago

@chuxxsss There are 6 places in user_config.h that you can make the code smaller - search for "Disable by"

arendst commented 7 years ago

No need to disable anything as you do not use the correct platform io environment.

Install patformio.ini and linker script from this repository and read the wiki how to setup your platformio enironment.

Bottomline is to never use esp8285 as board.

chuxxsss commented 7 years ago

Hi @arendst OK I understand Install Platformio.ini. Where do I find the linker script? So is the wiki here or somewhere else? So on the board the ESP8285, you are saying use the ESP8266 how do I set DOUT= Data out? Thank you for your help really appreciate it mate.

davidelang commented 7 years ago

the wiki is on github (go to the top of the page), I believe the linker script is in prerequisits (or something close to tehre)

chuxxsss commented 7 years ago

Thank you.

chuxxsss commented 7 years ago

Had lots of problems with MAC OS X. I have installed on Linux Mint now. Cannot find the location on the file Platformio.ini . Did find the program after installing Atom and installing clang "sudo apt-get install clang" . The main program is under the home directory ~/.platformio . Any help finding the file would be great. I did think it would be under root etc/ as a script file but no joy. Could the script file be in the main zip file please. Thank you for all the help Chris

chuxxsss commented 7 years ago

Ok, The file is in the zip file. Still fails upload with Error 255 plus Warning! Please install '99-platformio-udev-rules and check that your board's PID and VID are listed in the rules. https://raw.githubusercontent.com/platformio/platformio/develop/scripts/99-platformio-dev.rules Looking for upload port... Auto-detected: /dev/ttyUSB0 Uploading .pioenvs/sonoff-touch-4ch/firmware.bin error: espcomm_sync failed error: espcomm_open failed error: espcomm_upload-mem failed upload Error 255 Error Took 22.17 seconds Environment sonoff [ERROR] Environment sonoff-touch-4ch [ERROR]

ERROR took 47.66 seconds So could this be the data lines or something else.

Please any help would be gratefully appreciated.

chuxxsss commented 7 years ago

I think the problem is the esptool.py still working on it. arendst in the file platformio.ini does it need to call esptool.py to flash the 8285 mate?

Ghostbird commented 7 years ago

I just uploaded Sonoff-Tasmota to my Sonoff Touch without issues using the PlatformIO extension for Visual Studio Code on Debian 9 (Stretch). I had no issues at all. I'll update the wiki article a bit to clarify some things. I spend some time looking for a correct way to upload it, since the chip is a PSF-A85 (ESP-8285 based) instead of an ESP-8266, but the Upload script for PlatformIO automatically detects and compensates for that.

I'm quite happy with this, since I recently obtained two Sonoff Touch devices, and 5 ElectroDragon IoT double SPST relays, which were all useless since the software inside did not work correctly, and the devices could not be connected to over WiFi at all.

I managed to fix the ElectroDragons as well using Sonoff-Tasmota, but that was even easier, since they use the ESP-8266, and come with pre-soldered headers.

For my Sonoff Touch I opted to just clamp the header on temporarily. Even with a 90° header, there is no room to leave the header on, when the device is closed. So soldering was not a very useful option, as I would have to desolder it after programming.

davidelang commented 7 years ago

make sure you have the flash size set correctly (1m no spiffs), this will support images up to about 512k

If the image you are compiling is larger than this, you need to turn off some options to make it fit.

beyond this, we would need more info.

chuxxsss commented 7 years ago

I think I used spiffs me bad. Will try without and get back to you. Thank you for your time and efforts. Have a wonderful day.

On 14 Aug 2017 08:23, "David Lang" notifications@github.com wrote:

make sure you have the flash size set correctly (1m no spiffs), this will support images up to about 512k

If the image you are compiling is larger than this, you need to turn off some options to make it fit.

beyond this, we would need more info.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arendst/Sonoff-Tasmota/issues/485#issuecomment-322071323, or mute the thread https://github.com/notifications/unsubscribe-auth/AHXbK9n0pw6-8ZIcnGeulS05tFVwY5npks5sX3djgaJpZM4NqB0d .

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.