USB Support on M54455EVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Support on M54455EVB

2,002 Views
simath
Contributor I
A question for kmahan or other Linux guru types:
 
I have gotten USB Mass Storage working - sort of.  I can mount ext2 type flash sticks (formatted in Fedora) with no problems.  However no matter WHAT I try, I can not seem to successfully mount a VFAT type (tried FAT16, FAT32).  Fedora mounts this same flash stick with no problem.
 
If I use the -t auto (or -t vfat) option in 'mount' I always get a 'No such device' error
 
Here's part of fstabs:
/dev/sda1       /mnt/usbfd  vfat    rw,noauto         0       0
#/dev/ram0       /mnt/ramdisk  auto    noauto,owner    0       0
Again, I know that everything else is working since I can plug/un-plug, mount/umount USB sticks formatted as ext2 without any problem (and perform reads/writes to them).  Am I missing something in the part table creation (used standard Windows format - both Win and Fedora read the stick fine afterwards)?
 
Here's what fdisk shows:
 
Disk /dev/sda: 130 MB, 130023424 bytes
1 heads, 32 sectors/track, 7936 cylinders
Units = cylinders of 32 * 512 = 16384 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/sda1               2        7936      126960    b  Win95 FAT32
Also, somehow I get a startup message indicating an attempt to mount a ramdisk.  Yes, I did add this to fstab, but (see above) it's commented out.  I edited /etc/fstab on a desktop, then tftp'd it back.  So, how is this "old" line still getting recognized???
 
Kernel startup message:
mount: Mounting  on  /mnt/ramdisk  auto    noauto,owner    0       0 failed: No
such file or directory

I wanted to include a ramdisk, but realized that there are no format (mkfs or mke2fs) utils included in the default busybox build.  Am I missing something?  Is there another way to format a ramdisk with this build???
Labels (1)
0 Kudos
5 Replies

473 Views
simath
Contributor I
I meant to add a tools questions specifically about the Sourcery G++ "Personal Edition" (which includes Eclipse IDE).  It seems like it's very reasonably priced at $399.  Any comments?
0 Kudos

473 Views
kmahan
Contributor I
For questions 2 and 3 (about hotplug) we use udev instead of hotplug.

As for your first question.  We mostly use GDB for everything.  Depending on the problem you can also use strace in application space.  And of course printf/printk.  This is by no means a comprehensive list -- just a few of the tools that I find useful.

--Kurt
0 Kudos

473 Views
simath
Contributor I
OK, that worked - got USB VFAT sticks working!
 
A couple of other questions:
1) What tools do you guys use for application debugging?
2) Have you had any luck building with hotplug enabled?
3) Does embedded hotplug really work as advertised (i.e. automount)?
 
As to 1) I gather from previous posts you don't use CW Linux Tools?  I will need to do some debugging of my apps. running under the BSP and wonder what works well.  I HOPE not to actually need to do any full kernel debugging though.  I do need to be able to build and debug a custom driver.  The CW Linux versions seems a bit expensive (not for you guys as FS employees though)???  But I guess that CW v7.0 Linux version isn't yet available anyway (does the older version support v4e cores)?
 
As to 3) even the PC builds like SUSE and Fedora seem to have "issues" with USB sticks - sometimes they mount, sometimes they don't...
 
This is my first full embedded Linux project (only used uCLinux prior).  I guess the first thing I'll need is a faster computer.  Compared to uC builds LTIB takes FOREVER on my old workhorse 3GHz P4...
 
Thanks again!
0 Kudos

473 Views
butok
NXP Employee
NXP Employee
A few comments: 
- Be sure that you have enable all related FAT options during Kernel configuration.
- Try to play with coding page settings (ISOxxxx).
- In some cases you need to mount sda (instead sda1).
 
Best regards
Andrey
0 Kudos

473 Views
kmahan
Contributor I
It is amazing how many different ways there are to produce FAT filesystems.  Our testing showed things working great with the sticks we had.  Of course others found sticks that had been formatted differently.

From previous experience (thanks Duck!) it is probably that CONFIG_NLS_ISO8859_1=Y is not set in the kernel.  Please try rebuilding the kernel in LTIB with that kernel option enabled and rerunning your test.  Or if it is set post a reply with your kernel config and we'll look closer.

--Kurt
0 Kudos