[yocto] arch and tune files for microblaze processor

Elvis Dowson elvis.dowson at gmail.com
Sat Mar 9 04:48:56 PST 2013


Hi Khem,
                  I'm trying to expand on the initial arch and tune files defined for the microblaze processor within the meta-xilinx layer.

I was wondering if you could help review the arch and tune files, to see if there are any glaring mistakes, possible areas for improvement or mistakes in the naming convention.

The microblaze processor is a   32-bit processor, supporting combinations of big-endian and little-endian, plus hard-float and soft-float for the FPU.

http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_4/mb_ref_guide.pdf
http://gcc.gnu.org/onlinedocs/gcc/MicroBlaze-Options.html

I've listed the main arch-microblaze.inc (big-endian, hard-float), tune-microblazeel (little-endian, hard-float), and a machine conf that uses these files (spartan-6-sp601-microblazeel.conf)

File: arch-microblaze.inc

# Microblaze ABI interface definition
# Four defined ABIs, all combinations of:
# *) Hard/Soft Floating Point
# *) Big Endian (PLB System) / Little Endian (AXI System)

DEFAULTTUNE ?= "microblaze"

TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
ABIEXTENSION ?= ""

TUNEVALID[m32] = "Microblaze ELF32 standard ABI"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "microblaze", "", d)}"

TUNEVALID[mbig-endian] = "Microblaze Big Endian processor"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mbig-endian", "-mbig-endian", "", d)}"

TUNEVALID[mlittle-endian] = "Microblaze Little Endian processor"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mlittle-endian", "-mlittle-endian", "", d)}"

TUNEVALID[fpu-soft] = "Use software FPU."
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}"
TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}"

TUNEVALID[fpu-hard] = "Use hardware FPU."
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)}"

TUNE_PKGARCH ?= "${TUNE_ARCH}"

# Basic tune definitions
AVAILTUNES += "microblaze"

TUNE_FEATURES_tune-microblaze ?= "m32 mbig-endian fpu-hard"
BASE_LIB_tune-microblaze = "lib"
TUNE_PKGARCH_tune-microblaze = "microblaze"
PACKAGE_EXTRA_ARCHS_tune-microblaze = "microblaze"

File: tune-microblazeel.inc

# Tune options for MicroBlaze little endian hard-float
DEFAULTTUNE ?= "microblazeel"

require conf/machine/include/microblaze/arch-microblaze.inc

TUNEVALID[microblazeel] = "Enable MicroBlaze little endian hard-float optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "microblazeel", "-mcpu=v8.10a", "", d)}"
TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "microblazeel", "microblazeel", "microblazeel", d)}"

AVAILTUNES += "microblazeel"
TUNE_FEATURES_tune-microblazeel ?= "m32 mlittle-endian fpu-hard microblazeel"
BASE_LIB_tune-microblazeel = "lib"
PACKAGE_EXTRA_ARCHS_tune-microblazeel = "microblazeel"

File: spartan-6-sp601-microblazeel.conf

# Copyright (C) 2013, Elvis Dowson <xx.xx at xx.xx>
# Released under the MIT license (see packages/COPYING)
#@TYPE: Machine
#@Name: spartan-6-sp601-microblazeel
#@DESCRIPTION: Machine configuration for the Xilinx Spartan-6 SP601 FPGA development platform with a MicroBlaze Little Endian processor (with FPU).

# Specify target cpu
TARGET_CPU = "microblaze"

# Specify tune for the MicroBlaze litte endian CPU
include conf/machine/include/tune-microblazeel.inc

# Specify common settings.
include conf/machine/include/spartan-6/spartan-6-base.inc

# Specify linux kernel devicetree
KERNEL_DEVICETREE = "${S}/arch/microblaze/boot/dts/sp601_le.dts"

# Specify u-boot machine configuration
UBOOT_MACHINE ?= "microblaze-generic_config"
UBOOT_ENTRYPOINT ?= "0xa8000000"
UBOOT_LOADADDRESS ?= "0xa8000000"

# Specify machine features
MACHINE_FEATURES = "kernel26 apm ext2 ext3 vfat ethernet serial"
#MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"

# Specify the Xilinx board name
XILINX_BOARD = "sp601"

# Xilinx EDK override hardware  definitions for xilinx-bsp
# Include the following environment variables in your local.conf
# XILINX_BSP_PATH = "complete path to the Xilinx XPS project"

# Specify serial console settings
# Don't use tty1
# USE_VT = "0"
SERIAL_CONSOLE ?= "115200 ttyUL0"

# Device nodes add xsa for (system ace)
IMAGE_DEVICE_TABLES = "files/device_table_add-xsa.txt"

Best regards,

Elvis Dowson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130309/d308c4d6/attachment.html>


More information about the yocto mailing list