Forum Discussion
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.68 Replies
- Altera_Forum
Honored Contributor
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? - Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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...? - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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.