Author Topic: Recompiling the GZLL library  (Read 2346 times)

VLorz

  • RFduino Full Member
  • ***
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Recompiling the GZLL library
« on: August 26, 2015, 01:28:38 AM »
Hi,

I need to change some default parameters in the GZLL implementation, like the NRF_GZLL_DEFAULT_MAX_TX_ATTEMPTS so the stack does not use infinite retransmits on failure and calls the nrf_gzll_device_tx_failed() callback when transmission fails.

How should I do it? I have downloaded and installed SDK version v4.4.2.33551. My workstation is Windows 7 64bits, RFDuino 2.3.1

VLorz

  • RFduino Full Member
  • ***
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Re: Recompiling the GZLL library
« Reply #1 on: August 28, 2015, 04:41:18 AM »
Can some help, please, with this?

jetty

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Recompiling the GZLL library
« Reply #2 on: January 11, 2016, 08:16:18 AM »
I've noticed that requests for this have not been replied to and I needed to do the same, so here's a general guideline.

1. Create a folder on a windows machine in your Desktop (I used XP and called the folder "libRFduino"
2. Download the 3 files at: https://github.com/RFduino/RFduino/tree/master/source/libRFduinoGZLL and put them in libRFduino
3. Download nrf51_sdk_v4_4_2_33551.zip from https://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v4.x.x/ and unzip in libRFduino
(couldn't find the 4.2 that the github uses, but 4_4_2 was the closest and seems to work)
4. Download 1.5.8 Beta Windows Installer from: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous  and install in the default (Program Files)
(may work with later versions, but I didn't test as I wanted to compile the libraries and move them over to a Mac)
5. Gradually work through the build.bat fixing all paths until you get it compiling, when you run build.bat from the command line (note the ARM C
compiler is located in the Arduino you just downloaded).  You will also encounter compile errors that require adding additional includes.  There's likely a cleaner way
of doing this part, but
6. When successful, libRFduino/_build contains libRFduinoGZLL.a and libRFduino contains libRFduinoGZLL.h     You need to copy those to the Arduino IDE you're using.
If you're using the same windows, then these should have been copied into your Arduino Variants, so should just work.  On the Mac (running Arduino 1.6.7), I needed to copy them to ~/Library/Arduino15/packages/RFduino/hardware/RFduino/2.3.2/variants/RFduino  (backup the old ones just in case)
7. If you're adding/removing functions to the interface, you'll also need to edit ~/Library/Arduino15/packages/RFduino/hardware/RFduino/2.3.2/libraries/RFduinoGZLL     RFduinoGZLL.cpp RFduinoGZLL.h
8. Recompile your arduino .ino for your project.  The .a .h and .cpp .h are all compiled and linked at build time, no need to restart the IDE.

Here's my build.bat based on the above if you need it for a better starting point:

VLorz

  • RFduino Full Member
  • ***
  • Posts: 68
  • Karma: +2/-0
    • View Profile
Re: Recompiling the GZLL library
« Reply #3 on: January 11, 2016, 11:05:04 AM »
My original question was about recompiling the GLL implementation library (the Nordic's one), not libRFduinoGZLL, but unfortunatelly souce code is not (and will not be) available. The libRFduinoGZLL library runs on top of Nordic's library. I'm already using a modified libRFduinoGZLL library, adapted to my needs up to some extent.

Anyway, I think your post is very usefull to others, thanks a lot for sharing it with us.

Regards.

jetty

  • RFduino Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Recompiling the GZLL library
« Reply #4 on: January 11, 2016, 11:07:26 AM »
correct, you can't recompile the nordic sdk, that one we're stuck with.

 

anything