danielkucera / esp-arduino-ebus

65 stars 11 forks source link

Compiling firmware #69

Closed HuffYk closed 4 months ago

HuffYk commented 4 months ago

Hi, quick question. When compiling firmware in vscode using basically

pio run -e esp32-c3-ota

should be generated "bin" file same as released here which can be used also in OTA upgrade? I see firmware file is binary different so not sure if it is correct one. Also size is different in few bytes so not sure if it is because of different platform.io version or firmware released here is created different way?

thanks

danielkucera commented 4 months ago

Hello,

Not all library versions are strictly fixed so there might me minor differences.

Can you share your results and how do you compare them?

HuffYk commented 4 months ago

Hi, this is 1st time for me to compile anything for esp :), but I just opened your project in vscode, it installed platform.io and in its UI I tried to build project. I tried also just with running "pio run -e esp32-c3-ota" and same results. PlatformIO core is latest one,

Attached is generated firmware - its size is 16 bytes longer and when doing binary comparison to latest firmware-HW_v5.x-62ebb2.bin e.g. in Beyond Compare (using hex compare) there are many changes

firmware.zip

here is output from build process: output.zip

danielkucera commented 4 months ago

That is interesting. If you compare used libs, they are the same, see logs from CI: https://github.com/danielkucera/esp-arduino-ebus/actions/runs/8071727098/job/22051966190#step:8:76

It's possible that the build is not idempotent - maybe there are some date strings compiled in (like compilation date/time etc.)

But your result looks okay and usable.

HuffYk commented 4 months ago

I see CI is for esp32-c3 (but anyhow bin files are not same even when I try to compile this one) so what exactly is difference between: esp32-c3, esp32-c3-ota, esp32-c3-ota-vpn ?

I suppose difference in binary comparison might be because of order of modules compiled into bin file. Only order of comilation is different when checking everything... all versions are indeed same (including package manager modules). I even tried to use Python 3.12 (as before I used 3.10)

So which exactly should I build to try update myself? esp32-c3 or esp32-c3-ota ?

thanks

danielkucera commented 4 months ago

The only difference is how they are flashed to the device when you click Upload in platformio:

HuffYk commented 4 months ago

Understand, so if I want to flash it manually using web page, I can use same as is in CI: esp32-c3.

thanks

danielkucera commented 4 months ago

You can use any of those.

HuffYk commented 4 months ago

it worked ok, thanks!