Git Product home page Git Product logo

fruitymesh-devenv's Introduction

Introduction

This is the installation packet for Windows, Linux and OSX machines.

This repository includes:

  • Eclipse Mars (Windows only)
  • ARM CMSIS library 4.3
  • The EHAL from https://github.com/I-SYST/EHAL
  • GCC ARM embedded 4.9 (compiled for Windows, Linux and OSX)
  • GNU ARM Eclipse Build Tools 2.4

Sadly, some of the tools have a restricted licence which does not allow redistribution. This is why you have to manually download some components.

In order to set up your development machine for developing with FruityMesh, you have to follow these steps:

Installation

1. Clone this repository

Clone this repository or download it as a zip package and put its contents to C:\nrf\ (Linux: /home/(your username)/nrf, OSX: /Users/(your username)/nrf) This should give you the following folder structure:

C:\nrf\
├──  doc\           - some documentation
├──  download\      - generic download folder for sdk stuff
├──  projects\      - the folder where you will create your projects
├──  sdk\           - all sdk files
├──  softdevices\   - binary files for the softdevices that are used
├──  tools\         - installation path for additional tools or links to these tools
└──  workspace\     - this is where you set your Eclipse workspace

2. Install additional stuff

Some tools could not be distributed in this package and have to be downloaded manually, these are:

You should install these tools to their default installation path.

3. Download the nRF51 SDK

You must also download the latest nRF51 SDK 11.0.0 from this location: nRF51 11.0.0 SDK: https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v11.x.x/

Put the unzipped sdk files under ./sdk/nrf_sdk_11_0 so that the folder contains components, documentation, etc...

Fix some of the SDK files

This step is important, because there are bugs in the SDK: You must now edit the file nrf_svc.h. It can be found in ./sdk/nrf_sdk_11_0/components/softdevice/s130/headers.

Change a uint8_t cast to uint16_t around line 55. Afterwards it should look somthing like this:

#define GCC_CAST_CPP (uint16_t)

Next, you should follow this forum post: https://devzone.nordicsemi.com/question/71636/ble_radio_notification-wont-compile/ and replace the radio_notification module files with these versions. The SDK files have errors and do not compile.

4. Download the S130 softdevice

Download the production Release of the S130 v2.0 SoftDevice and place the hex file in the folder: ./softdevices/sd130_2.0.0-prod

S130: https://www.nordicsemi.com/eng/Products/nRF51-Dongle#Download

5. Edit the setup.bat file (Windows) or the setup.sh file (Linux & OSX)

You should now open the setup.bat or setup.sh file in a text editor of your choice and configure all the paths at the beginning of the script so that they point to the correct directories. After you have done that, you can start developing.

6a. Windows: Open Eclipse and start developing

Open eclipse which is located under C:\nrf\tools\eclipse_mars and set your Workspace directory to C:\nrf\workspace. You might have to import the fruitymesh project from C:\nrf\projects\fruitymesh and then you should be ready to go.

6b. Linux & OSX: Open Eclipse and start developing

For FruityMesh, a custom build script is provided for Linux and OSX. If you chose to clone FruityMesh when executing the setup.sh script, the build script is located in ${HOME}/nrf/projects/FruityMesh/compile.sh. Once executed, it will compile any C/C++ files and create a flashable HEX file in the Debug folder. For your own projects, you can just copy it and modify the include paths.

For developing, you may use any IDE you like. Unfortunately, there is no Eclipse package provided which will compile the project for you on Linux and OSX, so when developing on these platforms, you may code using your favorite IDE and compile using the provided compile script.

6b. Development using an Ubuntu VM

You can set up an Ubuntu VM with all needed infrastructure using this repo.

fruitymesh-devenv's People

Contributors

ihassin avatar mariusheil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fruitymesh-devenv's Issues

No rule to make target 'src/nrf/Vectors_nRF51.o', needed by 'FruityMesh.elf'. Stop.

Hello,

I am trying to build FruityMesh.
I followed all the steps.
I added the path for the make file. But when I tried to build it i got this error:

No rule to make target 'src/nrf/Vectors_nRF51.o', needed by 'FruityMesh.elf'. Stop.

This was what the console said:
How can I fix this issue?
`Finished building: C:/nrf/sdk/nrf51_sdk_latest/components/ble/ble_radio_notification/ble_radio_notification.c

make: *** No rule to make target 'src/nrf/Vectors_nRF51.o', needed by 'FruityMesh.elf'. Stop.
make: *** Waiting for unfinished jobs....
Building file: C:/nrf/sdk/nrf51_sdk_latest/components/softdevice/common/softdevice_handler/softdevice_handler.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -flto -fno-move-loop-invariants -Wextra -g -DBLE_STACK_SUPPORT_REQD -DDEBUG -DBOARD_PCA10031 -DNRF51 -D__need___va_list -IC:/nrf/projects/fruityloader/DFUModule -IC:/nrf/projects/fruitymesh/inc -IC:/nrf/projects/fruitymesh/inc_ustl -IC:/nrf/projects/fruitymesh/inc_c -IC:/nrf/projects/fruitymesh/src -IC:/nrf/projects/fruitymesh/config -IC:/nrf/sdk/ehal_latest/include -IC:/nrf/sdk/ehal_latest/ARM/CMSIS/CMSIS/Include -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/src -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/CMSIS/include -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/delay -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/hal -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/softdevice/s130/headers/nrf51 -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/config -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/examples/bsp -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_services/ble_hids -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_radio_notification -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/device -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/gpiote -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_debug_assert_handler -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/ble_flash -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_error_log -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/pstorage -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/trace -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/softdevice/common/softdevice_handler -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/timer -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/softdevice/s130/headers -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/drivers_nrf/nrf_soc_nosd -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/bootloader_dfu -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/util -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/scheduler -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/common -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/device_manager -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/libraries/bootloader_dfu/ble_transport -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_services/ble_bas -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_services/ble_dfu -IC:/nrf/sdk/ehal_latest/ARM/Nordic/nRF51/nrf51_sdk/components/ble/ble_services/ble_dis -std=gnu99 -MMD -MP -MF"src/nrf51/softdevice_handler.d" -MT"src/nrf51/softdevice_handler.o" -c -o "src/nrf51/softdevice_handler.o" "C:/nrf/sdk/nrf51_sdk_latest/components/softdevice/common/softdevice_handler/softdevice_handler.c"
Finished building: ../src/test/Testing.cpp
Finished building: C:/nrf/sdk/nrf51_sdk_latest/components/libraries/timer/app_timer.c

Finished building: C:/nrf/sdk/nrf51_sdk_latest/components/drivers_nrf/pstorage/pstorage.c

Finished building: C:/nrf/sdk/nrf51_sdk_latest/components/softdevice/common/softdevice_handler/softdevice_handler.c

09:43:10 Build Finished (took 14s.464ms)
`

Kind regards.

Eclipse build error

Hi There

This is awesome, thank you! I am getting the following error when I try to build-

"make: *** No rule to make target 'C:/nrf/sdk/nrf_sdk_8_1/components/ble/ble_radio_notification/ble_radio_notification.c', needed by 'src/nrf/ble_radio_notification.o'. Stop. FruityMesh C/C++ Problem"

I don't suppose you would know how I could fix this?

Thx Darryl

Flashing binary fails

Hi, I had some problems setting up the environment in windows for eclipse as mentioned in issue #6 (comment). So I started digging in other options. I saw that it is possible to compile the project in ubuntu too using the arm-gcc compiler. I intalled it by calling sudo apt-get install gcc-arm-none-eabi and I got it compiled calling "make" in the project/fruitymesh folder. When the compiler finished it said:

 --------------------------------------------------------------
  Board:      NRF51_BOARD
  Platform:   NRF51
  Build type: debug

   text	   data	    bss	    dec	    hex	filename
  76607	    296	   5028	  81931	  1400b	_build/debug/NRF51_BOARD/FruityMesh.out
 --------------------------------------------------------------

I assumed that the FruityMesh.out is the binary. Then I read that just dropping the hex in the JLINK device that appears when I plug the device automatically flashed it. I tried this method before with a binary I compiled using https://developer.mbed.org and it worked. but now when I do it with the binary I have just generated it creates a file called FAIL that says Error during flash operation

I am using the nRF51 DONGLE so the first thing I though was that I need to set somewhere that I am using this device istead of the NRF51_BOARD (that I assume that is the development kit). I found that it is specified in the beggining of the Makefile:

PROJECT_NAME ?= FruityMesh
BUILD_TYPE   ?= debug
BOARD        ?= NRF51_BOARD <<<---------------------------
VERBOSE      ?= 0

I am not sure what else to do now, I cant find a list of possible BOARDS and I am not sure if that is really the problem.

Thanks in advance

Error: impossible constraint in 'asm'

Hi There

I am getting the following errors -
impossible constraint in 'asm' FruityMesh line 1348, external location: c:\nrf\sdk\ehal_latest\arm\nordic\nrf51\nrf51_sdk\components\softdevice\s130\headers\ble_gap.h C/C++ Problem
lto-wrapper failed FruityMesh C/C++ Problem
make: *** [FruityMesh.elf] Error 1 FruityMesh C/C++ Problem
recipe for target 'FruityMesh.elf' failed makefile /FruityMesh/Debug line 63 C/C++ Problem

Would be able to help me fix this?

Thx Darryl

Cannot open eclipse

Hello All,

I have followed the tutorial to instal fruity mesh using eclipse.However,when I open eclipse,the notification "an error has occured,see the log null" appear. Am i wrong when following the tutorial?

Compiling errors

Hey,

after initializing your project multiple times as shown in the installation briefing i am not able to get it compiled without any errors.
We have fixed a lot of errors by including serveral header files which were missing.
The following errors are still remaining:

Description	Resource	Path	Location	Type
Field 'logt("NODE", "Initializing Softdevice version 0x%x, Board %d", SD_FWID_GET(MBR_SIZE), Config->boardType)' could not be resolved	Main.cpp	/FruityMesh/src	line 259	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Field 'SET_BOARD()' could not be resolved	Main.cpp	/FruityMesh/src	line 91	Semantic Error
Function 'nrf_delay_us' could not be resolved	Main.cpp	/FruityMesh/src	line 351	Semantic Error
Function 'nrf_delay_us' could not be resolved	Main.cpp	/FruityMesh/src	line 368	Semantic Error
Function 'nrf_delay_us' could not be resolved	Main.cpp	/FruityMesh/src	line 394	Semantic Error
Function 'NVIC_SystemReset' could not be resolved	Main.cpp	/FruityMesh/src	line 354	Semantic Error
Function 'NVIC_SystemReset' could not be resolved	Main.cpp	/FruityMesh/src	line 370	Semantic Error
Function 'NVIC_SystemReset' could not be resolved	Main.cpp	/FruityMesh/src	line 396	Semantic Error
Invalid arguments '
Candidates are:
? app_timer_init(?, unsigned char, void *, ? (*)(void (*)(void *), void *))
'	Main.cpp	/FruityMesh/src	line 498	Semantic Error
Invalid arguments '
Candidates are:
? app_timer_start(app_timer_t *, ?, void *)
'	Main.cpp	/FruityMesh/src	line 503	Semantic Error
Invalid arguments '
Candidates are:
? nrf_gpio_pin_read(?)
'	Main.cpp	/FruityMesh/src	line 541	Semantic Error
Invalid arguments '
Candidates are:
? sd_nvic_ClearPendingIRQ(?)
'	Main.cpp	/FruityMesh/src	line 234	Semantic Error
Invalid arguments '
Candidates are:
? softdevice_sys_evt_handler_set(void (*)(?))
'	Main.cpp	/FruityMesh/src	line 278	Semantic Error
Invalid arguments '
Candidates are:
unsigned long int nrf_drv_gpiote_in_init(?, const {nrf_drv_gpiote.h:945} *, void (*)(?, enum {nrf_gpiote.h:963}))
'	Main.cpp	/FruityMesh/src	line 530	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 233	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 235	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 240	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 273	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 279	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 311	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 316	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 320	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 324	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 498	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 501	Semantic Error
Invalid arguments '
Candidates are:
void app_error_handler_bare(unsigned long int)
'	Main.cpp	/FruityMesh/src	line 504	Semantic Error
Invalid arguments '
Candidates are:
void nrf_drv_gpiote_in_event_enable(?, bool)
'	Main.cpp	/FruityMesh/src	line 533	Semantic Error
Symbol 'SD_EVT_IRQn' could not be resolved	Main.cpp	/FruityMesh/src	line 234	Semantic Error

Thanks in advance

Eclipse crash

I followed the readme. When I got to the state where I should open Eclipse I get

An error has occured. See the log file.

and the log file is:

!SESSION 2016-03-31 07:50:49.572 -----------------------------------------------
eclipse.buildId=4.5.2.M20160212-1500
java.version=1.8.0_77
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB

!ENTRY org.eclipse.osgi 4 0 2016-03-31 07:50:49.895
!MESSAGE Error reading configuration: ReliableFile is corrupt
!STACK 0
java.io.IOException: ReliableFile is corrupt
    at org.eclipse.osgi.framework.internal.reliablefile.ReliableFile.getInputStream(ReliableFile.java:334)
    at org.eclipse.osgi.framework.internal.reliablefile.ReliableFileInputStream.<init>(ReliableFileInputStream.java:92)
    at org.eclipse.osgi.framework.internal.reliablefile.ReliableFileInputStream.<init>(ReliableFileInputStream.java:66)
    at org.eclipse.osgi.storagemanager.StorageManager.updateTable(StorageManager.java:487)
    at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
    at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1768)
    at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1785)
    at org.eclipse.osgi.storage.Storage.<init>(Storage.java:128)
    at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:87)
    at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:75)
    at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:295)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

When I try to run an original version of C/C++ Eclipse Mars, it runs smoothly. I use Win7 x64. Any idea how to make eclipse work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.