This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF53 sample projects

Hi,

I got the nRF connect sdk downloaded and I can build zephyr projects for the nrf5340_dk_nrf5340.

I somehow fail t find the sample projects as mention in

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#network-samples

It just mentions the network and application samples, not where they are within the structures of the downloaded sdk. I found what does seem to be them, but those wont build.

Can you please tell me where these samples are within the sdk. I got the "C:\Users\Riaan\ncs\v1.2.0\", where next?

Maybe also a compile command "west...." just to make sure I got it all correct.

Thanks.

Parents
  • Hi.

    You can find the samples in either the nrf/samples or zephyr/samples folder. In addition, there are some more full-fledged applications in the nrf/applications folder.

    The hci_rpmsg sample is in zephyr/samples/bluetooth/hci_rpmsg, while the radio_test sample is in nrf/samples/peripheral/radio_test.

    The samples in the nrf folder are created and maintained by us, and are made to work on our DKs and reference designs.

    The Zephyr samples, on the other hand, are created by contributors (including us) to the Zephyr project and are meant to work with most boards that Zephyr supports. This means that you sometimes have to do some minor changes to a sample for it to work on our boards.

    To build a sample from the command line, you can use the command "west build -b <board_name>". You can also add the -d flag to provide the name of the build folder you want, e.g. west build -b <board_name> -d my_build_directory. The default build directory is named "build". Another useful flag is -p, which will delete the build folder before building, giving you a completely clean build.

    To flash your device from the command line, you can use the command "west flash". This command will also build the project if necessary, though it requires an existing build folder to work. If you are using a different build folder than "build", you will have to provide the build folder in the same way as with west build.

    In short, the first time you build a project, you must use "west build -b <board_name>", but after that, you can use "west flash" to flash the device or build-and-flash. If you just want to build you can use "west build". As the board you use is stored in the build folder, you only have to provide the board name once.

    Remember that if you are using the Toolchain Manager to manage your toolchain, you have to open the command line (or IDE) from the toolchain manager for your environment to be configured properly.

     

    I found what does seem to be them, but those wont build.

     Were you able to build them with the instructions above?
    If not, which samples did you try, how did you try to build them, and what was the error(s) you got?

    Best regards,

    Didrik

Reply
  • Hi.

    You can find the samples in either the nrf/samples or zephyr/samples folder. In addition, there are some more full-fledged applications in the nrf/applications folder.

    The hci_rpmsg sample is in zephyr/samples/bluetooth/hci_rpmsg, while the radio_test sample is in nrf/samples/peripheral/radio_test.

    The samples in the nrf folder are created and maintained by us, and are made to work on our DKs and reference designs.

    The Zephyr samples, on the other hand, are created by contributors (including us) to the Zephyr project and are meant to work with most boards that Zephyr supports. This means that you sometimes have to do some minor changes to a sample for it to work on our boards.

    To build a sample from the command line, you can use the command "west build -b <board_name>". You can also add the -d flag to provide the name of the build folder you want, e.g. west build -b <board_name> -d my_build_directory. The default build directory is named "build". Another useful flag is -p, which will delete the build folder before building, giving you a completely clean build.

    To flash your device from the command line, you can use the command "west flash". This command will also build the project if necessary, though it requires an existing build folder to work. If you are using a different build folder than "build", you will have to provide the build folder in the same way as with west build.

    In short, the first time you build a project, you must use "west build -b <board_name>", but after that, you can use "west flash" to flash the device or build-and-flash. If you just want to build you can use "west build". As the board you use is stored in the build folder, you only have to provide the board name once.

    Remember that if you are using the Toolchain Manager to manage your toolchain, you have to open the command line (or IDE) from the toolchain manager for your environment to be configured properly.

     

    I found what does seem to be them, but those wont build.

     Were you able to build them with the instructions above?
    If not, which samples did you try, how did you try to build them, and what was the error(s) you got?

    Best regards,

    Didrik

Children
No Data
Related