xoseperez / sonoffsc

Itead Studio SonoffSC custom firmware with MQTT and Domoticz support
GNU General Public License v3.0
104 stars 35 forks source link

Can't flash ATMega328P #19

Open revdaz opened 6 years ago

revdaz commented 6 years ago

Hello,

I really like your work, but I can’t flash the ATMega328P with Arduino and do not know what I’m doing wrong. I flashed a lot of sonoff devices and also the ESP part of the Sonoff SC, but don’t know how to flash the ATMega328P. I have compiled everything without errors, but when I want to upload the code I get everytime this message: avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x8e avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfc avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x70 Beim Hochladen des Sketches ist ein Fehler aufgetreten

Have I press a button to get in flash mode? I have choosen Board: Arduino Nano and processor: ATMega328P. The green LEd is blinking on the Sonoff. In the serial monitor I see AT+STATUS? I have also disconnected the jumpers. I really tried everything and getting crazy….

Thank you very much for help

xoseperez commented 6 years ago

I use “Arduino Uno” as board type. Also, you can try flashing it via the serial header using an USB2UART programmer. Check this post about the Sonoff SC.

kollaesch commented 6 years ago

Hi I have the same error here.

@xoseperez What is the correct commandline-command to do this? Platformio and arduino-IDE should list it. Please post here for reference. To get it please run platformio run --target upload -v in the directory atmega328. Thanks!!

This saves us setting up both systems (with more potential traps) I'd like to rule out that I killed the ATMega328P.

(used your platformio-file to build & upload, pulled both jumper, connected all 5 cables and even switched RX and TX for testing) I use the FTDI USB to TTL. Which voltage do I have to set it to for the atmega? (3.3 or 5V) (3.3V for esp8266 is clear)

jrbenito commented 6 years ago

Hi Guys,

I received my sonoffsc and flashed ESP in few minutes but struggled 2 days with ATMEGA. Nothing worked! I tested ATMega and saw it was not dead by connecting serial terminal and seeing AT+STATUS? from original firmware being sent over (be aware of the baud rate). I first bet reset pin was not working but multi-meter show everything ok.

Finally I downloaded the original source code to try put some light and read something like "first flash bootloader" in the readme file. Immediately thought "Are they flashing with ISP without arduino bootloader?"; grabbed my ArduinoDUE that was with ArduinoISP firmware, wired everyting (3v3, so do not put sonoffsc on the USB or DUE will fry), burned bootloader and voilá, not it flashes ok but fail reading (fuse issue). Worked!

Maybe you have a sample like mine? Mine is a V2 PCB with DHT11 soldered (I removed it and put headers so I can change sensor every time it fails - DHTxx fails a lot).

BR, Benito

ghiglie commented 6 years ago

@jrbenito Thanks, I saw your post on comments thread. I'll use my Uno as ISP... I've planned to do it later next week, but now... I want to try! 👍 UPDATE: I had to flash the bootloader too: I used my Uno with "Arduino as ISP" on the soldered header; I used the Arduino Uno bootloader. Now I can flash both chips... So, we can expect in SC v2 with soldered DHT11 a bootloader flash.

kollaesch commented 6 years ago

I don't have any Uno. What could I use as an alternative for ISP? (esp8266 / esp32) ?

If I access the 'atmega' bypicocom -b 19200 /dev/tty.usbserial-A50285BI I get the following response.

AT+STATUS?t is error
it is error
...

Ideas? Couldn't find anything in the internet. I don't have any DHT** connected. So I'm wondering if this is because of the missing DHT or because something on the atmega is faulty. (hardware or firmware)

Wieg commented 6 years ago

Can somebody get me on the way ? i am flashing my SC for the second time de Atmega328p but when i try now i get this error. Who has the solution ?

38588 106 1020 39714 9b22 .pioenvs/sonoffsc/firmware.elf Error: The program size (38694 bytes) is greater than maximum allowed (32256 by tes) *** [.pioenvs/sonoffsc/firmware.elf] Explicit exit, status 1 ========================== [ERROR] Took 14.03 seconds =========================

jrbenito commented 6 years ago

Hi,

Your firmware is too big

Em 4 de nov de 2017 23:15, "Wieg" notifications@github.com escreveu:

Can somebody get me on the way ? i am flashing my SC for the second time de Atmega328p but when i try now i get this error. Who has the solution ? 38588 106 1020 39714 9b22 .pioenvs/sonoffsc/firmware.elf Error: The program size (38694 bytes) is greater than maximum allowed (32256 by tes) *** [.pioenvs/sonoffsc/firmware.elf] Explicit exit, status 1 ========================== [ERROR] Took 14.03 seconds

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-341941853, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH6IrVJ3foovsrWcqLoL8YfkC3H6QOgks5szQwVgaJpZM4PpDho .

Wieg commented 6 years ago

its the standard download 1.1.1.1 from here .... what to do ? platformio project ... i dont get it ... it worked ....

jrbenito commented 6 years ago

Didn't you add nothing? The firmware size you reported is 38k while atmega328 only has 32k (31k if you use arduino bootloader).

Em 4 de nov de 2017 23:21, "Wieg" notifications@github.com escreveu:

its the standard download 1.1.1.1 from here .... what to do ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-341942100, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH6IpNBKNadvh53HFQfOmmsdwKkgyiRks5szQ2tgaJpZM4PpDho .

Wieg commented 6 years ago

Yes i know ..... 32k ... strange thing is ... i didn't change anything

I tried, download, unzip open atom/platformio connect the atmega328 and flash - Size to big (flashed the 8266 also with the firmware, no problems at all)

Followed tinkerman and xoseperez .... and get this result ..... Hardware wise i added the DHT22, LED ring, detection sensor .... i am sooooo close in making it all work

i looked at the libaries ... they are all needed, so i am a bit stuck in the final fase of making it work.

i need some tips from guys who did this project .................

jrbenito commented 6 years ago

I am far from my computer today to test anything. If you can't solve it later I will try to reproduce.

In my case I discovered I could not flash atmega328 because it was shipped without arduino bootloader. After using isp instead of usb/ttl everything was OK.

Em 5 de nov de 2017 09:39, "Wieg" notifications@github.com escreveu:

Yes i know ..... 32k ... strange thing is ... i didn't change anything

I tried, download, unzip open atom/platformio connect the atmega328 and flash - Size to big (flashed the 8266 also with the firmware, no problems at all)

Followed tinkerman and xoseperez .... and get this result ..... Hardware wise i added the DHT22, LED ring, detection sensor .... i am sooooo close in making it all work

i looked at the libaries ... they are all needed, so i am a bit stuck in the final fase of making it work.

i need some tips from guys who did this project .................

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-341966672, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH6IgASsk7vXed5uieB_wrIAYzqpWwJks5szZ5ggaJpZM4PpDho .

VooDooN1 commented 6 years ago

I have Sonoff SC Rev.2.0. I tried to flash ATMega328P for about two months. Tried many options. First I used FTDI USB to TTL with a lot of different drivers. Then I bought another FTDI USB to TTL and again tried different options. Then I bought USBASP and again tried a lot of drivers. Using Platformio and Arduino IDE. Nothing helped. But I was able to reflash ATMega328P only after I updated the firmware on the USBASP, using the following instruction (in Russian): http://xdomus.ru/usbasp-upgrade. After that, everything worked. Hooray!!!

maur8ino commented 6 years ago

I have exactly the same problem as @Wieg: SonofSC V2.0 w/ DTH11 soldered and no other sensor mounted, freshly downloaded v1.1.1 and getting the error:

Error: The program size (38940 bytes) is greater than maximum allowed (32256 bytes)

I'll try to downgrade

Wieg commented 6 years ago

Let me know how it goes @maur8ino .... pulled my hairs out, left it for a moment .... now doing some homeassistant scripts too "clear" my mind

maur8ino commented 6 years ago

I was able to compile it and flash it only by commenting out all the references to the Adafruit NeoPixel and WS2812FX which brings down the size to 10176b.

Since I have no led connected, I don't really need them, but other might need them.

@Wieg if you want I can fork the project and just commit the change I've in local 😄

Wieg commented 6 years ago

yes please @maur8ino ..... ill start flashing ..... and thinking about my led solution .... i still need some of those function voor my led ring .....

maur8ino commented 6 years ago

@Wieg here's the temporary fix https://github.com/maur8ino/sonoffsc!

@xoseperez is this normal? Thanks! 😄

Wieg commented 6 years ago

great ... have a beer on me !

GregSutcliffe commented 6 years ago

@maur8ino @Wieg your timing is awesome, I just went to reflash 1.1.1 to my SC after months of doing nothing with it - hit the "too big" issue, and your patch saves me. Thanks!

Wieg commented 6 years ago

hahaha i am still thinking ... i built in the presence sensor, dht22 and the LED .... stiil don't get how tinkerman and XO did the firmware for that.

jrbenito commented 6 years ago

Maybe some library upgraded recently?

I just cloned project did a "pio run"; since the computer I am using never compiled this project it downloaded all libraries and did compile resulting same 38694 bytes binary. As soon as I get back home tonight I will recompile the firmware there since it worked about a month ago. Than I will try upgrade source code (I don´t believe it changed since I cloned) and after, upgrade libraries. Let´s see.

maur8ino commented 6 years ago

@jrbenito mmm I just did a fresh clone and I'm still getting the error

Device: atmega328p

Program:   38694 bytes (118.1% Full)
(.text + .data + .bootloader)

Data:       1126 bytes (55.0% Full)
(.data + .bss + .noinit)

the size is 118.1% 😢

jrbenito commented 6 years ago

@maur8ino ,

It is what I just said, I cloned fresh new code and downloaded libraries (platformio does it for you) and got oversized firmware. However, I do believe that code at my home computer compiles so the only thing I can think about is some library update that made code size exploded.

Checking here with fresh cloned code, I checked out later version of @xoseperez code and give me exact same code size as you got. So, the issue is not in sonoffsc code but in some library. I opened platformio.ini and checked library dependency and:

-Adafruit_NeoPixel last update 15 days ago - maybe guilty

-WS2812FX it was not released but had updated 5 days ago, however, if you download fresh new library it will dowload latest commit from git, hence, even not released as new version for platformio, the library code will be download from latest code - maybe guilty (my bet goes to this one)

-Ticker last update 6 months ago, so not guilty

So, I clone WS2812FX but checkouted it to a later version (SHA 069139b9340e14cd46d8fafe14972b6c056273ec) and compiled with code size 29948 bytes. Checked out at sha b31c3fbcffa510afe46897cb2261bbcd6c892249 and code size compiled 38694 bytes. Every sha between those above gave me compilation error.

Hence, the guilty is WS2812FX library, if you want to correct it by hand (workaound) do:

cd .piolibdeps/WS2812FX_ID1647
rm *  
mv .libray.json ../
git clone https://github.com/kitesurfer1404/WS2812FX.git .
git checkout  069139b9340e14cd46d8fafe14972b6c056273ec
mv ../.library.json .

Now your code will, hopefully, compile with manageable size.

BRs, JrBenito.

jrbenito commented 6 years ago

Filed an issue to the library owner: https://github.com/kitesurfer1404/WS2812FX/issues/50

Wieg commented 6 years ago

@jrbenito awsome ........ ill be checking in to this in a few hours ........ can't wait :) great community here .... thank you very much

maur8ino commented 6 years ago

@jrbenito thanks for the explanation! 😄

maur8ino commented 6 years ago

@jrbenito even better you can pin a library to a specific git hash in your platformio.ini file like this 😄

lib_deps =
    DHT sensor library
    Adafruit NeoPixel
-    WS2812FX
+    https://github.com/kitesurfer1404/WS2812FX#069139b
    Ticker
    https://github.com/xoseperez/seriallink#0.1.0

I updated my fork pinning the WS2812FX library to the latest working hash.

jrbenito commented 6 years ago

Perfect!!!

Wieg commented 6 years ago

it worked great .... now to play with it in homeassistant ;)

lorenzo-deluca commented 6 years ago

Hi, I've the same problem :/

pablobolomey commented 5 years ago

@maur8ino I'm trying to use your releases with pio and im getting the foloowing issues when project is open; \Documents\sonoffsc-1.1.1\esp8266.piolibdeps_tmp_installing-tyamj9-package'... warning: Could not find remote branch 1.1.4 to clone. fatal: Remote branch 1.1.4 not found in upstream origin Error: Traceback (most recent call last):

I this project still alive?

Thanks

Pablo

maur8ino commented 5 years ago

@pablobolomey I just tried to do a pio run on a fresh checkout and I traced the error to justwifi which is an external (the only result when searching for 1.1.4 in the project btw): xoseperez have removed all the tags and pushed just the master branch.

You could get away with removing the #1.1.4 from esp8266/platform.ini like:

-  https://bitbucket.org/xoseperez/justwifi.git#1.1.4
+  https://bitbucket.org/xoseperez/justwifi.git

but I dunno if it's gonna work. I don't have the hardware anymore so I can't try 😢.

Let me know if it worked!

pablobolomey commented 5 years ago

Thanks, I finally work that out and solved that issue but now it’s shows other complied warnings and errors.

Regards, Pablo Bolomey

Sent from iPhone

On 13 Aug 2018, at 18:43, Mauro Verrocchio notifications@github.com wrote:

@pablobolomey I just tried to do a pio run on a fresh checkout and I traced the error to justwifi which is an external (the only result when searching for 1.1.4 in the project btw): xoseperez have removed all the tags and pushed just the master branch.

You could get away with removing the #1.1.4 from esp8266/platform.ini like:

Let me know if it worked!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xoseperez/sonoffsc","title":"xoseperez/sonoffsc","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xoseperez/sonoffsc"}},"updates":{"snippets":[{"icon":"PERSON","message":"@maur8ino in #19: @pablobolomey I just tried to do a pio run on a fresh checkout and I traced the error to justwifi which is an external (the only result when searching for 1.1.4 in the project btw): xoseperez have removed all the tags and pushed just the master branch.\r\n\r\nYou could get away with removing the #1.1.4 from esp8266/platform.ini like:\r\ndiff\r\n- https://bitbucket.org/xoseperez/justwifi.git#1.1.4\r\n+ https://bitbucket.org/xoseperez/justwifi.git\r\n\r\n \r\nbut I dunno if it's gonna work.\r\nI don't have the hardware anymore so I can't try 😢.\r\n\r\nLet me know if it worked!"}],"action":{"name":"View Issue","url":"https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412448691"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412448691", "url": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412448691", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [xoseperez/sonoffsc] Can't flash ATMega328P (#19)", "sections": [ { "text": "", "activityTitle": "Mauro Verrocchio", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@maur8ino", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"xoseperez/sonoffsc\",\n\"issueId\": 19,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"xoseperez/sonoffsc\",\n\"issueId\": 19\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412448691" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 262420584\n}" } ], "themeColor": "26292E" } ]

maur8ino commented 5 years ago

@pablobolomey it the compilation failing? If it's just warning the compilation will most likely to go through.

pablobolomey commented 5 years ago

Yes it’s failing due to some syntax and veritable errors missing or not define words.

I have downloaded the zip file of the code

Pablo

Sent from iPhone

On 13 Aug 2018, at 20:09, Mauro Verrocchio notifications@github.com wrote:

@pablobolomey it the compilation failing?If it's just warning the compilation will most likely to go through.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xoseperez/sonoffsc","title":"xoseperez/sonoffsc","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xoseperez/sonoffsc"}},"updates":{"snippets":[{"icon":"PERSON","message":"@maur8ino in #19: @pablobolomey it the compilation failing?If it's just warning the compilation will most likely to go through."}],"action":{"name":"View Issue","url":"https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412470455"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412470455", "url": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412470455", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [xoseperez/sonoffsc] Can't flash ATMega328P (#19)", "sections": [ { "text": "", "activityTitle": "Mauro Verrocchio", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@maur8ino", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"xoseperez/sonoffsc\",\n\"issueId\": 19,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"xoseperez/sonoffsc\",\n\"issueId\": 19\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/xoseperez/sonoffsc/issues/19#issuecomment-412470455" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 262420584\n}" } ], "themeColor": "26292E" } ]

xoseperez commented 5 years ago

This issue is fixed in the dev branch. If you want to use master you should change the library dependencies, but not in the way @maur8ino suggested (he's updating to a newer version of the justwifi library that is not supported in the master code). Instead use this:

https://github.com/xoseperez/justwifi.git#1.1.4
maur8ino commented 5 years ago

@xoseperez thanks for the clarification, I didn't realize that you're moving all your repos from BitBucket to Github hehe

pablobolomey commented 5 years ago

thanks @xoseperez @maur8ino, I have moved to the dev files. corrected some errors but still getting these:

Once again thanks for all the support

Pablo

Compiling .pioenvs\sonoffsc\lib665\ESPAsyncTCP\ESPAsyncTCP.cpp.o

C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/lights.ino: In function 'void sendNotification(bool, long unsigned int)': C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/lights.ino:175:33: error: 'class Ticker' has no member named 'once' if (time > 0) _lights_defer.once(time, sendNotification, !state); ^ C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/mqtt.ino: In function 'void mqttSend(const char, const char, bool)': C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/mqtt.ino:154:28: error: 'class Ticker' has no member named 'once_ms' _mqtt_flush_ticker.once_ms(MQTT_USE_JSON_DELAY, _mqttFlush); ^ C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/ntp.ino: In lambda function: C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/ntp.ino:84:24: error: 'class Ticker' has no member named 'once_ms' _ntp_delay.once_ms(100, _ntpUpdate); ^ C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/utils.ino:266:18: error: 'class Ticker' has no member named 'once_ms' _defer_reset.once_ms(delay, reset, reason); ^ C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/ws.ino: In function 'void _wsParse(AsyncWebSocketClient, uint8_t, size_t)': C:/Users/pablo.bolomey/Desktop/sonoffsc-dev/esp8266/sonoffsc/ws.ino:97:58: error: 'class Ticker' has no member named 'once_ms' if (strcmp(action, "reconnect") == 0) _web_defer.once_ms(100, wifiDisconnect); ^ Compiling .pioenvs\sonoffsc\lib665\ESPAsyncTCP\ESPAsyncTCPbuffer.cpp.o Compiling .pioenvs\sonoffsc\lib665\ESPAsyncTCP\SyncClient.cpp.o Compiling .pioenvs\sonoffsc\lib665\ESPAsyncTCP\tcp_axtls.c.o Compiling .pioenvs\sonoffsc\libab9\Time\DateStrings.cpp.o Compiling .pioenvs\sonoffsc\libab9\Time\Time.cpp.o

Archiving .pioenvs\sonoffsc\lib0bc\libESP8266WiFi.a Compiling .pioenvs\sonoffsc\lib22d\Hash\Hash.cpp.o Compiling .pioenvs\sonoffsc\lib22d\Hash\sha1\sha1.c.o *** [.pioenvs\sonoffsc\src\sonoffsc.ino.cpp.o] Error 1 [ERROR] Took 5.71 seconds

[SUMMARY] Environment ota [SKIP] Environment sonoffsc [ERROR] [ERROR] Took 5.71 seconds

DrCherry commented 5 years ago

Same, removed support for the LED ring and the size was correct.

CreaturePH commented 4 years ago

Guys, no one has compiled binary files for firmware (preferably for ATMega too)? Honestly, I'm already a little tired of fighting this device. I bought it about two years ago, and since then it has been lying around disassembled so far due to the fact that I just can not flash it. Every time I try, then I stumble upon any difficulties with compiling and throw it again. Once again, I took it, taking into account all the above-mentioned features, I adjusted the list of dependencies, but again nothing good comes out:

In file included from .piolibdeps\NtpClientLib_ID727\src/NtpClientLib.h:50:0,
from sonoffsc\config/prototypes.h:2,
from sonoffsc\config/all.h:4,
from C:/Users/Creature/AppData/Local/Programs/Microsoft VS Code/sonoffsc-master/esp8266/sonoffsc/sonoffsc.ino:23:
C:\Users\Creature\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/dns.h:104:54: error: 'ip_addr_t' has not been declared
typedef void (*dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg);
^
C:\Users\Creature\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/dns.h:108:43: error: 'ip_addr_t' has not been declared
void           dns_setserver(u8_t numdns, ip_addr_t *dnsserver);
^
C:\Users\Creature\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/dns.h:109:1: error: 'ip_addr_t' does not name a type
ip_addr_t      dns_getserver(u8_t numdns);
^
C:\Users\Creature\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/dns.h:110:56: error: 'ip_addr_t' has not been declared
err_t          dns_gethostbyname(const char *hostname, ip_addr_t *addr,
^

Thanks in advance for any of your help.