arch and tune files for microblaze processor

Elvis Dowson

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.

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


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

DEFAULTTUNE ?= "microblaze"


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)}"


# 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"


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

require conf/machine/include/microblaze/

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@...>
# 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/

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

# 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"

# 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

Join { to automatically receive all group messages.