ARM/MSVC Build Environment Script

I added a Perl script to the repository Build/CopyBuildToolset.cmd at https://github.com/bawoodruff/BeagleBoard.  More details on the repo is here.

The script documentation is lacking and I’ll add more in the next few days.

The script populates the Build directory with a toolset from the Windows 7 DDK/SDK and Visual Studio 11 for the ARM installations and copies minimal Windows SDK headers to build the supporting Windows based tools for PE image conversion and ROM image signature for the BeagleBoard as part of the build toolset.

The script uses the MSVCToolChainForARM.INI file which describes the source locations and target layout for the tool chain.  A few sample snippets from the .INI are below.   The first column describes the file source which is one of ddk, sdk or msvc.

ddk,    bin\x86\amd64\build.exe,                        amd64
ddk,    bin\x86\build.exe,                              x86
ddk,    bin\x86\binplace.exe,                           x86
...
sdk,    Bin\rc.exe,                                     x86
sdk,    Bin\RcDll.Dll,                                  x86
sdk,    Bin\x64\rc.exe,                                 amd64
sdk,    Bin\x64\RcDll.Dll,                              amd64
sdk,    Include\BaseTsd.h,                              sdk\inc
...
msvc,   VC\bin\x86_arm\armasm.exe,                      vc\x86_arm
msvc,   VC\bin\x86_arm\c1.dll,                          vc\x86_arm
msvc,   VC\bin\x86_arm\c1ast.dll,                       vc\x86_arm

The first column describes the file source which is one of ddk, sdk or msvc.  These are currently defined in the script as below and can be configured with command line options –ddk, –msvc, –sdk respectively.   The script currently assumes it is running under the beagle.cmd environment and that BEAGLE_BUILD_PATH has been set to the Build directory of the enlistment.

my %srcPathMap = (
  ddk     => 'C:\\WinDDK\\7600.16385.1',
  msvc    => 'C:\\Program Files (x86)\\Microsoft Visual Studio 11.0',
  sdk     => 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A'
  );
Given this configuration, the build script copies the files as described in the .INI (second column) to the Build directory and target destination directories (third column).
When completed, a CMD.exe launching beagle.cmd specifying the ARM build type will be ready to build the XLoader image.
c:\windows\System32\cmd.exe /k c:\beagleboard\build\beagle.cmd arm
C:\BeagleBoard>cd OS

C:\BeagleBoard>rem bcz is an alias for build.exe -cZ

C:\BeagleBoard\OS>bcz
BUILD: Compile and Link for ARM
BUILD: Start time: Sat Jan 05 09:58:50 2013
BUILD: Examining c:\beagleboard\os directory tree for files to compile.
BUILD: rmdir /q/s c:\beagleboard.obj.arm\os
1>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\board directory
2>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\common directory
3>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\disk directory
4>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\drivers directory
5>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\filesystem\fat directory
6>BUILD: Compiling (NoSync) c:\beagleboard\os\bootloader\runtime directory
1>Assembling - bootloader\board\arm\platform.s
6>Assembling - bootloader\runtime\arm\_div10.s
5>Compiling - bootloader\filesystem\fat\fat.c
3>Compiling - bootloader\disk\part.c
2>Compiling - bootloader\common\cmd_load.c
4>Compiling - bootloader\drivers\serial.c
6>Assembling - bootloader\runtime\arm\_delay.s
6>Assembling - bootloader\runtime\arm\_dcc.s
6>Compiling - bootloader\runtime\board.c
1>Compiling - bootloader\board\omap3530beagle.c
4>Compiling - bootloader\drivers\k9f1g08r0a.c
5>Compiling - bootloader\filesystem\fat\file.c
6>Compiling - bootloader\runtime\div0.c
6>Compiling - bootloader\runtime\dcc.c
4>Compiling - bootloader\drivers\ns16550.c
6>Compiling - bootloader\runtime\ecc.c
4>Compiling - bootloader\drivers\omap24xx_i2c.c
5>Compiling - bootloader\filesystem\fat\generating code...
6>Compiling - bootloader\runtime\printf.c
2>Building Library - c:\beagleboard.obj.arm\os\bootloader\common\obj\arm\common.lib
3>Building Library - c:\beagleboard.obj.arm\os\bootloader\disk\obj\arm\disk.lib
1>Building Library - c:\beagleboard.obj.arm\os\bootloader\board\obj\arm\board.lib
6>Compiling - bootloader\runtime\_udiv.c
4>Compiling - bootloader\drivers\generating code...
5>Building Library - c:\beagleboard.obj.arm\os\bootloader\filesystem\fat\obj\arm\fat.lib
6>Compiling - bootloader\runtime\generating code...
4>Building Library - c:\beagleboard.obj.arm\os\bootloader\drivers\obj\arm\drivers.lib
100>BUILD: Compiling c:\beagleboard\os\bootloader\runtime directory
100>Building Library - c:\beagleboard.obj.arm\os\bootloader\runtime\obj\arm\runtime.lib
1>BUILD: Compiling and Linking c:\beagleboard\os\bootloader\cpu directory
1>Assembling - bootloader\cpu\arm\start.s
1>Compiling - bootloader\cpu\cpu.c
1>Compiling - bootloader\cpu\gpio.c
1>Compiling - bootloader\cpu\mmc.c
1>Compiling - bootloader\cpu\sys_info.c
1>Compiling - bootloader\cpu\generating code...
1>Linking Executable - c:\beagleboard.obj.arm\os\bootloader\cpu\obj\arm\x-load.exe
1>LN_MUI_STS: LGNSTS_MUIOFF X-Load.exe
1>MUI_COMMENT: Not Localizeable X-Load.exe
1>Binplacing - c:\beagleboard.obj.arm\os\bootloader\cpu\obj\arm\mlo
BUILD: Finish time: Sat Jan 05 09:58:56 2013
BUILD: Done

    38 files compiled
    6 libraries built
    1 executable built
    1 file binplaced

C:\BeagleBoard\OS>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">