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
polimorphic
Associate II
Posted on January 19, 2014 at 20:02

Hi

@tmk, in /usr/bin is located program extract, is required when system boots. Can You share source code of this file?

I try to compile kernel and busybox with libraries from uClibc and probably this program crashes system boot.

Last 2 messages from system is :

VFS: Mounted root (...) readonly on device

Freeing init memory: 16K

and end

Do I need also compile ram disc and how to do it?

Has somebody recipe for enable pthreads?

Thank you for all

can2
Associate
Posted on January 28, 2014 at 15:57

Thank you BIG time for your enormous effort.

I used your complete hex image and it works as expected, but I do have a problem with the serial communication.

I have connected my stm32f429i-disco board to a breadboard with a HIN202ECBZ to convert the USART3 lines (PC10=MCU_TX, PC11=MCU_RX) to RS232 levels. When connecting a serial terminal monitor (tried on linux and on windows with 115200,8n1) I receive all the boot up messages, but I am unable to send anything. Therefore I am not able to login or anything. Sometimes aftre pressing random keys some garbage (as if the baudrate would not match) appears in the terminal. Could it be, that PC11 is already used for something else?

I would claim that my HIN202 circuit is correct. Does anybody have a hint as to what the problem could be?

jserv
Associate
Posted on February 09, 2014 at 14:46

hi all,

If you prefer to use Linux as host, you can consider the simple tool designed to create a uClinux distribution for STM32f429 Discovery board:

   

https://github.com/jserv/stm32f429-linux-builder

Just have to 'make' and 'make install'. Then, the builder will fetch and compile u-boot, linux kernel, and busybox from scratch.

magore
Associate II
Posted on February 14, 2014 at 03:34

I created new scripts that check and install more of the required packages

You just need to run ./install_uclinux on ubuntu-12.04

It will install arm gcc in /opt/gcc-arm

It will set the environment

compile busybox, uclinux,u-boot, compile and install stlink, etc

install the update usb drivers

Notes: look in the file install_uclinux - you will see two places I copy config files

one for uclinux and the other for busybox

My configs add a number of options to busybox and uclinux

I also build the romfs manually and add a few files from tmk's project

If you want to use tmk's config files just uncomment his configs and comment out mine in install_uclinux - don not forget to update the load offsets - romfs in my scripts loads at 0x8180000 - see the file flash_uclinux

magore
Associate II
Posted on February 15, 2014 at 00:17

Hi tmk,

   What are the terms of use for the LCD display driver code you have copyrighted ?

Under what terms can we use it in projects ?

Thanks!

amine
Associate II
Posted on March 02, 2014 at 19:59

when I tried to build the image I got an error saying ''

u-boot.lds:9: nonconstant expression for origin'' and line 9 has : ''

RAM_BUF (r): ORIGIN = (ORIGIN(RAM) + LENGTH(RAM)), LENGTH = (88 * 1024)

''anyone has an idea what might the problem be?

anku
Associate
Posted on March 10, 2014 at 11:47

Hi

I have a question regarding the USB OTG function. Is a USB to Ethernet dongle supported?

This would be a really cool feature if I can connect the STM32F429 to ethernet. I think this is easier than connecting a phy to the STM32 that needs some modification to the DISCO board.

Best regards

tlamotte9
Associate II
Posted on June 01, 2014 at 15:50

Dear All,

Tayfun Mehmet Karan (aka tmk), Jim Huang (aka jserv) and all developers of Emcraft Systems:

Just to let you know that your present porting of ucLinux on the STM32F429i-Discovery has

been reciently introduced and published in a french Embedded Software magazine called ''Open Silicium''

#11 of June-July-August 2014

http://www.unixgarden.com/index.php/open-silicium/open-silicium-n11-juin-juillet-aout-2014-en-kiosque

Best regards,

Thierry

k23
Associate
Posted on June 13, 2014 at 00:57

 Does anyone know of the Linux support for the USB device with P19 USB OTG on the STM324F SOM eval board? 

k23
Associate
Posted on June 13, 2014 at 01:01

 Hi. Does anyone know of a Linux driver for the USB device with P19 USB OTG on the STM324F SOM eval board from emCraft?