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

How to copy files from Hard disk to Compact flash

Altera_Forum
Honored Contributor II
1,461 Views

Hi, 

 

can anybody tell me how to access a hard disk and a compact flash disk to transfer data between the two. 

 

I am using Win XP, Nios II v5.0, µClinux 1.4 and a Stratix Pro edition (1s40). 

 

Thnx
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
684 Views

where is the harddisk? on your PC or Nios2 board?

0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by hippo@Mar 2 2006, 03:40 PM 

where is the harddisk? on your pc or nios2 board? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13062) 

--- quote end ---  

 

--- Quote End ---  

 

on my PC
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Use a USB card reader with CF port. Add it to your PC XP , and insert the CF card to copy.

0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by hippo@Mar 3 2006, 04:19 AM 

use a usb card reader with cf port. add it to your pc xp , and  insert the cf card to copy. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13086) 

--- quote end ---  

 

--- Quote End ---  

 

That&#39;s obvious, I&#39;m looking for a connection through network to connect with my hard disk ))
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Hi MFM, 

 

> I&#39;m looking for a connection through network to connect with my hard disk 

 

Depending on your requirements, you can use TFTP or NFS from a bootloader like 

u-boot or redboot. You might also consider an FTP client on the Nios side. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by smcnutt@Mar 3 2006, 04:57 PM 

hi mfm, 

 

>  i&#39;m looking for a connection through network to connect with my hard disk 

 

depending on your requirements, you can use tftp or nfs from a bootloader like 

u-boot or redboot. you might also consider an ftp client on the nios side. 

 

regards, 

--scott 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13095) 

--- quote end ---  

 

--- Quote End ---  

 

Hi Scott, 

 

thnx Scott for your reply, 

 

but can you explain it a little bit more, beside this I found some topics talking about using the CIFS network file system to access a shared windows directory, have you any idea about ?
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Hi MFM, 

 

> found some topics talking about using the CIFS network file system to access 

> a shared windows directory, have you any idea about ? 

 

That&#39;s a pretty big jump from "access a hard disk and a compact flash disk to 

transfer data" ;-) Now you&#39;re talking an SNIA compliant virtual file system, not just 

simple transfers. CIFS is the "Common Internet File System". And I&#39;m not qualified 

to comment on its current state WRT uClinux on Nios II -- I&#39;ve never tried using it 

on Nios II -- sorry. 

 

Perhaps hippo, or some of the Microtronix gurus can help here. 

 

If you want bare-bones capability try u-boot or redboot. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by smcnutt@Mar 3 2006, 07:46 PM 

hi mfm, 

 

>  found some topics talking about using the cifs network file system to access 

> a shared windows directory, have you any idea about ? 

 

that&#39;s a pretty big jump from "access a hard disk and a compact flash disk to 

transfer data" ;-) now you&#39;re talking an snia compliant virtual file system, not just 

simple transfers. cifs is the "common internet file system". and i&#39;m not qualified 

to comment on its current state wrt uclinux on nios ii -- i&#39;ve never tried using it 

on nios ii -- sorry. 

 

perhaps hippo, or some of the microtronix gurus can help here. 

 

if you want bare-bones capability try u-boot or redboot. 

 

regards, 

--scott 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13103) 

--- quote end ---  

 

--- Quote End ---  

 

Hi Scott, 

thanks for your patient ))) 

I talked about CIFS cause I&#39;ve thought it will allow me to connect with my hard disk even through a shared windows directory (and if I can read anything from my hard disk the problem is solved). So if you got any other solution that&#39;s welcome. 

Besides you talked about "bare-bones capability" for u-boot or redboot, can you explain what are that capabilities and why would I let down the standard bootloader?
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Via network through cifs (which is smb-extended) 

mount -t cifs //server/share /mnt   ..... 

 

However, it is a long way to reach. 

You need to enable cifs support in kernel. 

You need mount.cifs. There is a port of samba in uClinux-dist. But the port did not generate mount.cifs automatically. You have to do some work on it. 

 

I am not good at network. And can&#39;t not help you a lot on this. 

But if you remember, I did suggest you to work on Linux and build tools/kernel/apps. Why? You will understand when you want to something that is not out the box. 

 

As was suggested by Scott, using ftp server/client is a easier approach. 

There is a ftpd in Microtronix&#39;s port. Setup the ftpd on nios2, and upload files to nios2 from XP.
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Hi hippo, 

 

can you please explain me how to use that ftpd, I exectuted it then typed help to get a number of commands I can&#39;t figure out. 

 

Thnx
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by mfm@Mar 5 2006, 11:05 PM 

hi hippo, 

 

can you please explain me how to use that ftpd, i exectuted it then typed help to get a number of commands i can&#39;t figure out. 

 

thnx 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13134) 

--- quote end ---  

 

--- Quote End ---  

 

 

Hi, 

finally I made it ))))))) 

Well, I&#39;ve connected to my board through another computer running Linux. I executed the ftp command, turned off the passive option and I executed the put command to copy files from the computer to the CF mounted on the board. 

And it works fine.
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Great! 

That&#39;s exactly what I want to tell you.
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

 

--- Quote Start ---  

originally posted by mfm+mar 6 2006, 10:46 am--><div class='quotetop'>quote (mfm @ mar 6 2006, 10:46 am)</div> 

--- quote start ---  

<!--quotebegin-mfm@Mar 5 2006, 11:05 PM 

hi hippo, 

 

can you please explain me how to use that ftpd, i exectuted it then typed help to get a number of commands i can&#39;t figure out. 

 

thnx 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13134) 

--- quote end ---  

 

--- Quote End ---  

 

 

Hi, 

finally I made it ))))))) 

Well, I&#39;ve connected to my board through another computer running Linux. I executed the ftp command, turned off the passive option and I executed the put command to copy files from the computer to the CF mounted on the board. 

And it works fine. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13157)</div> 

[/b] 

--- Quote End ---  

 

Hi MFM 

Could you tell me something more about this? what fs type of your CF card. And how to turn off the mode. On linux platform what commands we need to used. 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
684 Views

Hi zzh, 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

what fs type of your CF card.[/b] 

--- Quote End ---  

 

I&#39;m using the ext2 fs for my CF, you can find the way to make so in the reference manual of µClinux (look in µClinux /documents). 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

And how to turn off the mode. [/b] 

--- Quote End ---  

 

I didn&#39;t understand that question. 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

On linux platform what commands we need to used. [/b] 

--- Quote End ---  

 

We only need to use the FTP command and its sub-commands. Type "man ftp" and you&#39;ll get all of them. 

 

Best Regards
0 Kudos
Reply