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...

  • 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?

  • I develop entirely on MAC. by default Eclipse put the "}" at the end like this "${workspace_loc:/../../CMSIS/CMSIS/include}". That causes a problem some time, especially after an import. I had to manually change to "${workspace_loc:}/../../CMSIS/CMSIS/include" where the "{}" should enclose the macro only. There may be some path that still have the default. Try a full path on those you have issues with.

  • I re-entered the paths in the project properties>C/C++ General>Paths and Symbols; all is fine now. Another question: did you push the changes for the SDK7 to the Git hub? For example, the Blinky project, it still points to the old directories of SDK6 I think.

Related