About DeviceTree and Overlay files

I want to edit the sample source (nRF5340 Audio) and program it on my own board.

I'm using CIS.

I'm using NCS version 2.5.0.

The nRF5340 Audio DK board is exactly the same hardware,

so one overlay file works fine.

The circuit of the transmitter and receiver of my own board is different.

Therefore, I think two overlay files are necessary.

VSCODE is not recommended for nRF5340 Audio.

Therefore, I run the program made in Python from the command prompt.

Specifically, I run buildprog.py in the Tools/buildprog folder with the following command.

python buildprog.py -c both -b release -d both -m internal -M -p --recover_on_fail

How can I achieve this?

For example, is it possible to create two types of overlay files in one source and use different overlay files when running the script?

I would like to know the specific method.

When I enter the corresponding
J-Link serial number only into the Headset in the nrf5340_audio_dk_devices.json file and execute the build and write, then I enter the corresponding J-Link serial number only into the Gateway and execute the build and write, and I am unable to connect to BLE.

Do you know what the cause is?

Parents
  • Hello,

    For starters, the nRF5340 audio application(s) can be built with the command line as well as with the script. Also, from NCS v2.6.0, the SoftDevice controller is the default controller for the application(s), which means that building and programming with the VS Code extension is possible. We do recommend that you use the most recent releases of NCS when developing LE Audio because there are frequent updates. Please upgrade to NCS v2.6.1 if you can.

    Specifically, I run buildprog.py in the Tools/buildprog folder with the following command.

    python buildprog.py -c both -b release -d both -m internal -M -p --recover_on_fail

    How can I achieve this?

    For example, is it possible to create two types of overlay files in one source and use different overlay files when running the script?

    I would like to know the specific method.

    You should be able to edit the buildprog.py script to fit your requirements. This can be to add more flags to the command or changing the behaviour for the existing flags. Since you want to add a devicetree overlay to your application, there aren't many changes needed  If you store the overlay file in a boards directory within the LE audio project I think you only need to change the target board in the buildprog.py script. The basis for my hypothesis is that the buildprog.py script is putting together a west command, and west will find overlays within <project-folder>/boards when building.

    When I enter the corresponding
    J-Link serial number only into the Headset in the nrf5340_audio_dk_devices.json file and execute the build and write, then I enter the corresponding J-Link serial number only into the Gateway and execute the build and write, and I am unable to connect to BLE.

    I have a few questions to make sure I understand your setup: Are you flashing your custom board? If yes: What are you using as a debugger?

    Do you know what the cause is?

    The device logs in debug mode can be helpful to find out what goes wrong with the connection. Build and flash with -b debug, then study and send the device logs in a reply. Tip: You can insert the log through Insert->Code.

    Best regards,

    Maria

  • When using VSCODE, I think you can only build and flash one at a time, either the Gateway or Headset.

    Do I need to set anything in the configuration file?

    I previously received a response from dejans that VSCODE is not supported.

    If I update NSC to 2.6.1, develop with VSCODE, and encounter problems,

    can you provide support?

    The latest NCS is 2.7.0-rc2. Is it okay to use that?

    I am flashing to a custom board.

    I am using the J-Link BASE Compact debugger.

    When I build with a script in debug mode with NCS version 2.5.0, I get a build error.

    (I have asked about this in another ticket)

Reply
  • When using VSCODE, I think you can only build and flash one at a time, either the Gateway or Headset.

    Do I need to set anything in the configuration file?

    I previously received a response from dejans that VSCODE is not supported.

    If I update NSC to 2.6.1, develop with VSCODE, and encounter problems,

    can you provide support?

    The latest NCS is 2.7.0-rc2. Is it okay to use that?

    I am flashing to a custom board.

    I am using the J-Link BASE Compact debugger.

    When I build with a script in debug mode with NCS version 2.5.0, I get a build error.

    (I have asked about this in another ticket)

Children
No Data
Related