This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

FTDI Chip connected to OMAP35xx

Hello,

Now that I got the my OMAP35EVM board working I can face my first tasks which inevitably come with the first problems [:S]. I have a small device that sends and receives data over a serial interface. Unfortunately I don't only need the TXD and RXD Pins from the serial Port but also the RTS, DTR and CTS pins which are not connected on the OMAP35xxEVM .  So, I took a FTDI FT232R IC that converts RS232 signals to USB and vice versa which I would like to use on my Omap Board which causes some troubles for me.

First of all, is the USB interface always working or do I have to enable it or something like that?

FTDI offers some drivers for that Chip but it looks a bit complicated to compile them and moreover I have to use the compilers from the arm-2007q3 toolchain, am I right? Is that a problem or should the standard Linux drivers work? [:^)]

Well, it looks like I have to do some deeper research to get that chip working on my Board so I just wanted to ask whether some of you already gained some experiences on that area and could provide me with a few hints that push me into the right direction. I feel a bit lost at the moment.

Thanks in advance!

Maik

  • Maik Pflugradt said:
    First of all, is the USB interface always working or do I have to enable it or something like that?

    With the default kernel USB should already be enabled, just plugging in a device should cuase the kernel to react and print out a message of some sort on the terminal regarding how the new device is being addressed (for example a USB mass storage device, or a keyboard). One comment here is that if your USB-RS232 adapter happens to draw much power you probably want to use a powered USB hub between the OMAP EVM and the adapter, as the USB OTG port on the EVM can not provide much current and you will get VBUS errors or nothing at all if there is not sufficient power.

    Maik Pflugradt said:
    FTDI offers some drivers for that Chip but it looks a bit complicated to compile them and moreover I have to use the compilers from the arm-2007q3 toolchain, am I right?

    You would certainly have to use an ARM compiler, I would probably suggest the arm-2007q3 toolchain, how much other porting effort would be required is hard to say.

    Maik Pflugradt said:
    Is that a problem or should the standard Linux drivers work? Huh?

    It is possible that you could plug it in and have it immediately show up as a working UART interface, the easiest way to find out is to try, it depends on the Linux kernel version you have and if FTDI got their open source drivers accepted into the kernel before the kernel version you have was released.

  • FTDI is available in Linux drivers (v2.6.29) at Device Drivers->USB Support->USB serial converter support->FTDI Single port

    Here is what help sections says:

    "Say Y here if you want to use a FTDI SIO single port USB to serial converter device. The implementation I have is called the USC-1000.This driver has also be tested with the 245 and 232 devices."

    So if your FTDI chip is among one of above then it should work directly else it may require some minor fixing.

    Regards,

    Ajay

  • First of all, thanks for your replies!
    I extracted the linux "kernel-2.6.22.tar.gz" from OMAP35x_SDK_0.9.7 where I indeed found a "ftdi_sio.h" and "ftdi_sio.c" in "/2.6_kernel/drivers/usb/serial".
    I have a FT232R device so these sources should be the right ones.  I'm not quite sure whether these files are already included in my currently working kernel.

    I tried to print all modules with "modprobe -v" but all I get is an error message telling me "cannot parse modules.dep".
    So how can I make sure that the driver is already working and how to install them if not? Do I have to recompile the kernel?

    Up to now, nothing happens when I plug in the ftdi-chip.

    I really appreciate any further hints pushing me a bit forward [:)]
    Maik

  • You need to include FTDI serial driver using menuconfig and recompile the kernel.

    Regards,
    Ajay

  • Ahh Ok I will give that a try.
    By the way I have another small question that bothers me for some days now:

    After having installed the "arm-2007q3"  toolchain i added the bin path to my shell resource file as proposed in the Getting Started Guide.So I can start the "arm-none-linux-gnueabi-gcc" compiler in the shell from anywhere. However, some Makefile's don't seem to be able to handle that properly.I just wanted to rebuild the uImage (as described in User's Guide) using the "make uImage" command which resulted in a "arm-none-linux-gnueabi-gcc: command not found" error. Is there a neat way to fix this? (In my own makefiles I replaced "arm-none-linux-gnueabi-gcc" with an absolute path "/opt/omap3evm/toolchain/arm-2007q3/bin/arm-none-linux-gnueabi-gcc" which is a a bit dirty workaround to my mind). Perhaps you have a small idea on that one.[:A]

    Cheers and thanks again for your great support!
    Maik

  • With the path in my .bashrc file (and thus echo $PATH) I am able to build things properly, I assume you are using CROSS_COMPILE=arm-none-linux-gnueabi-?

  • You can give this path in your shell $PATH.

    1. Open ~/.cshrc OR ~/.bashrc based on shell you are using

    2. Add compiler path as given below. (if path variable exist then just append it)

    // For cshrc

    set path=(/opt/omap3evm/toolchain/arm-2007q3/bin/  )

    // For bashrc

    export PATH=/opt/omap3evm/toolchain/arm-2007q3/bin/ 

     

    Compile command: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage


    Regards,
    Ajay

  • Ok it works,
    I only edited the user .bashrc. So whenever I tried to compile something as root he did not find the path. (Sometimes I have to change over to super user because of several permission issues)
    So i just needed to add "export PATH=/opt/omap3evm/toolchain/arm-2007q3/bin/ "  to the root's .bashrc too... and the problem was solved.

    Well,
    Now I was able to build the uImage with the command you just stated above and everything went well.
    Unfortunately, I'm not quite sure on how to include the FTDI serial driver using menuconfig.
    Before compiling the kernel i have run "make omap3evm_defconfig" but this creates the default configuration I'm already running right?

    The User Guide says to use the "make menuconfig"  command to make changes to default configuration. Do I have to do this before building the kernel?
    I suppose so but I don't really know how these compiling steps fit together in detail. How do I actually tell menuconfig to add the FTDI drivers?

    Nonetheless,
    "make menuconfig" also results in a large list of errors as you can see in the following listing:

    root@MEDLAB-C:/home/administrator/temp/linux/kernel_org/2.6_kernel# make menuconfig
      HOSTCC  scripts/kconfig/lxdialog/checklist.o
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:32:20: error: curses.h: No such file or directory
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:97: error: expected specifier-qualifier-list before ‘chtype’
    scripts/kconfig/lxdialog/dialog.h:187: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:194: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:196: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:197: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:198: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:199: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/dialog.h:201: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/checklist.c:31: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/checklist.c:59: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/checklist.c:95: error: expected ‘)’ before ‘*’ token
    scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’:
    scripts/kconfig/lxdialog/checklist.c:116: error: ‘WINDOW’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:116: error: (Each undeclared identifier is reported only once
    scripts/kconfig/lxdialog/checklist.c:116: error: for each function it appears in.)
    scripts/kconfig/lxdialog/checklist.c:116: error: ‘dialog’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:116: error: ‘list’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:116: warning: left-hand operand of comma expression has no effect
    scripts/kconfig/lxdialog/checklist.c:129: warning: implicit declaration of function ‘getmaxy’
    scripts/kconfig/lxdialog/checklist.c:129: error: ‘stdscr’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:130: error: ‘KEY_MAX’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:131: warning: implicit declaration of function ‘getmaxx’
    scripts/kconfig/lxdialog/checklist.c:137: error: ‘COLS’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:138: error: ‘LINES’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:140: warning: implicit declaration of function ‘draw_shadow’
    scripts/kconfig/lxdialog/checklist.c:142: warning: implicit declaration of function ‘newwin’
    scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function ‘keypad’
    scripts/kconfig/lxdialog/checklist.c:143: error: ‘TRUE’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function ‘draw_box’
    scripts/kconfig/lxdialog/checklist.c:146: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:146: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:147: warning: implicit declaration of function ‘wattrset’
    scripts/kconfig/lxdialog/checklist.c:147: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function ‘mvwaddch’
    scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function ‘waddch’
    scripts/kconfig/lxdialog/checklist.c:151: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:154: warning: implicit declaration of function ‘print_title’
    scripts/kconfig/lxdialog/checklist.c:156: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:157: warning: implicit declaration of function ‘print_autowrap’
    scripts/kconfig/lxdialog/checklist.c:164: warning: implicit declaration of function ‘subwin’
    scripts/kconfig/lxdialog/checklist.c:171: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:171: error: ‘struct dialog_color’ has no member named ‘atr’
    scripts/kconfig/lxdialog/checklist.c:189: warning: implicit declaration of function ‘print_item’
    scripts/kconfig/lxdialog/checklist.c:192: warning: implicit declaration of function ‘print_arrows’
    scripts/kconfig/lxdialog/checklist.c:195: warning: implicit declaration of function ‘print_buttons’
    scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function ‘wnoutrefresh’
    scripts/kconfig/lxdialog/checklist.c:199: warning: implicit declaration of function ‘doupdate’
    scripts/kconfig/lxdialog/checklist.c:202: warning: implicit declaration of function ‘wgetch’
    scripts/kconfig/lxdialog/checklist.c:210: error: ‘KEY_UP’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:210: error: ‘KEY_DOWN’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:220: error: ‘FALSE’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:221: warning: implicit declaration of function ‘scrollok’
    scripts/kconfig/lxdialog/checklist.c:222: warning: implicit declaration of function ‘wscrl’
    scripts/kconfig/lxdialog/checklist.c:232: warning: implicit declaration of function ‘wrefresh’
    scripts/kconfig/lxdialog/checklist.c:293: warning: implicit declaration of function ‘delwin’
    scripts/kconfig/lxdialog/checklist.c:297: error: ‘KEY_LEFT’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:298: error: ‘KEY_RIGHT’ undeclared (first use in this function)
    scripts/kconfig/lxdialog/checklist.c:310: warning: implicit declaration of function ‘on_key_esc’
    scripts/kconfig/lxdialog/checklist.c:312: error: ‘KEY_RESIZE’ undeclared (first use in this function)
    make[1]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
    make: *** [menuconfig] Error 2

    To be honest I don't know whats going wrong here. Some files are missing?

    Regards,
    Maik

     

  • Please follow below steps.

    1. Default config

      $ make omap3_evm_defconfig

    2. Add FTDI

      $ make menuconfig

    3. Goto Device Drivers

    4. Goto USB Support

    5. Goto USB Serial Converters

    6. Select (press Y) for FTDI serial

    Exit -> exit -exit and say YES to save config.

    7. Now compile the kernel and use the uImage at arch/arm/boot/

    Regards,
    Ajay

  • Mmh ok, but I still encounter the same problems at step 2 [:(]

    root@MEDLAB-C:/home/administrator/temp/linux/kernel_org/2.6_kernel# make menuconfig
      HOSTCC  scripts/kconfig/lxdialog/checklist.o
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    scripts/kconfig/lxdialog/dialog.h:32:20: error: curses.h: No such file or directory
    In file included from scripts/kconfig/lxdialog/checklist.c:24:
    ...

     

    Seems a little bit curious to me. Any ideas?

    Maik

     

     

  • Looks like you don't have ncurses installed in the build machine.

     

    Pratheesh

  •  [:)]

    Pratheesh said:

    Looks like you don't have ncurses installed in the build machine.

    Yep that's been the problem.
    Now I got the kernel compiled. Let's see whether OMAP is going to speak with my FTDI Chip [:P][:P]