Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Properly update nrf SDK to 14.2 in Keilv5

Hi, 

I have spent a couple of days trying to find formal documentation on how to update the nrf SDK. I am currently on 11 (as keil pack installer states the version of the examples pack is) and need to get to 14.2. I have already downloaded the .zip. I tried copying the folders over, but Keilv5 does not pick up on this. Any ideas?

Parents
  • Preface: Don't worry about Nordic/Keil packs. The ones in Keil are old and Nordic gave up on supporting them. Short version is there are three components. The SDK, Softdevice, and BSP/FamilyPack. The FamilyPack is the one that is still available via Keil, but also with the SDK, this is the startup code and some chip support stuff. You won't use the RTE for Nordic projects. The only thing that should be clicked in Keil RTE is CMSIS and Startup. Consider this what Nordic calls "NO PACKS" Keil projects, it's in their Keil V5 example file names.

    Keil RTE "no packs"

    Notice that pic is for 8.15.0, I think 8.15.2 is the latest. Use the Pack Selector to get the right Device Family Pack, then re-select in RTE.

    So if you aren't going to use packs you'll need to handle the import of files into your project manually. Here is what worked well for me....

    1. Git on git, git it? I know, it was lame but seriously, get used to using GIT. It's going to help you a lot.  Use GitHub Desktop app and GitHub/GitLab/Bitbucket/Whatever they all run about the same interface so far as you are concerned. GitLab has free private accounts if you're just starting out. GIT is not just for teams.

    2. Download the SDK, latest as of right now is v14.2, and pick your softdevice, I'm using S132 v5.1.0.

    3. Now, here is where some people disagree but I've tried it a few ways and I like it, and where GIT will help... Extract your SDK to your /Project/ folder somewhere, now make your application and bootloader folders near it. Basically, extract the SDK once, never modify it and build your projects using GIT so that you can quickly roll to and from different versions. This will keep a KNOWN GOOD copy of your SDK all to itself for this project, the downside is your have 10 copies of the SDK if you have 10 nordic projects - but - you always have independent projects that will build on any machine. You could roll a new project to SDK v19 next week (almost literally, bad Nordic!) and have a constant copy of v14 that will build on any system you sit down at and clone the GIT repo to.

    So I have something like this....

    /Project/application

    /Project/bootloader

    /Project/External/Nordic/SDK

    4. You'll need to make the paths right. If you're using examples, I recommend just using them from the SDK as they are already Path'ed correctly. But your own projects you'll probably want to grab the examples and modify the paths to fit your structure. There are two parts to correcting paths. Making sure the project has the right c files in Keil's right side view, and that the include paths are listed out. This can be tedious but is pretty much required. Do the work, it'll pay off.

    Nordic Keil includes

    5. If you need some help with paths... the ../ is one directory back. So for me, I have

    PROJECT\Application\pca10040\s132\arm5_no_packs\projectfile

    PROJECT\External\NORDIC\SDK

    So I need to go 4 directories backwards and three up (external/nordic/sdk/) to get to the SDK folder. That's why you see ../../../../External/Nordic/SDK. Use the browse to file part in the include window to figure out your paths. You'll get it. You could use GIT or not and just have one SDK folder all your projects use. I don't really recommend it, esp if you want to work at different machines or have people join on to help for something.

    Now, when you want to take your project and add all the RTT files to it - you're going to have trouble for awhile. Mainly that Nordic is pretty bad about telling you what X driver or Y file will require. For our RTT example, you'll need Segger_RTT files, but you'll need the ones from the SDK. And you're also going to need NRF_LOG files, and maybe Nordic balloc files, and maybe etc. Best thing I can tell you is pay attention to your build window on errors and check the working examples to see what they are doing that you aren't. Bring in the C files you need, set the paths - and imagine your surprise when you sit down at a laptop or other PC or wherever, clone the repo and it builds right away without having to re-adjust paths for that new machine!

    I paid a little more money to get on Keil because the packs work well when they work well. Now I'm not using them. That's a problem with Keil, ARM, and Nordic - but I can tell you it's still better than other options.

    Good luck on it. There isn't a lot of hand holding on this stuff. ASK NORDIC QUESTIONS. Maybe it'll convince them to write some more explicit documentation on dependencies, packs, and tutorials.

Reply
  • Preface: Don't worry about Nordic/Keil packs. The ones in Keil are old and Nordic gave up on supporting them. Short version is there are three components. The SDK, Softdevice, and BSP/FamilyPack. The FamilyPack is the one that is still available via Keil, but also with the SDK, this is the startup code and some chip support stuff. You won't use the RTE for Nordic projects. The only thing that should be clicked in Keil RTE is CMSIS and Startup. Consider this what Nordic calls "NO PACKS" Keil projects, it's in their Keil V5 example file names.

    Keil RTE "no packs"

    Notice that pic is for 8.15.0, I think 8.15.2 is the latest. Use the Pack Selector to get the right Device Family Pack, then re-select in RTE.

    So if you aren't going to use packs you'll need to handle the import of files into your project manually. Here is what worked well for me....

    1. Git on git, git it? I know, it was lame but seriously, get used to using GIT. It's going to help you a lot.  Use GitHub Desktop app and GitHub/GitLab/Bitbucket/Whatever they all run about the same interface so far as you are concerned. GitLab has free private accounts if you're just starting out. GIT is not just for teams.

    2. Download the SDK, latest as of right now is v14.2, and pick your softdevice, I'm using S132 v5.1.0.

    3. Now, here is where some people disagree but I've tried it a few ways and I like it, and where GIT will help... Extract your SDK to your /Project/ folder somewhere, now make your application and bootloader folders near it. Basically, extract the SDK once, never modify it and build your projects using GIT so that you can quickly roll to and from different versions. This will keep a KNOWN GOOD copy of your SDK all to itself for this project, the downside is your have 10 copies of the SDK if you have 10 nordic projects - but - you always have independent projects that will build on any machine. You could roll a new project to SDK v19 next week (almost literally, bad Nordic!) and have a constant copy of v14 that will build on any system you sit down at and clone the GIT repo to.

    So I have something like this....

    /Project/application

    /Project/bootloader

    /Project/External/Nordic/SDK

    4. You'll need to make the paths right. If you're using examples, I recommend just using them from the SDK as they are already Path'ed correctly. But your own projects you'll probably want to grab the examples and modify the paths to fit your structure. There are two parts to correcting paths. Making sure the project has the right c files in Keil's right side view, and that the include paths are listed out. This can be tedious but is pretty much required. Do the work, it'll pay off.

    Nordic Keil includes

    5. If you need some help with paths... the ../ is one directory back. So for me, I have

    PROJECT\Application\pca10040\s132\arm5_no_packs\projectfile

    PROJECT\External\NORDIC\SDK

    So I need to go 4 directories backwards and three up (external/nordic/sdk/) to get to the SDK folder. That's why you see ../../../../External/Nordic/SDK. Use the browse to file part in the include window to figure out your paths. You'll get it. You could use GIT or not and just have one SDK folder all your projects use. I don't really recommend it, esp if you want to work at different machines or have people join on to help for something.

    Now, when you want to take your project and add all the RTT files to it - you're going to have trouble for awhile. Mainly that Nordic is pretty bad about telling you what X driver or Y file will require. For our RTT example, you'll need Segger_RTT files, but you'll need the ones from the SDK. And you're also going to need NRF_LOG files, and maybe Nordic balloc files, and maybe etc. Best thing I can tell you is pay attention to your build window on errors and check the working examples to see what they are doing that you aren't. Bring in the C files you need, set the paths - and imagine your surprise when you sit down at a laptop or other PC or wherever, clone the repo and it builds right away without having to re-adjust paths for that new machine!

    I paid a little more money to get on Keil because the packs work well when they work well. Now I'm not using them. That's a problem with Keil, ARM, and Nordic - but I can tell you it's still better than other options.

    Good luck on it. There isn't a lot of hand holding on this stuff. ASK NORDIC QUESTIONS. Maybe it'll convince them to write some more explicit documentation on dependencies, packs, and tutorials.

Children
No Data
Related