Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
957 Views

NiosII

hi 

I have a source code of compression vidéo (h.264 ,jpeg) how is exécutable in visual studio c++,my problem is how to implement this code in NiosII ,how to convert this source code in niosII. thanks in advance.
0 Kudos
68 Replies
Highlighted
Valued Contributor III
10 Views

sounds like you have a lot of work to know. 

 

first of all. 

can you compile simple C-code in NiosII?(Eclipse) 

I mean have you done it? 

 

and then. 

have you tried to compile your code in NiosII?
0 Kudos
Highlighted
Valued Contributor III
10 Views

hi akira,thank you for your answer ,yes i try to compile the code in NiosII but there is many error ,this code permit to compression image , i have 2 code of compression (h.264, and the library openjpeg)this two codes are runnable in visul studio c++,my problem is how to execute this codes in NiosII, plz i need your help. thanks in advance.

0 Kudos
Highlighted
Valued Contributor III
10 Views

hi akira,thank you for your answer ,yes i try to compile the code in NiosII but there is many error ,this code permit to compression image , i have 2 code of compression (h.264, and the library openjpeg)this two codes are runnable in visul studio c++,my problem is how to execute this codes in NiosII, plz i need your help. thanks in advance.

0 Kudos
Highlighted
Valued Contributor III
10 Views

first of all you need a nios-ii, and in eclipse create a application like Hello Word, rename this hello word to your desire name , if you r code won't taking any OS related stuff's make sure you should add all the relevant header file in this project, and copy past you h.264 main file to your application.add related C file also. 

 

the best way is to go through the simple socket example. 

 

you need lot's of memory also so batter to use some high end FPGA  

 

which development board you are using...? 

what are the error's...?
0 Kudos
Highlighted
Valued Contributor III
10 Views

thank you sir ,I use a Altera fpga stratixII ,i download a source code from h.264 from this link ,the error in nios II is  

./block.c:27:20: memory.h: No such file or directory 

make: *** [obj/block.o] Error 1. 

also this code of h.264 support a file (.cfg) so can i converted from extension (.txt) ? because NiosII don't support this type of file(.cfg).thanks in advance.
0 Kudos
Highlighted
Valued Contributor III
10 Views

AFAIK memory.h isn't a standard C library include file so it looks like your source code was designed to be compiled on some targets, but not all. You will find out that most embedded targets, including the Nios II, use C libraries that are much more restrictive than what you find on bigger operating systems. You will probably need to go into each error you have when trying to compile your source and fix your code to me more cross-platform.

0 Kudos
Highlighted
Valued Contributor III
10 Views

thank you Daixiwen, so how can i correct this error memory.h!!! and how to convert a file .cfg suported in this project h.264 to be suproted in NiosII. thanks in advance.

0 Kudos
Highlighted
Valued Contributor III
10 Views

hello again. 

 

as I told you. you need to know a lot of things. 

like Daixiwen says, your code is not for all platform. 

 

I don't think your code can't run on your FPGA ( at least for now) 

you have to do ... 

1. run NiosII software on your FPGA. 

kaushal says run your simple code like "hello world" on your FPGA. 

you have to do this. 

 

2.you have to know who does that. 

you know, Operating Systems help lots of things. 

like saving files, connecting Networks and so on. 

to use those power, there is a lot of libraries. you see C-kind languages like# include <stdio.h> 

when you open file, Operating System does most of work. 

the other hand, NiosII does not have OS as long as you install one.(<- this is tough work ) 

so, many of your include files ( like memory.h) does not work on your FPGA. 

 

my advice is that. 

you need to read each file which gives errors. and modify it for you NiosII. 

or 

installing OS like uClinux on your NiosII. your C++ code may work on your OS. 

 

both of them are a lot of work (I told you.) 

you need guru beside with you. 

if you are student, you have to ask teacher or geek friend ( there must be one lol.) 

if you work in an office, find skilled parson. 

if you work alone, take much time. 

 

actually I want help you. 

but, what we can teach on this page is to solve small problem one by one. 

not tell whole your work. 

your problem is not solved just one action.
0 Kudos
Highlighted
Valued Contributor III
10 Views

hi, thanks for you :), Now i have a project(compression ejpeg) how is suported in Xilinx XUPV2Pro board. my question is what is the modification to do in this project to be suported in fpga altera stratixII.thanks in advance.

0 Kudos
Highlighted
Valued Contributor III
10 Views

OK,  

if you know does XUPV2Pro have OS? -> if so, you need OS on NiosII as well. 

if XUPV2Pro is native code only -> you have to understand what is written in "memory.h" and then creaet (or copy from somewhere) memory.h. 

 

you have to find "what is wrong" first.
0 Kudos
Highlighted
Valued Contributor III
10 Views

There is no general answer to that. Go through the errors one by one and fix them. If you have a missing header file, find out in the original code why this header file was needed, and how you can replace the relevant code in a way that will work on the Nios platform (or even better, change it to portable code).

0 Kudos
Highlighted
Valued Contributor III
10 Views

hi, thanks, no i have a project witch is executable and supported in Xilinx XUPV2Pro board ,my question is what are the steps to execute this project in fpaga Altera stratixII!!!

0 Kudos
Highlighted
Valued Contributor III
10 Views

1) compile it 

2) fix errors
0 Kudos
Highlighted
Valued Contributor III
10 Views

Is it open source code?

0 Kudos
Highlighted
Valued Contributor III
10 Views

hi i add a memory.h in my project but i can't correct this error "/memory.h:24:2:# error ERROR: Only Mac or Win32 targets supported!" so help me plz .thanks in advance. 

.
0 Kudos
Highlighted
Valued Contributor III
10 Views

Well, if you don't want to fix the errors by yourself, probably your best bet is to contact the author/maintainer of the "memory.h" you decided to use and see if they can help you. 

 

It's possible you might be able to pay them to add support for NIOS.
0 Kudos
Highlighted
Valued Contributor III
10 Views

thank you ted, no i can't contact the author/maintainer of the "memory.h" and i can't pay them,my problem is how to correct this error "#error ERROR: Only Mac or Win32 targets supported!"? thanks in advance.

0 Kudos
Highlighted
Valued Contributor III
10 Views

 

--- Quote Start ---  

thank you ted, no i can't contact the author/maintainer of the "memory.h" and i can't pay them,my problem is how to correct this error "#error ERROR: Only Mac or Win32 targets supported!"? thanks in advance. 

--- Quote End ---  

 

 

Well, you could pay someone else who is familiar enough to C to fix those problems for you. 

Or, you could learn the C programming language and fix the problem(s) yourself, but that might take an extended period of time. 

 

Otherwise, I'm afraid you might be stuck. 

 

Good luck!
0 Kudos
Highlighted
Valued Contributor III
10 Views

I think the error message is specific. The code was only meant to be compiled on the Mac or the Win32 platforms, which means it needs to be ported for other targets. This can be a difficult task, depending on how much of the code actually depends on those targets.

0 Kudos