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

How to set up GCC and Eclipse for development on the beacon kit

Hi,

I am looking to select a bluetooth chip for a new project, one of the criteria is access to free development tools. I see that in the SDK GCC is supported. But: how do I set this up? Is there some guidelines or user manual? And what is this soft device? Is there a step by step tutorial or something to get started? I would like to start off from the beacon example, and from there on add things, like communication to an SPI device from the microcontroller.

Any help is very welcome, find it very difficult to find an entry point...

Parents Reply Children
  • Hi Nguyen, Your blog has given me a lot of insight so far. Have installed all the plugins, tool chain, and did all the recommended settings as from the GNU ARM Eclipse website.

    I now try to build the EHAL and CMSIS library projects first. When trying to build the CMSIS project, I get 2 warnins on include paths that are not found, although they are there, and I put them in the right place - as the nrf51_sdk directory name is not the original name but I had to rename it, could that be the reason? Following paths were not found: Invalid project path: Include path not found (CMSIS/CMSIS/include) Invalid project path: Include path not found (nrf51_sdk/components/drivers_nrf/hal)

    Or is this error due to the way I imported the project? I have done the import by doing Import>General>Existing projects into workspace> then chose the indicated workspace directory as root directory, and selected all the projects it found. Was that the right way ?

    But apparently the library was built ok, only warnings.

    However, when building the EHAL project, I do get an error on a file not found: nrf51.h. This file resides in the nrf51_sdk/components/drivers_nrf/hal directory, so here, the warning causes an error.

    Furthermore, I do not have the sub directories -- nrf51422 and -- nrf51822 in the SDK I downloaded from then nordic website (SDK version 7). Do I need them? And then, I am not sure how I can port your projects to the Beacon kit hardware just yet, can you point me where to start?

  • The CMSIS Path, because you have not downloaded the CMSIS library from ARM and put in the source tree. There is a link to download the CMSIS on the EHAL page. It is general for all ARM development. The missing nrf51 path is because of the new SDK 7. All the source tree of the new SDK have changed. The projects are updated with SDK7. You'll need to change the path to location where you put the SDK. Importing existing project is fine. The SDK7 is very messy with include files all over the places. The folder nrf51422 and nrf51822 are the old SDK6.

    I did put the precompiled CMSIS & EHAL lib in github. For quick start, you don't need to compile them. For long term, it may be best to get them compiled on your system.

  • I did download the CMSIS library, and did put them in the source tree, as discussed on your blog. But there seems to be something wrong with the expansion of the path using the workspace_loc path variable. Is it important where I put the workspace? I put it in a sub directory of my Documents folder on Mac - is this a path which might conflict? I haven't tried the precompiled libs yet, but I agree that it would be best to have the compilation ok. My guess is that the other projects will also not compile because of the same path issues. I will give that a try and get back. Anyway, many thanks for the quick reply. It's very helpful!

  • The path used is relative to the workspace location. "${workspace_loc:}/../../CMSIS/CMSIS/include". It is based on the workspace being in the source tree. I have indicated where the workspace should be. Since your workspace is at different location you'll need to adjust the path based on your location.

  • I think I might have confused you: I did set the workspace in Eclipse as you discussed, so to the nRF51 directory. What I meant was, where should I put the source tree. I tried now to start completely from scratch, so:

    • check out the repository from Github
    • copy the downloaded CMSIS and nRF SDK to the position in the source tree as you suggested
    • select the nRF51 directory as workspace directory
    • imported existing projects.

    On each of the projects, a warning is given on the includes directories; however, when I try to compile the CMSIS library, it does compile it properly, so the makefile does find the paths, and they are expanded correctly. So the problem is in Eclipse really. I read some things about the colon (:) working fine on Windows, but not in Linux. On what system did you develop this? I was guessing also on Mac, as you seemed quite knowledgable about this? I also read something about paths which are outside the tree of the workspace - the CMSIS directory is like that - that that might give problems. Any ideas?

Related