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

nRFConnect SDK custom application/board set up issues with nRF5340

Hello,

I am in the process of writing a custom application for a custom board for the nRF5340, but have run into some odd behavior with SES when I started changing around things to use relative paths instead of the absolute paths that are put in place by default when creating a new project based on a previous example.

The long term goal for this is to have a project that supports the following:

1) use a custom nRF5340 board

2) use relative paths for the main application code and the Zephyr components as this is something that will potentially be worked on by multiple developers on different machines.

3) custom application code for the application core and very likely the network core as well that exist outside the SDK files (i.e. a folder heirarchy that is something like CustomApp/AppCore/<app core application code>, CustomApp/NetCore/<net core application code>, and then CustomApp/Common/<the nRFCOnnect SDK .

I have managed to create at least a custom board based on the nRF5340dk and when I initially set up my sample project (the BLE peripheral_uart example), I could assign it to my custom board.

However, in the process of updating the project files to support relative paths (using the $(ProjectDir) field supported by SES), I have managed to somehow have lost the "Add New File to CMakeLists.txt" and the "Configure nRFConnect SDK" menu that adds the GUI support for the config files. I have checked to make sure that # NORDIC SDK APP START and # NORDIC SDK APP END are in the CMakeLists.txt file. Not sure if it matters, but based on the documentation, the .config file in the app/zephyr folder should get wiped out on a clean build, but it still remains on any clean build (the other files like .hex doe get cleaned out). This makes me thing that I have either royally screwed up something while trying to add relative paths.

Is there a list of all the files that need to change when moving over to a custom application from a sample app? The SES project files I know of, but I also see things like the zephyr_modules.txt, zephyr_settings.txt, cmake_install.cmake, that seem like they may be auto-generated perhaps?

Sorry if this has been asked before. I have found bits and pieces of answers for similar issues but nothing exactly quite matching what I was looking to do (perhaps there is a good reason for this though).

Parents
  • Hello, Spencer!

    Thanks for reaching out. All the required steps for moving to a custom application should be described in the "Modifying a sample application"-documentation, but from what I can see you've already looked at that. However, I can see that the documentation is a bit unclear here. While ".config" is deleted when you clean the build directory it's also generated when opening a new project. A more correct way to phrase it is that any changes you have made to the configuration in SES will be wiped when you clean the build directory, reverting the configuration to the original. 

    When it comes to your issue with relative paths and options in SES I'm a bit unsure what may be causing it, but in CMakeLists "${CMAKE_CURRENT_SOURCE_DIR}" is normally used. Could you try that instead of "$(ProjectDir)"?

    Maybe you could share the CMakeLists.txt you're using as well?

    Please notify me if anything is unclear!

    Best regards,
    Carl Richard

Reply
  • Hello, Spencer!

    Thanks for reaching out. All the required steps for moving to a custom application should be described in the "Modifying a sample application"-documentation, but from what I can see you've already looked at that. However, I can see that the documentation is a bit unclear here. While ".config" is deleted when you clean the build directory it's also generated when opening a new project. A more correct way to phrase it is that any changes you have made to the configuration in SES will be wiped when you clean the build directory, reverting the configuration to the original. 

    When it comes to your issue with relative paths and options in SES I'm a bit unsure what may be causing it, but in CMakeLists "${CMAKE_CURRENT_SOURCE_DIR}" is normally used. Could you try that instead of "$(ProjectDir)"?

    Maybe you could share the CMakeLists.txt you're using as well?

    Please notify me if anything is unclear!

    Best regards,
    Carl Richard

Children
No Data
Related