[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Erlang NIF library

Erlang NIF library

Erlang NIF library

Postby mafleming » Thu Feb 19, 2015 11:45 pm

Hello all,

I have an Erlang NIF (Natively Implemented Functions) library that provides all of the functions available in the Epiphany eHAL library. You can use it to write the main program communicating with the Epiphany chip in Erlang. There are some demonstration programs with the package and some edoc documentation.

As an example, one of the demos spawns an Erlang process for each Epiphany core. Each process loads a program to the core and returns the program result to its parent process. Another demo shows how to use an Erlang Escript to program the Epiphany. Although the demos are written in Erlang, the program running on the core still needs to be programmed in C.

I wanted to gauge interest among those in the forum for the source code and get an idea (from the moderator?) on how to make the code available.

Thanks!

maf
mafleming
 
Posts: 6
Joined: Tue Feb 17, 2015 11:03 pm

Re: Erlang NIF library

Postby greytery » Fri Feb 20, 2015 10:12 am

+1

Very much an Erlang novice, but I'm interested in your NIF library.
Can you describe more about dependencies, etc? e.g. mini-Erlang, ...?

When it's 'ready' I suggest it could end up @ - but 9600 can best advise.

Cheers,
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: Erlang NIF library

Postby mafleming » Fri Feb 20, 2015 3:55 pm

I've built and tested the NIF library with the standard Linaro distribution of Erlang. Nothing special required there. As with regular C main implementations, you need to run as root and the environment variables need to point to the location of the e-hal.so library. There is also some information on communicating between say an Erlang node on your workstation and the one running on your Parallella board.

maf
mafleming
 
Posts: 6
Joined: Tue Feb 17, 2015 11:03 pm

Re: Erlang NIF library

Postby aolofsson » Sun Feb 22, 2015 7:24 pm

maf,

Very cool indeed!! Note that with the new beta SDK (which is really supposed to be as stable as the old SDK, but with less actual miles), you don't need to run as root.

We are working on a new library, and we are making wrappers a first order concern from day one. Here is the place we have in mind for them.

https://github.com/parallella/pal/tree/ ... ers/erlang

Also, if you have an example showing how the NIF would be used, the best place for it would be here:

https://github.com/parallella/parallella-examples

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Erlang NIF library

Postby 9600 » Mon Feb 23, 2015 10:24 am

+1. This sounds very cool indeed!

I suspect OmerK may have some comments and I'll ping him, but IIRC he could be traveling at present so may not reply straight away.

Cheers,

Andrew
Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: Erlang NIF library

Postby mafleming » Mon Feb 23, 2015 5:54 pm

Andreas,

The wrapper location looks like just the place to put the NIF library. I currently have files arranged in a directory structure as they would be for an Erlang application (src, bin and so on). What remains to be done is pasting in a standard license text to each source file, and converting the HTML documentation to a PDF document for easier reading.

Since you mentioned the Parallella examples github location, would the directions for submitting the files to the wrapper location be the same as described for the examples location?

Thanks,
maf
mafleming
 
Posts: 6
Joined: Tue Feb 17, 2015 11:03 pm

Re: Erlang NIF library

Postby mafleming » Wed Mar 04, 2015 11:47 pm

All,

The Erlang NIF library "Erlpiphany" has been loaded into the wrappers/erlang section of the parallella/pal tree. You'll find it at



There is documentation in HTML and PDF format providing instructions on how to build and use the library to write your own main drivers. There are also examples to get you started. I look forward to testing the release with the new SDK when it is released. As always, feedback is appreciated.

Happy coding!
~maf
mafleming
 
Posts: 6
Joined: Tue Feb 17, 2015 11:03 pm

Re: Erlang NIF library

Postby rsneekes » Sun Mar 22, 2015 4:44 pm

rsneekes
 
Posts: 4
Joined: Mon Dec 17, 2012 3:23 am

Re: Erlang NIF library

Postby mafleming » Thu Apr 02, 2015 2:41 pm

Thanks Raymond. I've been waiting for the dust to settle on the new release before trying a build. Good to see there's so little to change!

~ Mark
mafleming
 
Posts: 6
Joined: Tue Feb 17, 2015 11:03 pm


Return to Erlang

Who is online

Users browsing this forum: No registered users and 2 guests

cron