2009-10-06 12:15:47     how to porting u-boot to my bf532-core-board?

Document created by Aaronwu Employee on Sep 24, 2013
Version 1Show Document
  • View in full screen mode

2009-10-06 12:15:47     how to porting u-boot to my bf532-core-board?

zhang wei (CHINA)

Message: 80902   

 

hi all

 

My board base on bf532 and using a nor flash am29lv160 in BMODE[1:0] = 01, plz help me how to porting u_boot to my board?

 

thank you !!

 

my schematic is below.

 

DM-KIT-CBBF533-I.pdf

QuoteReplyEditDelete

 

 

2009-10-06 13:12:31     Re: how to porting u-boot to my bf532-core-board?

Mike Frysinger (UNITED STATES)

Message: 80905   

 

please read the documentation

 

https://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot

QuoteReplyEditDelete

 

 

2009-10-07 02:41:26     Re: how to porting u-boot to my bf532-core-board?

zhang wei (CHINA)

Message: 80925   

 

hi,

 

my borad is in para mode,if  ezkit533 para uboot can work on my borad? if i need to write flash driver?

 

thank you

QuoteReplyEditDelete

 

 

2009-10-07 03:10:47     Re: how to porting u-boot to my bf532-core-board?

Mike Frysinger (UNITED STATES)

Message: 80926   

 

how the bf533-ezkit works doesnt matter if you arent using the same flash

 

please read the documentation:

https://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:parallel-flash

QuoteReplyEditDelete

 

 

2009-10-07 14:22:24     Re: how to porting u-boot to my bf532-core-board?

zhang wei (CHINA)

Message: 80954   

 

hi,mike

 

  I have read the doc and porting uboot to my custom board like this:

 

1>Creat my configrator file <mybf532.h>  by editing <bf533-ezkit.h>like this:

 

#ifndef __CONFIG_MYBF532_H__

#define __CONFIG_MYBF532_H__

 

#include <asm/blackfin-config-pre.h>

 

 

/*

* Processor Settings

*/

#define CONFIG_BFIN_CPU             bf532-0.4

#define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA

 

 

/*

* Clock Settings

*    CCLK = (CLKIN * VCO_MULT) / CCLK_DIV

*    SCLK = (CLKIN * VCO_MULT) / SCLK_DIV

*/

/* CONFIG_CLKIN_HZ is any value in Hz                    */

#define CONFIG_CLKIN_HZ            27000000

/* CLKIN_HALF controls the DF bit in PLL_CTL      0 = CLKIN        */

/*                                                1 = CLKIN / 2        */

#define CONFIG_CLKIN_HALF        0

/* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass    */

/*                                                1 = bypass PLL    */

#define CONFIG_PLL_BYPASS        0

/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL        */

/* Values can range from 0-63 (where 0 means 64)            */

#define CONFIG_VCO_MULT            12

/* CCLK_DIV controls the core clock divider                */

/* Values can be 1, 2, 4, or 8 ONLY                    */

#define CONFIG_CCLK_DIV            1

/* SCLK_DIV controls the system clock divider                */

/* Values can range from 1-15                        */

#define CONFIG_SCLK_DIV            7

 

 

/*

* Memory Settings

*/

#define CONFIG_MEM_SIZE        32

/* Early EZKITs had 32megs, but later have 64megs */

#if (CONFIG_MEM_SIZE == 64)

# define CONFIG_MEM_ADD_WDTH    10

#else

# define CONFIG_MEM_ADD_WDTH    9

#endif

 

#define CONFIG_EBIU_SDRRC_VAL    0x398

#define CONFIG_EBIU_SDGCTL_VAL    0x91118d

 

#define CONFIG_EBIU_AMGCTL_VAL    0xFF

#define CONFIG_EBIU_AMBCTL0_VAL    0x7BB07BB0

#define CONFIG_EBIU_AMBCTL1_VAL    0xFFC27BB0

 

#define CFG_MONITOR_LEN        (256 * 1024)    /* Reserve 256 kB for monitor */

#define CFG_MALLOC_LEN        (128 * 1024)    /* Reserve 128 kB for malloc() */

 

 

/*

* Network Settings

*/

#define ADI_CMDS_NETWORK    1

#define CONFIG_DRIVER_SMC91111    1

#define CONFIG_SMC91111_BASE    0x20310300

#define SMC91111_EEPROM_INIT()    { *pFIO_DIR = 0x01; *pFIO_FLAG_S = 0x01; SSYNC(); }

#define CONFIG_HOSTNAME        bf533-ezkit

/* Uncomment next line to use fixed MAC address */

/* #define CONFIG_ETHADDR    02:80:ad:20:31:e8 */

 

 

/*

* Flash Settings

*/

#define CFG_FLASH_BASE        0x20000000

 

#define CFG_MAX_FLASH_BANKS    3    /* max number of memory banks */

#define CFG_MAX_FLASH_SECT    35    /* max number of sectors on one chip */

 

#define    CONFIG_ENV_IS_IN_FLASH    1

#define CONFIG_ENV_ADDR        0x201f0000

#define    CONFIG_ENV_SECT_SIZE    0x10000    /* Total Size of Environment Sector */

 

#define FLASH_TOT_SECT        35

 

 

/*

* I2C Settings

* By default PF1 is used as SDA and PF0 as SCL on the Stamp board

*/

#define CONFIG_SOFT_I2C        1    /* I2C bit-banged */

#define PF_SCL            PF0

#define PF_SDA            PF1

 

#define I2C_INIT       do { *pFIO_DIR |= PF_SCL; SSYNC(); } while (0)

#define I2C_ACTIVE     do { *pFIO_DIR |= PF_SDA; *pFIO_INEN &= ~PF_SDA; SSYNC(); } while (0)

#define I2C_TRISTATE   do { *pFIO_DIR &= ~PF_SDA; *pFIO_INEN |= PF_SDA; SSYNC(); } while (0)

#define I2C_READ       ((*pFIO_FLAG_D & PF_SDA) != 0)

#define I2C_SDA(bit) \

    do { \

        if (bit) \

            *pFIO_FLAG_S = PF_SDA; \

        else \

            *pFIO_FLAG_C = PF_SDA; \

        SSYNC(); \

    } while (0)

#define I2C_SCL(bit) \

    do { \

        if (bit) \

            *pFIO_FLAG_S = PF_SCL; \

        else \

            *pFIO_FLAG_C = PF_SCL; \

        SSYNC(); \

    } while (0)

#define I2C_DELAY    udelay(5)    /* 1/4 I2C clock duration */

 

#define CFG_I2C_SPEED        50000

#define CFG_I2C_SLAVE        0

 

 

/*

* Misc Settings

*/

#define CONFIG_MISC_INIT_R

#define CONFIG_RTC_BFIN

#define CONFIG_UART_CONSOLE    0

 

 

/*

* Pull in common ADI header for remaining command/environment setup

*/

#include <configs/bfin_adi_common.h>

 

#include <asm/blackfin-config-post.h>

 

#endif

 

2>In /board directory of u-boot, copy bf533-ezkit  files to mybf532 directory and rename bf533-ezkit.c to mybf532.c. I'm not  edit any of  the file in this directory, so I know the flash driver is not compatible to my board,but I just want  the uart print something, and I will migrate the flash driver later.

 

3>make mybf533_config and generate a u-boot.ldr file. then i download it by flashprogramer of VDSP. After reboot the board,there is nothing out from uart. I'm confused about it.

 

So i want to know:

 

<para mode>

 

1>If i just want to the uart of my board print something, must i  write the nor flash driver? I have download uboot to flash via VDSP,i think no need to write nor flash driver if  just want the uart print out something.

 

2>if i want to boot in para mode, just chang #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_BYPASS to #define CONFIG_BFIN_BOOT_MODE       BFIN_BOOT_PARA is OK?  I know para mode is copy code from nor flash to L1 cache, if this will be done by DSP auto.

 

3>if i download bf533-ezkit uboot of bypass mode and change my board to bypass mode,it will work on my board, I'm confused why para mode doesn't work.

 

best regards

 

zhangwei

QuoteReplyEditDelete

 

 

2009-10-07 14:48:07     Re: how to porting u-boot to my bf532-core-board?

Robin Getz (UNITED STATES)

Message: 80955   

 

Zhang:

 

Your problem is "CONFIG_BFIN_BOOT_MODE BFIN_BOOT_PARA" - does not mean LDR - it means execute from 0x20000000. (XIP).

 

DO NOT USE VDSP.

 

Use a gnICE. if you refuse to get an gnICE - there isn't much we can do to help.

 

-Robin

QuoteReplyEditDelete

 

 

2009-10-07 14:50:24     Re: how to porting u-boot to my bf532-core-board?

Mike Frysinger (UNITED STATES)

Message: 80956   

 

the flash driver is not needed to get output from the uart.  you can always just disable all of the paralel flash stuff as explained in the documentation.

 

make sure you do a `make distclean` whenever changing your board config file.

QuoteReplyEditDelete

 

 

2009-10-07 15:04:10     Re: how to porting u-boot to my bf532-core-board?

Robin Getz (UNITED STATES)

Message: 80957   

 

Oops - Mike pointed out that _BYPASS is XIP, and _PARA is ldr - so that is correct.

 

The statement about using VDSP's flash programmer is still correct - many people have had problems with it, and when they switch to the gnICE - the problems disappear.

 

-Robin

QuoteReplyEditDelete

 

 

2009-10-08 04:00:17     Re: how to porting u-boot to my bf532-core-board?

zhang wei (CHINA)

Message: 80969   

 

hi Robin,

 

You mean if i want to download uboot in para mode, don't use VDSP? we should use other tools?

 

If download uboot in bypass mode, using VDSP  should be OK?

 

-ZhangWei

QuoteReplyEditDelete

 

 

2009-10-08 09:55:42     Re: how to porting u-boot to my bf532-core-board?

Robin Getz (UNITED STATES)

Message: 80974   

 

Zhang:

 

I mean you should not be using VDSP. period.

 

Many people have run into problems with the process of moving things from a Linux PC, to a Windows PC, and getting VDSP to properly program with the image files that U-Boot creates.

 

Since no one here uses VDSP - we can't help when you run into a problem - since we don't have the expertise to re-create the issues.

 

VDSP is a good tool - but we can't help you if you choose to use it.

 

the gnICE is a better solution when you are debugging Linux and U-Boot (since you can have full source debug).

 

-Robin

Attachments

Outcomes