platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
136 stars 104 forks source link

PlatformIO doesn't download the correct 3rd party core release version #232

Closed MCUdude closed 3 years ago

MCUdude commented 3 years ago

Hi!

Even though MightyCore v2.0.6 is the latest version PlatformIO currently use, it still pulls the latest v2.0.8 when installing MightyCore. Is this right?

When I'm building for target ATmega1284P, this is the output:

Processing Upload_UART (platform: atmelavr; framework: arduino; board: ATmega1284P)
--------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduino-avr-mightycore @ ~2.0.6
Unpacking  [####################################]  100%          
Tool Manager: framework-arduino-avr-mightycore @ 2.0.8 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega1284P.html
PLATFORM: Atmel AVR (2.2.0+sha.41ab7b7) > ATmega1284P
HARDWARE: ATMEGA1284P 16MHz, 16KB RAM, 127KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES: 
 - framework-arduino-avr-mightycore 2.0.8 
 - toolchain-atmelavr 1.50400.190710 (5.4.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 11 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SPI> 1.0
Building in release mode

...

but when I go and look at the actual platform.txt file that's bundled with MightyCore, it reveals that v2.0.8 was downloaded.

It would be great if v2.0.6 actually downloaded v2.0.6.

And how do I manually specify what MightyCore version my project should use?

valeros commented 3 years ago

That's how Semantic Versioning works. Even though we specified 2.0.6 as the minimal version, we also added the symbol ~ which allows patch-level changes that shouldn't break anything.

MCUdude commented 3 years ago

Ah! So it will actually pull newer versions than 2.0.6 due to the ~ in front.

And how do I manually specify what MightyCore version my project should use?

I also figured out how to set this.

; Force MightyCore v2.0.6
platform_packages =
  framework-arduino-avr-mightycore@2.0.6