duino-coin icon indicating copy to clipboard operation
duino-coin copied to clipboard

ESP8266 miner ESP01 compatibility

Open mlesniew opened this issue 2 years ago • 4 comments

So far the official ESP8266 miner wouldn't run on ESP-01 because the result binary was to big. Disabling features reduced the result binary size, but not sufficiently to fit onto the 500k flash.

This PR fixes this by using the preprocessor to disable unneeded features.

Besides features, which have already been configurable (using global variables), this PR introduces the USE_OTA macro. If it's not defined, OTA will be disabled.

I was able to reduce the binary size to around 400k by disabling:

  • the web dashboard (comment out #define WEB_DASHBOARD)
  • OTA upgrades (comment out #define USE_OTA)
  • DHT support (comment out #define USE_DHT)
  • MQTT support (comment out #define USE_MQTT)

mlesniew avatar Nov 21 '22 20:11 mlesniew

Please make sure it doesn't break the official configurator found on the website.

revoxhere avatar Nov 27 '22 12:11 revoxhere

Hello, if you're still interested in pushing these changes to main codebase, you'll need to update the changes to the all-new and universal ESP Code released with version 4.0

revoxhere avatar Dec 31 '23 11:12 revoxhere

@mlesniew this improvement seems interesting for those boards with 512kB flash. Are you planning to review the pending issues so the changes can get trough the main codebase.

I have found recently and be aware that ESP01 has at least 3 variants: 1) Blue ESP-01 with 512kB of flash, 2) Black ESP-01 with 1MB of flash and 3) Black ESP-01S both with 1M of flash. I am not entirely sure how to differentiate the Blue and Black versions in in the code for building proposes.

ffrediani avatar May 06 '24 04:05 ffrediani

Hey, @ffrediani. To be honest, I had completely forgotten about this pull request. I briefly explored DuinoCoin around 1.5 years ago just to try it out, and this PR was the result of my experimenting.

Unfortunately, completing this PR requires a lot more work, as noted in the comments above. I never found the time to follow through, and my interest in the project has waned since then.

If you'd like to continue the work I've started, please feel free to do so. I'm happy to support you and help where I can.

mlesniew avatar May 14 '24 20:05 mlesniew