Jump to content

GNU Scientific Library Compilation Error with Energia 15 for CC3200

Recommended Posts


         I am doing wavelet transformation in C code using GSL-2.1 Library. I have done it successfully in CCSv6.1 with TI v16.3.0 STS compiler.  My most of the other codes are in Energia since I have found it very easy to use. Now I am trying to interface GSL-2.1 with Energia but getting some errors. Let me explain first how I am adding library to Energia 

  1. Downloaded GSL lib from here  and extracted it.
  2. copied all .h files in new folder GSL_wavelet as well as in new gsl folder
  3. copied all c files related to wavelet and linked files in GSL_wavelet
  4. then paste GSL_wavelet in cc3200/libraries and placed gsl folder in energia-0101E0015\hardware\cc3200\cores\cc3200 folder

then wrote the following code to test the DWT

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_test.h>
#include <gsl/gsl_wavelet.h>
#include <gsl/gsl_wavelet2d.h>
#include <gsl_wavelet.h>

gsl_wavelet *w;
gsl_wavelet_workspace *work;
w = gsl_wavelet_alloc(gsl_wavelet_daubechies,4);
work = gsl_wavelet_workspace_alloc(256);

void setup()


void loop()


 it is very simple code. I wrote it only for test whether lib is working or not. The files which I copied in libraries is same as which are working with CCSv6.1, however, I am getting following error 

[C:\Users\LaxmiKant\OneDrive\Project\energia-0101E0015\hardware\tools\lm4f\bin\arm-none-eabi-g++, -c, -Os, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=15, -IC:\Users\LaxmiKant\OneDrive\Project\energia-0101E0015\hardware\cc3200\cores\cc3200, -IC:\Users\LaxmiKant\OneDrive\Project\energia-0101E0015\hardware\cc3200\variants\launchpad, -IC:\Users\LaxmiKant\OneDrive\Project\energia-0101E0015\hardware\cc3200\libraries\wavelet, C:\Users\LAXMIK~1\AppData\Local\Temp\build1071701420128820851.tmp\dwt2.cpp, -o, C:\Users\LAXMIK~1\AppData\Local\Temp\build1071701420128820851.tmp\dwt2.cpp.o]
dwt2.ino:19:1: error: 'w' does not name a type
dwt2.ino:20:1: error: 'work' does not name a type

perhaps I need some modification to make it working with Energia but I am clueless. Any help would be appreciated.   


Link to post
Share on other sites

You have code outside of functions. Try moving the lines starting with w= and work= into setup.

Thanks. It was the silly mistake. I have moved it in setup(). Now I am getting linking errors

dwt2.cpp.o: In function `setup':
dwt2.cpp:(.text.setup+0x8): undefined reference to `gsl_wavelet_alloc'
dwt2.cpp:(.text.setup+0x14): undefined reference to `gsl_wavelet_workspace_alloc'
dwt2.cpp:(.text.setup+0x20): undefined reference to `gsl_wavelet_daubechies'
collect2.exe: error: ld returned 1 exit status

Any help??

Link to post
Share on other sites


added corresponding files in the search path now getting following errors

C:\Users\LaxmiKant\OneDrive\Project\energia-0101E0015\hardware\cc3200\cores\cc3200\driverlib\libdriverlib.a, -lm, -lc, -lgcc, -LC:\Users\LAXMIK~1\AppData\Local\Temp\build1071701420128820851.tmp, -lm]
c:/users/laxmikant/onedrive/project/energia-0101e0015/hardware/tools/lm4f/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-abort.o): In function `abort':
abort.c:(.text.abort+0xa): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status

When I imported Energia project in CCSv6.1, getting same error as above. 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...