Personal tools

VAR-SOM-OM37 Windows EBOOT compilation

From Variscite Wiki

Jump to: navigation, search

EBOOT


1 Overview

The VAR-SOM-OM37 implements the standard features set of Microsoft’s EBOOT.
The EBOOT is pre-burnt to the SBC in the factory, and is ready for customer use.
Variscite doesn’t expose its EBOOT source code, however, in order to enable customers to customize their boot phase, Variscite enables customers to implement the following functions in the Xloader / Eboot.

  • XLoader Configuration of the PAD MUX – Configures the CPU Balls’ alternate functions
  • Xloader Configuration and settings of GPIOs.
  • EBOOT LCD Splash screen support for customers’ specific LCD
  • Windows CE O.S. pre launch custom function.

2 EBOOT customization

2.1 XLDR

2.1.1 CustomPinMuxSetup()

This function configures specified pins of the DM37xx processor. The configuration of this function overloads the default configuration of Variscite.


Attention:
incorrect settings of the OMAP pins may affect proper functionality of the VAR-SOM-OM-37

The function resides in

VAR_OMAP37xx_P\SRC\BOOT\XLDR\platfrom.c

Code Example:

VOID CustomPinMuxSetup()
{
    OMAP_SYSC_PADCONFS_REGS   *pConfig = OALPAtoUA(OMAP_SYSC_PADCONFS_REGS_PA);
    OMAP_SYSC_PADCONFS_WKUP_REGS *pWakeupConfig = OALPAtoUA(OMAP_SYSC_PADCONFS_WKUP_REGS_PA);

    /*SDRC*/
    OUTREG16(&pConfig->CONTROL_PADCONF_SDRC_D0, (INPUT_ENABLE | PULL_INACTIVE | MUX_MODE_4));
    OUTREG16(&pConfig->CONTROL_PADCONF_SDRC_D1, (INPUT_ENABLE | PULL_INACTIVE | MUX_MODE_4));
}

2.1.2 CustomGPIOConfigure()

This function configures specified pins of the OMAP35xx processor to function as General Purpose IOs. The configuration of this function overloads the default configuration of Variscite.


Attention:
incorrect settings of the OMAP pins may affect proper functionality of the VAR-OM35xxSBC.

The function resides in

VAR_OMAP35xx_SBC_P\SRC\BOOT\XLDR\platfrom.c

Code Example:

VOID CustomGPIOConfigure()
{
    OMAP_GPIO_REGS* pGpio;

    // Initialize state/direction for Bank1[BIT0] configured as gpio
    pGpio = OALPAtoUA(OMAP_GPIO1_REGS_PA);
    OUTREG32(&pGpio->DATAOUT, (BIT0));
    OUTREG32(&pGpio->OE, INREG32(&pGpio->OE) & ~BIT0);
}

2.2 EBOOT

EBOOT files contain a number of functions for configuring the splash-screen for a specific LCD.
EBOOT also provides a pre-O.S. launch functions.

2.2.1 LCD defines

The following configurations are required in order to configure EBOOT to work with an alternate LCD.

  • LCD display size:
#define LOGO_WIDTH                  xxx
#define LOGO_HEIGHT                 yyy

Which resides in

VAR_OMAP35xx_SBC_P\SRC\BOOT\EBOOT\lcd_logo.h

Example:

#if BSP_AUO_G084SN05_800W_600H
#define LOGO_WIDTH                  800		// Logo bitmap image is RGB24 VGA Landscape bitmap
#define LOGO_HEIGHT                 600
#elif BSP_DATAIMAGE_WAG02_800W_480H
#define LOGO_WIDTH                  800		// Logo bitmap image is RGB24 VGA Landscape bitmap
#define LOGO_HEIGHT                 480
#else
#define LOGO_WIDTH                  1024	// Logo bitmap image is RGB24 VGA Landscape bitmap
#define LOGO_HEIGHT                 768
#endif

#define BYTES_PER_PIXEL             3
  • Define proper timing parameters of the LCD controller.

Example:

#elif BSP_AUO_G084SN05_800W_600H

    // 800x600 40Hz

    #define DEFAULT_PIXELTYPE   DISPC_PIXELFORMAT_RGB16
    // Note: Setting DEFAULT_PIXELTYPE to DISPC_PIXELFORMAT_RGB32 results in a 
	// dramatic drop in performance in the GDI BLTs, cause is not known.
    //#define DEFAULT_PIXELTYPE   DISPC_PIXELFORMAT_RGB32
    //#define DEFAULT_PIXELTYPE   DISPC_PIXELFORMAT_ARGB32

    #define LCD_WIDTH           800
    #define LCD_HEIGHT          600

    // Note: HWS, HFP and HBP, program desired value - 1
    #define LCD_HSW          	63          // should be 127, out of range for DISPC
    #define LCD_HFP          	39
    #define LCD_HBP          	87

    // Note: for VSW, program desired value - 1
    #define LCD_VSW          	3
    // Note: for VFP and VBP, program desired value
    #define LCD_VFP          	1
    #define LCD_VBP          	23

    // DSS1 = DPLL4/11 = 78.5Mhz, divide by 2 = 39.25MHz pixel clock
    // Note: DSS1 clock divider and pixel clock divider are set in src\inc\bsp_cfg.h
    #define LCD_LOGCLKDIV    	1
    // Minimum value for LCD_PIXCLKDIV is 2
    #define LCD_PIXCLKDIV    	BSP_LCD_PIXCLKDIV

    #define LCD_LOADMODE        0

    // positive H and V sync
    #define LCD_POLFREQ      	( DISPC_POL_FREQ_IVS | DISPC_POL_FREQ_IHS | /* DISPC_POL_FREQ_IPC |*/ DISPC_POL_FREQ_ONOFF)

    #define LCD_DEFAULT_COLOR   0x00000000
    #define LCD_TRANS_COLOR     0x00000000

    #define TV_DEFAULT_COLOR    0x00000000
    #define TV_TRANS_COLOR      0x00000000

#elif BSP_DATAIMAGE_WAG02_800W_480H

Which resides in

VAR_OMAP35xxSBC_P\SRC\DRIVERS\LCD\VGA\lcd_vga.c

2.2.2 PreLaunch

This function is called before launching the O.S.
The function resides in

VAR_OM37xx_P\SRC\BOOT\EBOOT\ prelaunch.c

Code Example:

void PreLaunch()
{
    OALLog(L"<>\r\n");
    OALLog(L"<> Windows CE Prelaunch code <>\r\n");
    OALLog(L"<>\r\n");
}

2.2.3 Startup Logo Functions

This function displays the pre-downloaded SplashScreen image until OS image is launched.
The function resides in

VAR_OM37xx_P\SRC\BOOT\EBOOT\ bsp_logo.c

Code Example:

DWORD   g_dwLogoPosX;
DWORD   g_dwLogoPosY;

DWORD   g_dwLogoWidth;
DWORD   g_dwLogoHeight;

#define BIT28   0x10000000

//------------------------------------------------------------------------------
//
//  Function:  ShowLogo
//
//  This function shows the logo splash screen
//
VOID ShowLogo(UINT32 flashAddr, UINT32 offset)
{
	/////////////////////////////////////
	// See the source file for details //
	/////////////////////////////////////
}

//------------------------------------------------------------------------------
//
//  Function:  HideLogo
//
//  This function hides the logo splash screen
//
VOID HideLogo(VOID)
{
	/////////////////////////////////////
	// See the source file for details //
	/////////////////////////////////////
}

2.3 XLDR and EBOOT images

The XLDR and EBOOT images are built and linked during regular BSP build. In addition, the build will prepare a ready to burn XLDR and EBOOT images. The image files

  • xldrnand.raw
  • ebootnand.raw

Both reside at:

VAR_OMAP35xxSBC_P\target\ARMV4I\retail\

3 EBOOT Burning

3.1 Installing and configuring the burning utility

In order to prepare the burning utility, customer should

  • Install EVMFlash v.1.2
  • Replace targets.xml file in the config\ folder under the root folder of EVM installation. (Typically should be C:\Program Files\Texas Instruments\EVMFlash3530_v1.2\config\)
  • Put supplied full_boot.ccf file in C:\Program Files\Texas Instruments\EVMFlash3530_v1.2\config\

3.2 Burning complete Bootloader image

Evmflash.JPG

The following steps are required for a complete EBOOT / XLDR burning:

  • Configure correct COM port and baud rate
  • Open full_boot.ccf file from menu File->Open
  • Choose Download option under VAR-OMAP35xxSBC target
  • Check “NAND” type of device
  • Check “Verify Download” check box
  • Set download settings as it shown on the following picture
  • Click “Download” button for start download
  • Press and hold “Boot Select” button on the carrier board
  • Press and release “Reset” button on the carrier board
  • Release “Boot Select” button on the carrier board