This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Bifrost is an internal module/tools repository for managing internal development workspaces needing translation between Bitbucket and GitHub.

**This is the environment setup for internal developers to create and adjust the west workspace internal development **

This design makes it possible the downstream Bitbucket repos to have a one-to-one alignment with the NXP Github downstream repos without rewriting the commit history to change the URL. Developers need to follow the rule as below:

  • Need to run the set up script init_env.py(or west custom command sdk_init) only once in the initial workspace using this repo and the instructions below.

  • Add a new entry for the URL map in .gitconfig once a new internal Bitbucket repo is created/added for zephyr downstream support.

insteadOf and includeIf

The init_env.py setup script(or west custom command sdk_init) will configure the new workspace appropriately for this URL translation. The translation is accomplished leveraging Git’s insteadOf configuration to rewrite URLs when Git is performing network operations. It allows replacing part of the URL with another string, making it transparent to work with repositories that have different URLs for different contexts (e.g. internal Bitbucket vs external Github). These translations are found in the .gitconfig configuration file.

The script will add a global configuration in Git using the includeIf configuration to cause conditional inclusion of the .gitconfig in the newly initialized workspace. Use the following to see your workspace configuration:

git config -l

There’s also another extension command west sdk_deinit to remove the URL translation config from Git global configuration. After run this command, developers are able to to add a new remote tracking the Github URL which previously was translated to Bitbucket URL by Git.

[!NOTE] Please be aware that run west update command after west sdk_deinit will still update existing repos from Bitbucket repo because their default Git remote was set as Bitbucket URL.

The following repos are converted to Bitbucket URL, which previously use default remote url-base point to Github:

  • nxp-zephyr

  • zsdk-int-manifest

  • zephyr_mbedtls

  • zephyr_tf-m

  • zephyr_psa_arch_test

There’s no record for the primary west manifest repo because this repository is the starting repository for west and does not have any URL tracking problems.

When a new NXP repo is added to the development, add a new entry in this .gitconfig file.

Steps to try

Due to west limitations, the steps to try are different for zephyr downstream and next SDK.

  • West requires all imported projects be checked out before it can execute west custom commands(west issue). So, zephyr downstream cannot use west sdk_init command for URL translation because zsdk imported the zephyr project.

Below describes the detailed steps for zephyr downstream and next SDK.

Firstly please follow below instruction to establish a global git setting for URL translation of the bifrost repository:

$ git config --global url.ssh://git@bitbucket.sw.nxp.com/mcucore/bifrost.git.insteadOf https://github.com/nxp-zephyr/bifrost

NOTE: The above instruction only needs to be done once when configuring a workstation for next SDK or Zephyr Downstream development. If you already have the map established previously, you can skip this step.

Zephyr downstream

  1. Initialize development workspace with zsdk manifest repo on Bitbucket

$ west init -m ssh://git@bitbucket.sw.nxp.com/mcucore/nxp-zsdk.git zephyr_downstream --mr main
$ cd zephyr_downstream
  1. Checkout bifrost repo which has the internal tools/scripts to convert the Bitbucket URL to Github URL.

$ west update bifrost
  1. Run set ups script init_env.py(python3 needed) to activate the includeif specified git configuration and enable bifrost group.

$ python bifrost/scripts/init_env.py
  1. Update your workspace:

$ west update

Next SDK

If you are creating new develop workspace, follow below instructions:

  1. Initialize development workspace with your manifest repo on Bitbucket

$ west init -m ssh://git@bitbucket.sw.nxp.com/scm/mcu-sdk-3.0.git sdk-next --mr main
$ cd sdk-next
  1. Checkout bifrost repo which has the internal tools/scripts to convert the Bitbucket URL to Github URL.

$ west update bifrost
  1. Enable west custom command, run west sdk_int to activate the includeif specified git configuration and enable bifrost group.

$ west config commands.allow_extensions true
$ west sdk_init
  1. Update your workspace:

$ west update

Else if you have existing workspace using previous manifest_int repo as primary manifest repo and the update_repo command, please follow below steps to adjust the workspace:

  1. Change directory to your existing develop workspace(assume it’s under folder sdk-next)

$ cd sdk-next
  1. Remove the manifest_int folder, change directory to the manifest repo mcu-sdk-3.0 and set it as the manifest for the workspace.

$ rm -rf manifest_int
$ cd mcu-sdk-3.0
$ git fetch origin main
$ git checkout -b main origin/main
$ west config manifest.path mcu-sdk-3.0
  1. Checkout bifrost repo which has the internal tools/scripts to convert the Bitbucket URL to Github URL.

$ west update bifrost
  1. Run west extension command sdk_init, to activate the includeif specified git configuration and enable bifrost group.

$ west sdk_init
  1. Update your workspace:

$ west update