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++

NiosII

Altera_Forum
Honored Contributor II
4,039 Views

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
Altera_Forum
Honored Contributor II
746 Views

all right, sinam. 

 

my brain is mixed up. 

I don't know what you don't know exactly. 

 

tell me what do you think. 

 

only if, once you success to write jpeg on your flash. 

HOW do you read the file without removing flash memory form your board. 

in our view, connection between PC and your board is only JTAG ( might be UART, might be Ethernet ) 

so, you can not read jpeg file from your board. 

unless you have SD card (or something removable ) on your board. 

 

that is why we recommend to read memory directly via JTAG (Ethernet) as binaly data. 

 

I think your purpose for now is just making sure if your JPEG logic work right (or not). 

you don't have to write it as a file. 

 

why we insist not use FAT file is that is tough stuff.( very much ). 

you need to install OS or driver by your own. 

just study those, I have tried ( and did ) it with spending many days. 

can't tell it with this simple text. 

 

if you want fix your system on your board. 

you need to study much more things. 

in my view, it takes years.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi Akira,thanks a lot. 

if i use a sd card,i can stored the image compression(.jpg) into it and read this with the connection ethernet?? 

thanks in advance.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

not really. 

 

one way is store file into SD card.  

but this is not short way, as long as you have no idea with setting FAT( I say again this is tough ). 

if you have Ethernet connection, you can send data as binary image from board to PC. ( you say you have Ethernet on your board right?). 

 

do you understand?
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi akira what do you mean if you say: only if, once you success to write jpeg on your flash. 

HOW do you read the file without removing flash memory form your board?? 

thanks a lot.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

this is C-source 

//////////////////////// sample on PC ////////////////////////////////////// 

fpw = open("C:/sample.jpg","w"); 

write( imagedata, datasize, 1, fpw); 

close(fpw); 

////////////////////////////////////////////////////////////////////////////// 

 

ok 

if you run this program on PC. 

this code create a file sample.jpg on C drive root. 

right? 

you can pick up the file form "C:/sample.jpg" 

 

now,this is a question. 

//////////////////////// sample on Nios ////////////////////////////////////// 

fpw = open("sample.jpg","w"); 

write( imagedata, datasize, 1, fpw); 

close(fpw); 

////////////////////////////////////////////////////////////////////////////// 

 

where do you think the file is created? 

 

what do you say?
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi thank you akira. 

yes this a code this is i want to do.  

this is a question: 

//////////////////////// sample on Nios ////////////////////////////////////// 

fpw = open("sample.jpg","w"); 

write( imagedata, datasize, 1, fpw); 

close(fpw); 

i didn't find where i can create this file "sample.jpg" with NiosII. 

help me plz. 

thanks in advance.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

listen sinam. 

 

this is what we told you many time. 

you can not save a file. unless you have FAT formated device. 

 

only if you could save a file with the program. 

what will you do after then? 

read file? to where ?  

what you can do is reading the file into memory on NiosII again. 

 

do you understand? 

you can not open the file with you PC, because Flash memory is stuck with your board. 

who can access the flash is only NiosII. 

 

but, your final destination is not saving file. 

your destination is to check the data, right? 

if so, you don't have to save file, just send data via something like Ethernet. 

 

I have no idea why you can not save a file on you flash. 

because, I haven't seen your system structure. 

but I am sure. you can not construct file-system on your FPGA for now. 

my advice is to give up saving file for now. 

send data to PC via Ethernet instead. 

 

plz. do understand. 

you can study how to save files later on by taking many time.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi akira, thanks a lot. 

if i use the ethernet, where the code ethernet write the data in fpga ? 

i have a code witch write a file(.txt) in lcd device and (send/rescive the data).
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

Actually, when you said Ethernet,I thought you already knew how to use it. 

Use just socket program. 

 

OR 

 

Why don't you use jtag. 

Just printf to your nios2-terminal(eclipse).
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi akira, thanks a lot. 

use jtag? how? 

how use printf in nios2-terminal? 

i remined you, i want to write a data and send it(.jpeg). 

thanks in advance.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

have you done "helloworld" on NiosII? 

 

just 

printf("hello from NiosII"); 

 

I meant that. 

 

for( loop = 0; loop < imagesize; loop++) 

printf("%02x ",jpegimage[loop]); 

 

this gives your memory image as hex-text-data.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi akira, thanks a lot, i don't inderstand nathing, 

forget to all. 

my question is: i can use hostfilesystem(fopen("/mnt/host/img.jpg","wb"))??, i created my out put file in (/mnt/host)?? 

if yes ,how pleaz. 

thanks in advance.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

You can, if you are using the host filesystem (not the rozip flash filesystem) AND are running your application with the debugger.

0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi Daixiwen,thanks a lot. 

yes i try this and i run my project in debug mode but i don't have a output(the debug is very heavy)? are there stepes to use host file system before debug or no? 

thanks in advance.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

 

--- Quote Start ---  

hi Daixiwen,thanks a lot. 

yes i try this and i run my project in debug mode but i don't have a output(the debug is very heavy)? are there stepes to use host file system before debug or no? 

thanks in advance. 

--- Quote End ---  

 

 

http://www.alteraforum.com/forum/showthread.php?t=37661
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

right. 

 

thank you ted. 

 

hey sinem. 

I apologize, whole thing I told you. 

the video ted gave you is your answer. 

 

sorry.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

hi  

I want to cross compile OpenCV library for ALTERA Nios 2 processor but I have little experience in makefiles and I want to know what are the steps generally followed to create a makefiles , makefile for opencv , removing the gui components and finally building the library with my application .thaks a lot.
0 Kudos
Altera_Forum
Honored Contributor II
746 Views

 

--- Quote Start ---  

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. 

--- Quote End ---  

 

 

Hello Sinam can it be possible to share your source code of h.264, As i have CCD camera and i streaming its video in a raw format (without compression) over LAN.
0 Kudos
Altera_Forum
Honored Contributor II
747 Views

hi kaushal, I download the source code from net, this is a lien http://iphome.hhi.de/suehring/tml/

0 Kudos
Altera_Forum
Honored Contributor II
747 Views

hello sinam, 

 

Page you suggest is not opening  

 

"Oops! Google Chrome could not connect to iphome.hhi.de

 

is that web link still alive
0 Kudos
Altera_Forum
Honored Contributor II
747 Views

hi kaushal,yes but it is ok when i posted the link !!!!!!!!!!!!!!!!!,if you can posted to me your email,i want to send this source code

0 Kudos
Reply