Skip to main content
hervieux
Associate II
March 15, 2010
Question

Drivers/modules uClinux on STM3210E_EVAL

  • March 15, 2010
  • 12 replies
  • 2198 views
Posted on March 15, 2010 at 11:17

Drivers/modules uClinux on STM3210E_EVAL

    This topic has been closed for replies.

    12 replies

    hervieux
    hervieuxAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:43

    Hi,

    Thank you very much for your help, I have now managed to insert my module.

    Small remark, so I used the command ''mknod ...''

    to create the special file ( ''/ dev / mydriver''), only I had the following error:

    ''read only file system''.

    So I create the special file on my PC with ubuntu HOST in the directory ''romfs'' and I do a ''make image''.

    Looks like it worked, thank you again for your help!

    Cédric

    eagles8601
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 13:43

    Hello Cédric,

    Your driver should be build as a static module (compiled within the kernel) module loader doesn't support thumb relocation.

    You can put your driver under ''drivers/xxxx/yourmodule.c'' where xxxx is the driver sub category, and yourmodule.c is your driver module.

    Under drivers/xxxx/ update ''Makefile''/''Kconfig'' files to compile the new module.

    /*******************************************************/

    in Kconfig :

    config XXXX_MY_DRIVER

           bool ''Select my driver to be compiled or not''

            depends on XXX_OTHER_MODULE_IF_IT_DEPENDS_ON

           help

             Your module description ......

    /*******************************************************/

    in Makefile :

    obj-$(CONFIG_XXXX_MY_DRIVER)                +=  yourmodule.o

    /*******************************************************/

    From the kernel configuration menu you can now select your driver to be compiled.

    Rebuild the kernel and run it.

    Good luck.