|
| 1 | +.. _migration_guide: |
| 2 | + |
| 3 | +Migration Guide: Moving from NCS Manifest to Standalone west.yml |
| 4 | +############################################################### |
| 5 | + |
| 6 | +This guide explains how to migrate your Sidewalk development environment from using the NCS manifest to the new standalone west.yml setup. |
| 7 | + |
| 8 | +Overview |
| 9 | +======== |
| 10 | + |
| 11 | +The Sidewalk repository has been moved out of the NCS manifest into its own west.yml configuration. This change provides more flexibility and better control over the Sidewalk development environment. The Sidewalk release cycle will be detached from NCS, allowing for faster releases of new libraries on stable versions of NCS. The Sidewalk repository is now visible in the NCS add-on index repository, which enables an alternative setup method using the VSCode NRF Connect add-on. |
| 12 | + |
| 13 | +Prerequisites |
| 14 | +============ |
| 15 | + |
| 16 | +Before starting the migration, ensure you have: |
| 17 | + |
| 18 | +* Git installed on your system |
| 19 | +* Python 3.8 or later installed |
| 20 | +* The west tool installed |
| 21 | +* nrfutil installed |
| 22 | + |
| 23 | +Alternative Setup Method |
| 24 | +======================= |
| 25 | + |
| 26 | +If you prefer using VSCode, you can set up a clean environment using the NRF Connect add-on: |
| 27 | + |
| 28 | +1. Install VSCode and the NRF Connect add-on |
| 29 | +2. Open VSCode and click on the NRF Connect icon in the sidebar |
| 30 | +3. Click on "Add Application" and select "Sidewalk" from the list of available applications |
| 31 | +4. Follow the prompts to set up your development environment |
| 32 | + |
| 33 | +This method will automatically handle the repository setup and dependencies installation. |
| 34 | + |
| 35 | +Migration Steps |
| 36 | +============= |
| 37 | + |
| 38 | +1. Clone the New Sidewalk Repository |
| 39 | +---------------------------------- |
| 40 | + |
| 41 | + .. code-block:: console |
| 42 | +
|
| 43 | + # Clone the new Sidewalk repository into sidewalk directory |
| 44 | + git clone https://github.com/nordicsemiconductor/sidewalk.git sidewalk |
| 45 | +
|
| 46 | +2. Clean Existing West Configuration (if applicable) |
| 47 | +------------------------------------------------- |
| 48 | + |
| 49 | + If you already have an NCS setup with Sidewalk, you need to remove the existing west configuration and ensure Sidewalk is checked out to the correct revision after the NCS separation: |
| 50 | + |
| 51 | + .. code-block:: console |
| 52 | +
|
| 53 | + # Remove the .west directory to clean the west configuration |
| 54 | + rm -rf .west |
| 55 | + # Checkout and pull main branch in Sidewalk repository |
| 56 | + cd sidewalk |
| 57 | + git checkout main |
| 58 | + git pull origin main |
| 59 | + cd .. |
| 60 | +
|
| 61 | +3. Initialize West |
| 62 | +----------------- |
| 63 | + |
| 64 | + .. code-block:: console |
| 65 | +
|
| 66 | + # Initialize west with the new manifest |
| 67 | + west init -l sidewalk |
| 68 | +
|
| 69 | +4. Update Repositories |
| 70 | +--------------------- |
| 71 | + |
| 72 | + .. code-block:: console |
| 73 | +
|
| 74 | + # Update all repositories |
| 75 | + west update |
| 76 | +
|
| 77 | +5. Update Toolchain and Install Dependencies |
| 78 | +------------------------------------------ |
| 79 | + |
| 80 | + .. code-block:: console |
| 81 | +
|
| 82 | + # Get the toolchain hash and download it |
| 83 | + nrf/scripts/toolchain.py |
| 84 | + nrfutil toolchain install --ncs-version $(nrf/scripts/toolchain.py --ncs-version) |
| 85 | + # Install Python dependencies for nRF and Zephyr |
| 86 | + pip install -r nrf/scripts/requirements.txt |
| 87 | + pip install -r zephyr/scripts/requirements.txt |
| 88 | + # Install Sidewalk Python requirements |
| 89 | + pip install -r requirements.txt |
| 90 | +
|
| 91 | +Verification |
| 92 | +=========== |
| 93 | + |
| 94 | +To verify your migration was successful: |
| 95 | + |
| 96 | +1. Check that all repositories are properly cloned: |
| 97 | + |
| 98 | + .. code-block:: console |
| 99 | +
|
| 100 | + west list |
| 101 | +
|
| 102 | + Expected output should show all required repositories with their paths and revisions. For example: |
| 103 | + |
| 104 | + .. code-block:: console |
| 105 | +
|
| 106 | + name path revision |
| 107 | + ---------------------- ---------------------- ---------------------- |
| 108 | + manifest sidewalk HEAD |
| 109 | + ... |
| 110 | +
|
| 111 | + Invalid output would be: |
| 112 | + * Empty list |
| 113 | + * Missing repositories |
| 114 | + * Error messages |
| 115 | + * "Not found" status for any repository |
| 116 | + |
| 117 | +2. Verify the build process: |
| 118 | + |
| 119 | + .. code-block:: console |
| 120 | +
|
| 121 | + west build -b nrf54l15dk/nrf54l15/cpuapp samples/sid_end_device |
| 122 | +
|
| 123 | + This will build the Sidewalk end device sample application. If the build succeeds, your migration was successful. |
| 124 | + |
| 125 | +Common Issues and Solutions |
| 126 | +========================= |
| 127 | + |
| 128 | +1. Repository Conflicts |
| 129 | +---------------------- |
| 130 | + |
| 131 | + If you encounter repository conflicts during the migration: |
| 132 | + |
| 133 | + .. code-block:: console |
| 134 | +
|
| 135 | + # Remove the .west directory |
| 136 | + rm -rf .west |
| 137 | + # Reinitialize west |
| 138 | + west init -l sidewalk |
| 139 | + # Update repositories |
| 140 | + west update |
| 141 | +
|
| 142 | +2. Build Errors |
| 143 | +-------------- |
| 144 | + |
| 145 | + If you encounter build errors: |
| 146 | + |
| 147 | + * Ensure all dependencies are installed |
| 148 | + * Check that the NCS environment is properly sourced |
| 149 | + * Verify that you're using the correct board target |
| 150 | + * Try building the Zephyr hello world sample to verify your basic build environment: |
| 151 | + |
| 152 | + .. code-block:: console |
| 153 | +
|
| 154 | + west build -b nrf54l15dk/nrf54l15/cpuapp zephyr/samples/basic/hello_world |
| 155 | +
|
| 156 | +Additional Resources |
| 157 | +================== |
| 158 | + |
| 159 | +* :ref:`setting_up_environment` |
| 160 | +* :ref:`samples_list` |
| 161 | +* :ref:`compatibility_matrix` |
0 commit comments