SDK Version question

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

SDK Version question

Postby fly135 » Fri Jul 20, 2018 5:07 pm

When the device boots it prints the 2nd stage bootloader sdk ver. But the version it prints is different than the "git describe" version from the IDF_PATH directory. So how does the bootloader have an ESP-IDF 3.1 version when the SDK is v3.0?

John A

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: SDK Version question

Postby WiFive » Fri Jul 20, 2018 7:07 pm

https://github.com/espressif/esp-idf/bl ... ct.mk#L234

If you checkout a different branch/commit of idf and the bootloader is not rebuild and reflashed then it might not match

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: SDK Version question

Postby fly135 » Fri Jul 20, 2018 7:55 pm

I thought the 2nd stage bootloader was built anytime you make a change with menuconfig or the build directory is erased. I'm building with the same SDK all the time and I believe the 2nd stage bootloader is burned every time I do a make flash. Not even sure how you could build with a different ver of the SDK without the 2nd stage BL being rebuilt.

John A

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: SDK Version question

Postby ESP_igrr » Fri Jul 20, 2018 8:14 pm

Can you please post the output you are getting from the 2nd stage bootloader, and output of 'git describe --tags' command? It will make it easier to answer your question.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: SDK Version question

Postby fly135 » Fri Jul 20, 2018 8:19 pm

On boot...

I (29) boot: ESP-IDF v3.1-dev-449-gc97b8756-dirty 2nd stage bootloader

git describe...

v3.0-dev-1839-gc97b8756

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: SDK Version question

Postby ESP_Angus » Mon Jul 23, 2018 4:10 am

Hi fly135,

Something odd seems to happen when you're running "git describe" manually. If I check out the same commit as you ("git checkout c97b8756f"), I get:

Code: Select all

$ git describe --tags --dirty
v3.1-dev-449-gc97b8756f-dirty
This matches what the build system is reporting, and appears correct (the tag v3.1-dev comes 449 commits before c97b8756f).

The description "v3.0-dev-1839" is not exactly wrong - the tag v3.0-dev is part of the git log as well, and there are 1839 commits between that tag and commit c97b8756f). Git should pick up that there's a newer tag (v3.1-dev) in the log and use that instead, though...

Do you think it's possible the "git" which the build system runs and the "git" which you ran to test the version are different git binaries? (ie were they run from different types of terminals?)

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: SDK Version question

Postby fly135 » Mon Jul 23, 2018 3:17 pm

I just typed "git describe". When I type "git describe --tags --dirty", then I get the same results you did.

i.e. v3.1-dev-449-gc97b8756-dirty

John A

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: SDK Version question

Postby ESP_Angus » Mon Jul 23, 2018 11:30 pm

Thanks for clarifying, I realise what happened now.

The "--tags" option causes git to consult non-annotated tags as well as annotated. If you don't include this, git will only use annotated tags for the version. "v3.1-dev" is accidentally a non-annotated tag so it's not consulted unless you pass --tags. All the other version tags are annotated.

If you fast forward your checked out IDF version to v3.1-beta1 (or any newer commit on the release/v3.1 branch), this tag is annotated and the behaviour (--tags or not) will become consistent again.

("--dirty" appends the -dirty suffix if the tree has some modifications, but that's all it does.)

Who is online

Users browsing this forum: No registered users and 102 guests