Moving Design to a New Computer

I have a design in VS Code that works fine on a Windows 10 computer (original development was done here).  Because I spend so much time waiting for my compute to compile my designs, I decided to buy a much faster computer (with Windows 11).  I've copied the entire director that contained my old design to the new computer but now I get errors on power complaining that a needed file is not there (but the file i,s indeed, there).  Any thoughts?  I'm stuck (and I need to get moving quickly again).

Thanks!

Parents
  • Hi Sheldon

    Its great to hear that you figured out the issue. I would also suggest that you look into using WSL together with VScode as it from my experience compiles something like 40-50% faster then a standard windows build. If not I would suggest setting up a devdrive and place both your sdk, toolchain and project folder there. On my end it decreased the compile time with about 30% in the tests I did when I tested it earlier this year(I still use it on my Windows computer). 

    The fasted setup is to use Linux but as you may not be familiar with it or depended on other applications I would either use WSL or devdrive. The build time is not to bad on single image build, but when you start with multi-image build I would not hesitate to use one of the mentioned setups. 

    Regards

    Runar

  • Hi Runar,
    I shouldn't have been so excited about my solution because I am now finding that there are still problems.  Somehow when I copy the entire path from the previous computer, it still is missing some configurations or settings.  I had two builds on my old computer and neither of them show up on my new computer.  Where did they go?!   I then created another build configuration and I was able to get the design be built.  However, the design does not work on my board and I have no idea why.  Why can't there be one directory (or file) that holds everything for a project?  It seems like there should be some kind of migration assistant that can help in moving from one computer to another.  I am very frustrated with the system as it is taking me days to just get up on running on a new computer.
    Sheldon
    Hold on...I am now thinking there was something wrong with the files I copied...don't respond yet
Reply
  • Hi Runar,
    I shouldn't have been so excited about my solution because I am now finding that there are still problems.  Somehow when I copy the entire path from the previous computer, it still is missing some configurations or settings.  I had two builds on my old computer and neither of them show up on my new computer.  Where did they go?!   I then created another build configuration and I was able to get the design be built.  However, the design does not work on my board and I have no idea why.  Why can't there be one directory (or file) that holds everything for a project?  It seems like there should be some kind of migration assistant that can help in moving from one computer to another.  I am very frustrated with the system as it is taking me days to just get up on running on a new computer.
    Sheldon
    Hold on...I am now thinking there was something wrong with the files I copied...don't respond yet
Children
  • Hi 

    I'm sorry to hear that. How had you set up your environments? I think the easiest way would be that you on the orignal computer generate a cmake preset file, which you can generate by selecting the save configuration as preset. 

    Which will generate a file looking something like this

    {
        "version": 2,
        "cmakeMinimumRequired": {
            "major": 3,
            "minor": 20
        },
        "configurePresets": [
            {
                "name": "build_1",
                "displayName": "Build for NRF5340 DK NRF5340 application MCU",
                "generator": "Ninja",
                "binaryDir": "${sourceDir}/build_1",
                "cacheVariables": {
                    "NCS_TOOLCHAIN_VERSION": "NONE",
                    "BOARD": "nrf5340dk_nrf5340_cpuapp",
                    "CACHED_CONF_FILE": "$env{ZEPHYR_BASE}/../nrf/samples/bluetooth/mesh/chat/prj.conf",
                    "hci_ipc_EXTRA_CONF_FILE": "$env{ZEPHYR_BASE}/../nrf/subsys/bluetooth/mesh/hci_ipc_child_image_overlay.conf;$env{ZEPHYR_BASE}/../nrf/subsys/partition_manager/partition_manager_enabled.conf"
                }
            }
        ]
    }

    I normally use git for version control so I would include this file in the version control and exclude the build folder as that is not something you need to transfer to the new computer. On the new computer just download the SDK and extentions as normal. Clone your project from git and open it in VScode. 

    When you create a new build configuration you should now see the option to use the Pre-fill from preset

    Regards

    Runar

  • I would like to use version control but I don't see any examples.  I do not understand how I would clone my project from git (or how to get it there in the first place).

  • Hm okey. It should be enough to generate the cmake preset file and copy over the whole project folder to the new computer. 

    I would not bother with copying the build folder as you will generate it next time you build your application. 

    In regards to git i would suggest starting by watching the Visual Studio Code's Using Git with Visual Studio Code. Git might be a bit overwhelming at the start but I would say it's a lifesaver. You do not need to use git from VScode, I personally prefer to just use the terminal but that is just me. 

    Regards

    Runar

  • Hi Runar,

    I'm sorry to say but I think that I am going backwards.  I tried to set up the GITHUB account (I never got to a pointer where I could 'commit' any code') and now my design no longer works on the original computer.  I think I must have screwed something up in the original design, but I am not sure what.  

    I still can get previous versions of my code working but they are from like 3 months ago and that would be a lot of time that I would lose.

    I don't think there is anything that can do that would be able to help me.

  • Hi Sheldon

    Why don't you try to explain a bit what is happening and we can se if we can manage to help you. 

    Lets not focus on git for a second and rather focus on the code. What changes have you done to the code and which errors do you get? You can also upload the project and I can have a look. If you want that we can set the case to private

    Regards

    Runar

Related