Richard Laurant
Richard Laurant

Reputation: 657

wolfSSL and StellarisWare examples

I want to use the freertos_demo that is part of StellarisWare /TivaWare in combination with wolfSSL library but I find it difficult to read the Makefile (actually the makedefs files).

I downloaded and compiled wolfSSL according to the manual. Now in /usr/local/lib there are the following files:

Now I open makedefs from the StellarisWare root directory and added the folling code to line 160:

LIBS=-lwolfssl Further, I modified lines 246 and 252 which now state the following (both lines are identical; basically I only added '${LIBS}' ):

'${LIBM}' '${LIBC}' '${LIBGCC}' '${LIBS}';

However, when I go to the blinky sub-directory and perform a "make clean; make", I get the following error:

arm-none-eabi-ld: cannot find -lwolfssl

What am I missing?

Best

Upvotes: 0

Views: 198

Answers (1)

Kaleb
Kaleb

Reputation: 611

per the suggestion from @nettrino it looks like /usr/local/lib is not in your system LD_LIBRARY_PATH variable. You could confirm this from a terminal by using this command

echo $LD_LIBRARY_PATH

Do you see /usr/local/lib? If not you can do one of two things.

Option 1: Follow @nettrino's intended suggestion and in the Makefile change the line:

LIBS=-lwolfssl

to

LIBS=-L/usr/local/lib -lwolfssl

Option 2: Edit your .bash_profile (or .bashrc) and add the line:

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

Then reload the terminal to get the updated changes or use the command

source .bash_profile

(or source .bashrc depending on which one you edited)

Then try the same echo command again and do you now see /usr/local/lib in the LD_LIBRARY_PATH?

Upvotes: 1

Related Questions