cancel
Showing results for 
Search instead for 
Did you mean: 

uCLinux on STM32F429I-DISCO

tmkaran
Associate II
Posted on November 13, 2013 at 10:54

Hi everybody,

I was very happy to see uCLinux port for Cortex-M4 and my favorite MCU STM32. This well done job was achieved by emcraft. So I wonder that is it possible to run uCLinux on my new toy STM32F429I-DISCO? I have started for it and some u-boot and kernel patching I finished my first job. You must known that code execution from SDRAM on STM32F4 much slower than from FLASH (~6x times slower). So in fact this core is not suitable code execution from SDRAM. But maybe you don't have any chance so you can accept this penalty. 

Than I modified the kernel to load romfs from flash, simple frame buffer driver, u-boot patching for SDRAM and LCD init functions. You can try and decide for yourself. This is boot-up and simple framebuffer demo video. 

http://youtu.be/avbnkhvZrVo

Emcraft original source git is https://github.com/EmcraftSystems (not including STM32F429I-DISCO board drivers)

Sample image attached to the post. This image contains u-boot, kernel and romfs. 

The serial console is USART3 and PC10->MCU TX, PC11->MCU RX. Don't forget that this interface has TTL levels.

#usart #stm32-uclinux-u-boot #usb-driver-p19-stm324f
65 REPLIES 65
kenkyee
Associate II
Posted on November 20, 2013 at 21:41

Very cool!

Is it roughly a 9sec bootup time to command line?  It's hard to see from the fuzzy youtube video 🙂

Emcraft's STM32F4 board gets to the command line in 1sec: http://www.youtube.com/watch?v=_uO8KfhfY2Y

Looking forward to playing with this...any known problems with your port and do you plan to contribute the changes back to emcraft?
tmkaran
Associate II
Posted on November 22, 2013 at 16:50

Actually it was my fault. boot-up time is ~2 second. The waiting time in this video is my keyboard stuff to run my application 🙂 First problem in porting was finding code execution trick on SDRAM. Another important point, frame buffer driver in kernel is not real FB driver. it is a kind of fork virtual frame buffer driver. TFT/LCD driver was implemented on u-boot. So it is simple to port frame buffer device in kernel.  In fact I want to contribute emcraft. Bu I am busy on this days. I will back soon 🙂

grzegorz23
Associate II
Posted on November 27, 2013 at 13:04

Hello

Great work 🙂

Hex work excellent in my DISCO board.

You can share source code?

sarraciro
Associate II
Posted on November 27, 2013 at 14:17

Great job!!!

I tryed it ...and it works properly.

You can share the code???

Congratulations again

Regards

tmkaran
Associate II
Posted on November 27, 2013 at 17:12

thanks guys,

I will share the source code. Just I am working on some improvement such as XIP for better performance. Coming soon 🙂 

thanhnhi
Associate II
Posted on November 28, 2013 at 04:15

Hi tmk,

It is great.

Would you please share the binary file ? Thanks.

I am porting u-boot but it is halt when I load kernel.

thanhnhi
Associate II
Posted on November 28, 2013 at 16:33

Hi, tmk

Thank you.

While SDRAM address is 0x90000000, it isn't 0xD0000000.

Best regards,

THANH NHI

tmkaran
Associate II
Posted on November 28, 2013 at 21:30

Hi guys,

Finally uCLinux with XIP support demo image is ready forSTM32F429I-DISCO. The attached hex file contains, u-boot, kernel and romfs. Kernel and romfs are executed in-place. So both of them never copied to the SDRAM. STM32 Flash execution supports zero-wait state and XIP performance better than SDRAM execution performance about 6 times. You can check this on console message ''Calibrating delay loop... 34 BogoMIPS''. Yes it is true.I removed LCD console feature. So you can't see kernel debug infos on LCD. Console on serial port is still active. You can test framebuffer driver with ''fbtest'' command.

Keep hacking...

________________

Attachments :

uboot_kernel_romfs.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzZv&d=%2Fa%2F0X0000000bNs%2FwoQKOCWyzT.3BqjJGCBICwo9D1plfC7JUw4SalZqW_Q&asPdf=false
Henry Dang
Associate II
Posted on November 29, 2013 at 02:42

Nice project, thanks Mr TMK.

Is there linux kernel usb hcd driver for the STM32F4, 

Emcraft kernel source has usb gadget only ?

Regards