Skip to main content
christopher23
Associate II
November 23, 2010
Question

using threads under uclinux

  • November 23, 2010
  • 4 replies
  • 1329 views
Posted on November 23, 2010 at 10:37

using threads under uclinux

#stm32 #arm-thumb-stm32-cortex-m3 #stm-32 #stm32f103-uclinux
This topic has been closed for replies.

4 replies

sxtxzh
Visitor II
May 17, 2011
Posted on May 17, 2011 at 14:15

HI, I can compile the uClibc according to your suggestion.

The libc.a .libpthread.a can be builded out. 

but when I did a test linked with libpthread.a.in the uClinux on the target board,

the test program crash at once. 

although the uClinux can run on the target borad. but I cant do the muti-threads application on it. 

would you please tell me how to use the libpthread.a, and run the muti-threads program

eagles8601
Visitor II
May 17, 2011
Posted on May 17, 2011 at 14:15

Attached is a patch that enables uClibc-0.9.31(http://www.uclibc.org/) build for cortex-m3 (with the new version of pthread library only). Due to the lack of SWP instruction on cortex-m3, spin & mutex implementation was changed, in this patch we are using LDREX/STREX instructions. We lost the atomicity of SWP instruction.

config: example of configuration file.

To build the uClibc you will need to install the uClinux headers somewhere on you host machine (e.g /uClinux_headers/include)

cd uClinux-dist/linux-2.6.x

make headers_install ARCH=arm INSTALL_HDR_PATH=/uClinux_headers/include

Any comments/remarks are welcome.

vikram23
Visitor II
August 17, 2011
Posted on August 17, 2011 at 15:18

How to download the attached patch? I couldn't :(

Tesla DeLorean
Guru
August 17, 2011
Posted on August 17, 2011 at 16:32

How to download the attached patch? I couldn't :(

The forum crashed in May 2011, taking with it all the attachments, and some of the users. In this case the ones from November 2010.

Suggest you track down the participants, off board, and see if you can get it from them.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..