Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store git version of the core in the compiled binary #2099

Merged
merged 2 commits into from
Jun 6, 2016

Conversation

igrr
Copy link
Member

@igrr igrr commented Jun 6, 2016

  • Adds ESP.getCoreVersion()

    • for releases, returns a string with release name (e.g. "2_3_0_RC1")
    • for git version, returns a short commit hash (e.g. "dd81336b")
    • git version workflow works only on Mac and Linux (needs bash and git)
    • if the core doesn't contain .git repository (i.e. was obtained by downloading a .zip file), returns "ffffffff"
    • on Windows returns "00000000" instead of git version
  • Adds ARDUINO_ESP8266_RELEASE_XYZ define which can be used in #ifdef... statements (i.e. ARDUINO_ESP8266_RELEASE_2_3_0_RC1)

  • Core git version is stored at known offset in binary, so eboot will also report git version during startup (next to the last line):

    ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 1384, room 16 
    tail 8
    chksum 0x2d
    csum 0x2d
    vdd81336b
    ~ld
    

    Same caveats apply for this, i.e. it prints "v00000000" on Windows and prints "vffffffff" if there is no .git folder in the core directory.

  • Relies on platform.txt so doesn't work with Platoform.IO. May or may not work with Eclipse Arduino plugin (not tested). Should work work makeEspArduino (not tested).

@codecov-io
Copy link

codecov-io commented Jun 6, 2016

Current coverage is 42.60%

Merging #2099 into master will increase coverage by 16.29%

@@             master      #2099   diff @@
==========================================
  Files            19         19          
  Lines          3634       3634          
  Methods         328        328          
  Messages          0          0          
  Branches        585        585          
==========================================
+ Hits            956       1548   +592   
+ Misses         2513       2086   -427   
+ Partials        165          0   -165   

Powered by Codecov. Last updated by dbef28d...72f864e

@igrr igrr merged commit 32bd42b into master Jun 6, 2016
@igrr igrr deleted the feature/core_version branch June 6, 2016 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants