component("com") {
    parent      "nu.os.arch.ppc"
    version     "1.0.0"
    description "This component implements the common PPC architecture functionality"
    enable      true

    architecture "ppc"
    
    mandatory
    
    # Option for PPC variants (0=PPC32, 1=Booke)
    option("ppc_variant") {
        default         1
        values          [0,1]
        description     "Which PPC architecture variant is utilized by the PPC build (0=PPC32, 1=Booke)"
        hidden          true
    }

    # Option for MMU variants (0=OFF, 1=PowerPC, 2=e200, 3=e300, 4=e500, 5=e600, 6=e5500, 7=QorIQ, 8=Cell)
    option("mmu_variant") {
        default         0
        values          0..8
        description     "Which MMU variant is utilized by the PPC build (0=OFF, 1=PowerPC, 2=e200, 3=e300, 4=e500, 5=e600, 6=e5500, 7=QorIQ, 8=Cell)"
        hidden          true
    }

    # Option for instruction cache size 
    option("icache_size") {
        default         32
        values          [0, 8, 16, 32, 64, 128, 256]
        description     "The Size of the L1 (core) instruction cache in Kbytes"
        hidden          true
    }

    # Option for data cache size 
    option("dcache_size") {
        default         32
        values          [0, 8, 16, 32, 64, 128, 256]
        description     "The Size of the L1 (core) data cache in Kbytes"
        hidden          true
    }

    # Option for FPU support (false=no FPU, true=FPU enable)
    option("fpu_support"){
        default     false
        description "Define the FPU support enabled in the PPC architecture.  This basically adds support to save/restore FPU context for tasks / HISRs.  The default is false (no FPU support)."
    }

    # Option for SPE support (false=no SPE, true=SPE enable)
    option("spe_support"){
        default     false
        description "Define the SPE support enabled in the PPC architecture.  This basically adds support to save/restore SPE context for tasks / HISRs.  The default is false (no SPE support)."
    }

    # Option for Critical Interrupt support(false=no critical int support, true=critical int enable)
    option("crit_int_support"){
        default     false
        description "Enable the critical interrupt support in PPC architecture.  The default is false (no critical interrupt)."
        hidden      true
    }

    # Option for enabling Reserved vectors (false=Reserved vectors disabled, true=Reserved vectors enabled)
    option("reserved_vectors_enabled"){
        default     false
        description "There are reserved exception vectors that are not normally used. This define allows the user to enable those vectors if your hardware/application requires them. The default is false (Reserved vectors disabled)."
    }

    # Option for enabling low level interrupt hook (false=Hook disabled, true=Hook enabled)
    option("isr_hook_enabled"){
        default     false
        description "Enable the low level interrupt hook.  The default is false (Hook disabled)."
        hidden      true
    }

    # Option for the system stack size
    option("system_stack_size"){        
        default 2048
        description "Define the minimum system stack size (default is 2048)"
    }

    includepath "os/include/arch/ppc"

    library("nucleus.lib") {
        sources {
            cflags "csgnu_ppc" => "-Wno-nonnull -Wno-uninitialized"
            Dir.glob("*.c")
        }
    }
}
