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

cross mob

ModusToolbox Warning: Uncommitted/Untracked Files Detected - KBA231252

ModusToolbox Warning: Uncommitted/Untracked Files Detected - KBA231252

50 questions asked 25 likes received 25 sign-ins

Version: **

Translation - Japanese: ModusToolbox警告:コミットされていない/追跡されていないファイルが検出されました - KBA231252 - Community Translated (JA)

Why does my ModusToolbox application report a warning about uncommitted/untracked files?

Some firmware compiled into a ModusToolbox application is generated by configurators. The ModusToolbox build process re-generates source code during its build process if it's out of date for any reason, such as:

  • You opened a configurator and saved a change.
  • You updated the selected device (DEVICE=) in your BSP's ".mk" file.
  • You updated your device support library.
  • You upgraded or patched your tools to include a newer configurator.

ModusToolbox uses git to distribute and update firmware, and the above changes may trigger a warning from git when trying to update those repositories (for example, with Library Manager or directly on the command-line with git). The warning looks like this:

WARNING: Uncommitted/Untracked files detected in "<path to repository>".

Save your work in source control before updating this library.

Skipping current reference...

This is the git system's way of telling you that there are modified files that haven't been dealt with, and you need to do something about it. The system is being careful to make sure changes are not accidentally lost.

1 The device support library depends on your target device. Here are the more common options:
PSoC 6: psoc6pdl or mtb-pdl
PSoC 4: mtb-psoc4-pdl
Bluetooth: 20706A2, 20719B2, 20721B2, 20735B1, 20819A1, 20820A1, 20835B1, 43012C0

Resolve the Warning:

There are several ways you can resolve this warning, depending on your needs and whether you are using a default Build Support Package (BSP) or a custom BSP.

Default BSP

If you changed one of the default BSPs provided by Cypress (as described above), you should create a custom BSP and then revert the changes in the default BSP.

1. To create a custom BSP based on the current (modified) BSP, following the instructions in the BSP chapter of the ModusToolbox User Guide.

2. To revert the default BSP, run the following commands using the appropriate shell configured to run git.

# NOTE: This will delete any files that should not be present.

git -C <path to repository from warning> clean -dfx

# NOTE: This reverts files back to their original state.

git -C <path to repository from warning> restore .

3. Make sure everything is clean and ready:

git -C <path to repository from warning> status

4. Make sure the output includes the following text:

"nothing to commit, working tree clean"

Custom BSP

If you made a change in one of your custom BSPs, you may either revert that change (follow instructions under Default BSP), or commit the change.

To accept the changes, commit or check them in to your source code control system. For example, if you use git:

     # NOTE: make sure you look at the changes and are sure they are correct.

     git -C <path to repository from warning> status

     # NOTE: after you are sure the changes are acceptable, and commit them.

     git -C <path to repository from warning> add .

     git -C <path to repository from warning> commit