nRF Connect SDK- NRF5340 Audio DK Python script build problems

I'm using the doc at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html For the nrf5340_audio DK and I'm having problems building with the Python script in the building in the programming section https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf5340_audio/README.html# 

BUILDING AND PROGRAMMING the AUDIO Example

Development platform used

Windows10

nRFConnect SDK version v2.4.0

nRF Connect for VS Code Extension Pack  v2022.9.6

I'm getting an error 

  • west' is not recognized as an internal or external command

I'm using the toolbox manager bash command and I'm able to get past some of the tools and installed them with PIP . what do I need to do to assure that the tools for West and others in the script are visible?

Parents
  • I had 2 issues with the doc page 

    1. west' is not recognized as an internal or external command
      1. Solution: use the bash command line tool accessible from the SDK version tab in the Tool Manger.
    2. programming the devices. I cannot program the net core on both devices? Due to readback protection?
      1. Solution: 

        Use the command:    python buildprog.py -c both -b debug -d both -p --recover_on_fail

      2. The App doc page is incorrect the program command has an incorrect argument “--recover-on-fail”! It should be defined with underscores not dashes.

        THIS NEEDS TO BE FIXED ON THE DOC PAGE TO STOP CONFUSION WHEN USING THE AUDIO EXAMPLE TO BUILD & PROGRAM the KIT

    Be aware the doc page has some buggy information

    RESULTS of running the command.

    .

    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
    $ python buildprog.py -c both -b debug -d both -p --recover_on_fail
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    | 1050131916 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
    |     10     |  ←[33mFalse←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_headset\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [4/6] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_gateway\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/10] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050171701 headset left
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming net core on: 1050131916 gateway
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050171701 headset left
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050131916 gateway
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Recovering device. This operation might take 30s.
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    Recovering device. This operation might take 30s.
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Erasing user code and UICR flash areas.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Writing image to disable ap protect.
    Recovering device. This operation might take 30s.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Programming net core on: 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming app core on: 1050131916 gateway
    Programming app core on: 1050171701 headset left
    Programming UICR
    Parsing parameters.
    Writing.
    Parsing parameters.
    Writing.
    Resetting 1050131916 gateway
    Parsing parameters.
    Writing.
    Resetting 1050171701 headset left
    Applying system reset.
    Run.
    Applying system reset.
    Run.
    build_prog.py finished. Report:
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   True   | headset | Not selected |         Done        |         Done        |
    | 1050131916 |   True   | gateway | Not selected |         Done        |         Done        |
    |     10     |  False   | headset | Not selected |     Not selected    |     Not selected    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    
    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog

Reply
  • I had 2 issues with the doc page 

    1. west' is not recognized as an internal or external command
      1. Solution: use the bash command line tool accessible from the SDK version tab in the Tool Manger.
    2. programming the devices. I cannot program the net core on both devices? Due to readback protection?
      1. Solution: 

        Use the command:    python buildprog.py -c both -b debug -d both -p --recover_on_fail

      2. The App doc page is incorrect the program command has an incorrect argument “--recover-on-fail”! It should be defined with underscores not dashes.

        THIS NEEDS TO BE FIXED ON THE DOC PAGE TO STOP CONFUSION WHEN USING THE AUDIO EXAMPLE TO BUILD & PROGRAM the KIT

    Be aware the doc page has some buggy information

    RESULTS of running the command.

    .

    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
    $ python buildprog.py -c both -b debug -d both -p --recover_on_fail
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    | 1050131916 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
    |     10     |  ←[33mFalse←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_headset\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [4/6] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_gateway\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/10] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050171701 headset left
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming net core on: 1050131916 gateway
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050171701 headset left
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050131916 gateway
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Recovering device. This operation might take 30s.
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    Recovering device. This operation might take 30s.
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Erasing user code and UICR flash areas.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Writing image to disable ap protect.
    Recovering device. This operation might take 30s.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Programming net core on: 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming app core on: 1050131916 gateway
    Programming app core on: 1050171701 headset left
    Programming UICR
    Parsing parameters.
    Writing.
    Parsing parameters.
    Writing.
    Resetting 1050131916 gateway
    Parsing parameters.
    Writing.
    Resetting 1050171701 headset left
    Applying system reset.
    Run.
    Applying system reset.
    Run.
    build_prog.py finished. Report:
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   True   | headset | Not selected |         Done        |         Done        |
    | 1050131916 |   True   | gateway | Not selected |         Done        |         Done        |
    |     10     |  False   | headset | Not selected |     Not selected    |     Not selected    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    
    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog

Children
No Data
Related