cancel
Showing results for 
Search instead for 
Did you mean: 

uClinux on Custom board based-on stm32f746NGH.

kieuvietdich
Associate II
Posted on July 12, 2016 at 20:13

Hi

I have a STM32F746-DISCO and I ported uClinux from emcraft to it, run OK. But. In STM32F7-DISCO have only 8MB accessible because only 16bit data used. I have custom this board and using 32bit data to SDRAM. I can using mw and md command in u-boot for test from 0xC000000 to 0xC0FFFFFF address OK. But when I load uClinux image into RAM and run it, I run to problem :

## Ready for binary (ymodem) download to 0xC0007FC0 at 115200 bps... 
C## Total Size = 0x0028a740 = 2664256 Bytes
Phone129 >bootm
## Booting kernel from Legacy Image at c0007fc0 ...
Image Name: Linux-2.6.33-arm1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2664192 Bytes = 2.5 MB
Load Address: c0008000
Entry Point: c0008001
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...

And hang at Starting kernel ... Please tell me how to config uClinux for 32bit SDRAM or how to run uClinux with 16MB in my case ? Thanks very much, BR.
1 REPLY 1
gongw
Associate II
Posted on October 24, 2016 at 09:22

Hi Kieu,

    For the hang at Starting kernel, you may need to check you bootargs (console=ttyS0,115200) for console in u-boot, ttyS0 for USART1, ttyS1 for USART2... and so on.

   If you can not input in shell command line, you should check your kernel configuration for USART:

Change From

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

Default USART(3) configurations in Kernel:

arch/arm/mach-stm32/stm32_platform.c

MACHINE_START(STM32, ''STMicro STM32'')

        /*

         * Physical address of the serial port used for the early

         * kernel debugging (CONFIG_DEBUG_LL=y).

         * This address is actually never used in the MMU-less kernel

         * (since no mapping is needed to access this port),

         * but let's keep these fields filled out for consistency.

         */

        .phys_io        = STM32_USART3_BASE,

        .io_pg_offst    = (IO_ADDRESS(STM32_USART3_BASE) >> 18) & 0xfffc,

        .map_io         = stm32_map_io,

        .init_irq       = stm32_init_irq,

        .timer          =  &stm32_timer,

        .init_machine   = stm32_init,

MACHINE_END

arch/arm/mach-stm32/iomux.c

   case PLATFORM_STM32_STM32F7_DISCO:

#if defined(CONFIG_STM32_USART1)

                gpio_dsc.port = 1;

                gpio_dsc.pin  = 6;

                stm32f2_gpio_config(&gpio_dsc, STM32F2_GPIO_ROLE_USART1);

                gpio_dsc.port = 0;

                gpio_dsc.pin  = 10;

                stm32f2_gpio_config(&gpio_dsc, STM32F2_GPIO_ROLE_USART1);

#endif

TO

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

USART(1) configurations to use VCP on STM32F746-DISCO

arch/arm/mach-stm32/stm32_platform.c

MACHINE_START(STM32, ''STMicro STM32'')

        /*

         * Physical address of the serial port used for the early

         * kernel debugging (CONFIG_DEBUG_LL=y).

         * This address is actually never used in the MMU-less kernel

         * (since no mapping is needed to access this port),

         * but let's keep these fields filled out for consistency.

         */

        .phys_io        = STM32_USART1_BASE,

        .io_pg_offst    = (IO_ADDRESS(STM32_USART1_BASE) >> 18) & 0xfffc,

        .map_io         = stm32_map_io,

        .init_irq       = stm32_init_irq,

        .timer          = &stm32_timer,

        .init_machine   = stm32_init,

MACHINE_END

arch/arm/mach-stm32/iomux.c

 case PLATFORM_STM32_STM32F7_DISCO:

#if defined(CONFIG_STM32_USART1)

                gpio_dsc.port = 0;

                gpio_dsc.pin  = 9;

                stm32f2_gpio_config(&gpio_dsc, STM32F2_GPIO_ROLE_USART1);

                gpio_dsc.port = 1;

                gpio_dsc.pin  = 7;

                stm32f2_gpio_config(&gpio_dsc, STM32F2_GPIO_ROLE_USART1);

#endif