PlatformIO Community

Set package repository and version in platformio.ini

Hello,
i’m new at platformio and i need some help configuring package repository. I want to develop zephyr applications and i want to use the zephyr-repo-clones on my own server. So i found the way to set the repo like follows:

platform_packages =
framework-zephyr @ file:///path/to/zephyr/repoclone/.git#2.1-branch

So far plaformio copies the repo but build is not possible because of framework-zephyr-2.20200.200401/scripts/platformio/plaformio-build.py coud not be found. I found out, that zephyr originaly will be downloaded from https://dl.bintray.com/platformio/dl-packages/ as mentioned in .platformio/platforms/ststm32/platform.json.
So i downloaded the zephyr-File from https://dl.bintray.com/platformio/dl-packages/ manually and copied it to a local directory or rather a local server.
Finally i can set a path which contains multiple zephyr-versions as tar.gz-Files. But Version which should be used is set in .platformio/platforms/ststm32/platform.json.

Is it possible set both Path and Version? I can not find this case in the DOCs and i would be grateful for a hint.

You can directly supply the version in platform.ini
framework-zephyr@2.20200.200401

Hi thanks for reply,

yes but than zephyr will be downloaded from https://dl.bintray.com/platformio/dl-packages/. I want to use own repo-server.

then try this instead:

platform_packages = file:///path/to/zephyr/repoclone/.git#2.1-branch
1 Like

by default de zephyr git-repo does not include the platformio-build.py. So a build is not possible. A package or a copie of the Files of bintray.com must be used because this include the platformio-scripts.

1 Like

So i downloaded the zephyr-File from https://dl.bintray.com/platformio/dl-packages/ manually and copied it to a local directory or rather a local server.
Finally i can set a path which contains multiple zephyr-versions as tar.gz-Files. But Version which should be used is set in .platformio/platforms/ststm32/platform.json.

So what does your platform_packages line actually look like. From this it sounds like you have it pointed to something like platform_packages = http://192.168.0.5/some-path/some-zephyr.tar.gz

Is it possible set both Path and Version? I can not find this case in the DOCs and i would be grateful for a hint.

If you’re setting a version via @ (e.g. like platform_packages = toolchain-gccarmnoneeabi@>1.50000.0) , does the platform.json in some-zephry.tar.gz match that, or need changing?

Hi,
at first thank’s for your replay.

This Specifies a Directory with Packages. Using this Configration a suitable Version will be searched, which is specified in the PlatformManifest platform.json:
platform_packages = framework-zephyr @ file:///path/to/packages/dir

This Specifies a specific Package-File. This Solution may be ok.
platform_packages = framework-zephyr @ file:///path/to/packages/dir/ some-zephyr.tar.gz

I am searching for a specification including path der Version by using Semanitc Versioning. Something like:
platform_packages = framework-zephyr @ file:///path/to/packages/dir ~2.20200.0