Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Code Examples

drsc_2274716
Level 2
10 sign-ins 5 sign-ins First like received
Level 2

The ModusToolbox Offline Content Generator is released to help you generate your own and up-to-date ModusToolbox offline content package.
ModusToolbox离线内容生成器现已发布,它可以让你生成你自己的最新的ModusToolbox离线内容包。

ModusToolbox offline content package was first introduced in April, 2020.

"This package enables you to use ModusToolbox Project Creator and Library Manager tools without a persistent internet connection. It contains all the ModusToolbox repos referenced in the ModusToolbox manifest files. We continue to recommend working with the online content - so you always have access to the latest software - but this is a useful alternative method of accessing libraries for users who are frequently working offline."

However the official package becomes quite out-of-date. To fix this once for all, you will need the ModusToolbox Offline Content Generator.
官方提供的离线包目前暂且过期。要一次性解决离线包时效问题,你可使用ModusToolbox离线内容生成器

----------------------------------------------------

Download it here.
请从这里下载.

----------------------------------------------------

1. Prerequisites/准备条件

The generator requires ModusToolbox 2.x and PowerShell (>=v5.0) to be installed on your Computer. The generated package might work on Windows/MacOS/Linux but the generator only works on Windows.
生成器依赖你电脑上安装的ModusToolbox 2.x和PowerShell(>=v5.0)环境。生成的离线包应该可以在Windows/MacOS/Linux上使用,但生成器只能在Windows系统上运行。

It's recommended to run the generator on a Windows 10 Computer because PowerShell (>=5.0) is included by default. For Windows 8.1 and earlier, install/update the PowerShell manually.
推荐你在安装了Windows 10的电脑上运行本生成器,因为PowerShell(>=5.0)默认是预装好的。对于Windows 8.1或更早的系统,请手动安装或更新PowerShell。

The generator needs open and persistent Internet access during the whole generating process. Ensure you have granted access to github.com and all its subsidiaries before proceeding. "sslVerify=false" will be now added to gitconfig to ensure the download process under some monitored networks. Be aware of this change and stop using the tool if you cannot afford MITM.
生成器在整个生成过程中,都需要不受干预的、持续的因特网连接。请确保你被允许访问github.com和与它有关的网络内容。"sslVerify=false"现在会被添加到gitconfig中,以保证下载进程在受审查的网络下仍能正常运行。请知悉本改动。如果你不能容忍MITM(中间人攻击),请停止使用本工具。

2. Work Flow/工作流程

a) (!!!) Remember to delete the environment variable CyRemoteManifestOverride or CY_GETLIBS_CACHE_PATH if you find it in the environment variables. Because it will interfere with the offline mode of ModusToolbox and cause incoherence.
a) 请记得删除CyRemoteManifestOverrideCY_GETLIBS_CACHE_PATH这两个环境变量(如果它存在在环境变量中)。因为它会影响ModusToolbox的离线模式,造成数据不一致。

b) Download the ModusToolbox Offline Content Package Generator. Unzip it to the preferred location. You'll get a directory named offline and it includes the script files. Enter that directory.
b) 下载ModusToolbox离线内容生成器,把它解压到任意目录。你会看到一个名为offline的目录,它包含了一些脚本文件。请进入该目录。

c) Double-click to run the file !!!PLEASE_RUN_ME!!!.cmd and leave all other files untouched. Now the generating process is started and might need hours to complete. Please wait for the window to be terminated automatically.
c) 双击运行文件!!!PLEASE_RUN_ME!!!.cmd,让其他文件保持原样。现在,生成过程已经开始,该过程可能需要数小时才能结束。请耐心等待直到窗口运行到自动终止。
Charles_Lai_3-1615453694660.png
Charles_Lai_4-1615453752403.png

d) Now you have successfully generated your own and up-to-date ModusToolbox offline content package. Return to superior directory and copy the whole directory offline that you just generated, to the hidden directory named .modustoolbox in your home directory. Theoretically the generated package can be used on Windows/MacOS/Linux.
d) 现在,你已经成功生成了你自己的最新的ModusToolbox离线内容包。返回上一级目录,然后拷贝你刚刚生成的整个offline目录,到你用户目录下的.modustoolbox隐藏目录中。理论上,生成的离线包可以用在Windows/MacOS/Linux上。

e) Congratulations! Use the ModusToolbox in offline mode. You will see the package is loaded. If your package becomes out-of-date, simply run the file !!!PLEASE_RUN_ME!!!.cmd again.
e) 祝贺!请启用ModusToolbox的离线模式。你会发现离线包会被正常加载。如果你的离线包不是最新了,请再次运行!!!PLEASE_RUN_ME!!!.cmd文件即可。
Charles_Lai_7-1615457050164.png

3. Notes/注意

a) Use this feature for emergency only. Online content is always prior to offline content.
a) 请只在紧急情况下使用本功能。在线内容永远优先于离线内容。

b) The offline package is always generated using the latest content online. The version and release date of the generator will not put a constraint on fetching the latest content.
b) 离线包总是使用最新的在线内容生成的。生成器的版本号和发布日期不会限制它获取最新的内容。

c) The generated offline package is compatible with ModusToolbox 1.x, 2.x and hopefully later.
c) 生成的离线包兼容ModusToolbox 1.x,2.x,如无意外还将向前兼容新的版本。

d) Third-Party dependencies might be cached during the generation. But the generator itself doesn't contain Third-Party dependencies/repos/code.
d) 第三方依赖在生成过程中可能会被缓存。但生成器本身不包含第三方的依赖/库/代码。

e) There is NO WARRANTY, to the extent permitted by law.
e) 本软件是明信片软件,在法律允许的范围内,不提供任何稳定性等保证。

f) For more infomation, see: ModusToolbox offline libraries
f) 要获取更多的信息,请参见:ModusToolbox offline libraries

3 Replies
Marshal_Zhang
Level 4
25 sign-ins 10 replies posted 10 sign-ins
Level 4

请确保你被允许访问github.com和与它有关的网络内容。

😂😂😂正因为不能连接到github.com才需要offline package,  能连接到github.com还要啥offline ???

 

0 Likes
drsc_2274716
Level 2
10 sign-ins 5 sign-ins First like received
Level 2

如果你只需要offline package,你可以在我的另一个thread中自取,请见:
Self-released ModusToolbox Offline Content Package - Infineon Developer Community

本thread发布的是offline package的生成器,发布的必要性来源于开源原则和精神的要求(以形成逻辑闭环),并供有条件的用户备用,因为它在如下用户场景中能发挥显著重要性:

  1. 用户A有条件访问github.com,用户B没有同等条件且是用户A的伙伴。于是用户A可以使用本生成器随时随地自行生成最新的offline package提供给用户B,来帮助用户B解决问题。
  2. 用户A有条件访问github.com,但访问速度不理想。于是用户A倾向于使用offline package来为自己的项目开发加速,但希望offline package可以随时随地都能十分方便地保持最新。于是该用户便需要用到本生成器,来解决其痛点。
0 Likes
Marshal_Zhang
Level 4
25 sign-ins 10 replies posted 10 sign-ins
Level 4

👍 

0 Likes