Importable build platform #183
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR move most of global code and variable into main() function, remove ussage of global fqb/platform/platforms in other funtions. This allow build_platform.py can be immported by other python script. And can run
test_examples_in_folder()
without installing the core platform.The reason is BSP_URL is using arduino-esp32 dev json --> install esp32 v3.0.0 alpha. Some libraries such as TinyUSB need to run with both v3.0.0 (dev) and v2.0.15 since espressif update libtinyusb often and can cause version mismatch.
This changes allow other lib can manually install arduino core (e.g esp v2) then execute tests as done in https://github.com/adafruit/Adafruit_TinyUSB_Arduino/pull/414/files#diff-4951824edd423ca1a60532c1baf26ddf0b20f04791e15628c1de91c0200051d3R86
also fix is_library_installed() using incorrect parameter (deps undefined)