to have seperated build enviroments depening on Arduino IDE versions and board-versions.
Successfully tested with:
- Arduino IDE 1.8.5 and board version 1.0.1
- Arduino IDE 1.8.5 and board version 1.0.2
- These two above generate identical hex files
- Arduino IDE 1.8.7 and board version 1.0.2
- Arduino IDE 1.8.8 and board version 1.0.2
- Arduino IDE 1.8.9 and board version 1.0.2
- These three above generate identical hex files
- Compared to the 1.8.5 hex files the code uses less resources (Multi language/EN_ONLY):
```
Sketch uses 240082 bytes (94%) of program storage space. Maximum is 253952 bytes.
Global variables use 6002 bytes of dynamic memory.
Sketch uses 222344 bytes (87%) of program storage space. Maximum is 253952 bytes.
Global variables use 6019 bytes of dynamic memory.
```
vs.
```
Sketch uses 241526 bytes (95%) of program storage space. Maximum is 253952 bytes.
Global variables use 6046 bytes of dynamic memory.
Sketch uses 223828 bytes (88%) of program storage space. Maximum is 253952 bytes.
Global variables use 6065 bytes of dynamic memory.
```
Failed tests:
- Arduino IDE 1.8.6 and board version 1.0.2
- Arduino IDE 1.8.10 and board version 1.0.2
As I am planning to add new Prusa Arduino_Boards definition version 1.0.2 which contains few changes which interfere withthe existing PF-build.sh using Arduino_Boards v1.0.1,
i had to add an additional variable.
I have tested PF-build.sh with Arduino_Boards v1.0.1 and v1.0.2
It creates identical firmware hex files, if I manage it to run in the same minute.
If one of the runs is off by a minute compared to the other there is just one line in the hex code different,
which is showing the compiling date, time and firmware version.
- Changed Build-env path to "PF-build-dl" as requested in PR https://github.com/prusa3d/Prusa-Firmware/pull/2028
- Changed Hex-files folder to PF-build-hex as requested in PR
- Added Finding OS version routine so supporting new OS should get easier
What has changed:
- It downloads Arduino IDE 1.8.5 just once. Good for future build enviroment versions
- Uses Prusa Arduino_Boards. At this moment it download my 3d-gussner fork/branch/release. Pull request is made to DRracers his fork ... and finally to Prusa repository
- Minimized PF-build-env to changed files only. At this moment it only \hardware\tools\avr\avr\lib\ldscripts\avr6.xn
Old but updated:
Arduino IDE is portable and this build environment can be used with GUI.
Important preferences are set during istallation.
One thing users need to do is to go to Boardsmanager and search for Prusa and use EINSy board.