Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Software code Protection

Altera_Forum
Honored Contributor II
1,385 Views

Hi All, 

I want to protect my software code in NIOS IDE.Means whatever i made(*.c and *.cpp) that end user can get the calling function of that. Overall code is abstract from them. 

Just for example if i develope any HAL and i do not want to give the code for that then what would be the best solution? 

 

This is just for example from all of you will get the basic idea that what i want to do? 

 

Like JTAG UART what happend...for accessing JTAG UART we use read and write API of NIOS HAL.And it will call the actuall JTAG UART function. I just want to do same thing but i want to protect the JTAG UART hal.means i call NIOS read and write API and it will call my device's read and write function. The basic thing is that the inner code should be invisible for the user.Thats it!!!!! 

If any one having an idea then let me know... 

Best Regards, 

slsnios
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
667 Views

You can distribute a binary library, without the C source code. We do the same for the demo versions of ERIKA Enterprise (the full version has the source code). 

 

bye 

 

PJ
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

Can u plz give me some more detail information about this? 

Or If u have any link to do this then just follow me...I will be better for mw..Plz do ASAP. 

Best Regards, 

slsnios
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

You can take your code, compile it, and distribute the binaries without the source code... 

 

of course you'll probably need some modifictaion to your makefiles... but that should be not a big problem... 

 

an example is the ERIKA Enterprise demo... you can find it on the Evidence web site. 

 

Paolo
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

Hi paolo 

Thanx for your reply 

I am getting you very well.But when i make binary file then is it possible for any end user to make their programme and use my HAL driver's binary file?? 

So i think if i am able to make a *.so or *.a file then it is possible for me. 

 

I got u,for demo purpose we can go for binary file but what happen when we want for end user that they can also make their own application and run it on our HAL driver and that is without source code..just importing library of our HAL. 

 

Ok I am working on this..If u have any idea then let me know ASAP. 

Best Regards, 

slsnios
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

Hi, 

 

For the HAL, you need a .a, not a .so (it's not Linux :-) ) 

 

and... you can use the .a to build your apps, provided it is distributed ith the right include files! 

 

PJ
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

Thanx 4 reply me Paolo, 

Now i am use *.a file to protect my HAL code. Means i am giving whole library to any other. But one main restriction is there and that is user has never rebuild the library.Otherwise *.a file will re-create and code is lost..M i right?? 

 

Now this is limitation of our or still is there any solution??? 

 

Thanx for giving me such good support.. 

Best Regards, 

slsnios
0 Kudos
Altera_Forum
Honored Contributor II
667 Views

The user should never be able to recompile the library... put it in a SOPCBuilder component... 

 

Paolo
0 Kudos
Reply