📄 hal_i386_pc.cdl
字号:
flavor none
parent CYGPKG_NONE
description "
Global build options including control over
compiler flags, linker flags and choice of toolchain."
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
display "Global command prefix"
flavor data
no_define
default_value { "i386-elf" }
description "
This option specifies the command prefix used when
invoking the build tools. If your host operating system
is Linux you can set this to empty to use your native tools.
If so, your native gcc must be gcc-2.95.2 or later, and
\"ld -v\" must report a version more recent than 2.9.1."
}
cdl_option CYGBLD_GLOBAL_CFLAGS {
display "Global compiler flags"
flavor data
no_define
default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
description "
This option controls the global compiler flags which
are used to compile all packages by
default. Individual packages may define
options which override these global flags."
}
cdl_option CYGBLD_GLOBAL_LDFLAGS {
display "Global linker flags"
flavor data
no_define
default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
description "
This option controls the global linker flags. Individual
packages may define options which override these global flags."
}
cdl_option CYGBLD_BUILD_GDB_STUBS {
display "Build GDB stub loader image"
default_value 0
requires { CYG_HAL_STARTUP == "FLOPPY" || CYG_HAL_STARTUP == "GRUB" }
requires CYGSEM_HAL_ROM_MONITOR
requires CYGBLD_BUILD_COMMON_GDB_STUBS
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
no_define
description "
This option enables the building of the GDB stubs for the
board. The common HAL controls takes care of most of the
build process, but the final conversion from ELF image to
binary data is handled by the platform CDL, allowing
relocation of the data if necessary."
make -priority 320 {
<PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
$(OBJCOPY) -O binary $< $@
}
}
}
cdl_option CYGHWR_HAL_I386_PC_LOAD_HIGH {
display "Load into higher memory (2MB)"
flavor bool
default_value 0
requires { CYG_HAL_STARTUP == "RAM" || CYG_HAL_STARTUP == "GRUB" }
no_define
description "This option enables building RAM applications
which have a start address outside of the area
used by redboot_GRUB."
}
cdl_component CYGHWR_MEMORY_LAYOUT {
display "Memory layout"
flavor data
no_define
calculated { CYG_HAL_STARTUP == "RAM" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"i386_pc_ram_hi" : \
"i386_pc_ram") : \
CYG_HAL_STARTUP == "ROM" ? "i386_pc_rom" : \
CYG_HAL_STARTUP == "GRUB" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"i386_pc_grub_hi" : \
"i386_pc_grub") : \
"i386_pc_floppy" }
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
display "Memory layout linker script fragment"
flavor data
no_define
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
calculated { CYG_HAL_STARTUP == "RAM" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"<pkgconf/mlt_i386_pc_ram_hi.ldi>" : \
"<pkgconf/mlt_i386_pc_ram.ldi>") : \
CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_i386_pc_rom.ldi>" : \
CYG_HAL_STARTUP == "GRUB" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"<pkgconf/mlt_i386_pc_grub_hi.ldi>" : \
"<pkgconf/mlt_i386_pc_grub.ldi>") : \
"<pkgconf/mlt_i386_pc_floppy.ldi>" }
}
cdl_option CYGHWR_MEMORY_LAYOUT_H {
display "Memory layout header file"
flavor data
no_define
define -file system.h CYGHWR_MEMORY_LAYOUT_H
calculated { CYG_HAL_STARTUP == "RAM" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"<pkgconf/mlt_i386_pc_ram_hi.h>" : \
"<pkgconf/mlt_i386_pc_ram.h>") : \
CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_i386_pc_rom.h>" : \
CYG_HAL_STARTUP == "GRUB" ? \
(CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
"<pkgconf/mlt_i386_pc_grub_hi.h>" : \
"<pkgconf/mlt_i386_pc_grub.h>") : \
"<pkgconf/mlt_i386_pc_floppy.h>" }
}
}
cdl_option CYGSEM_HAL_ROM_MONITOR {
display "Behave as a ROM monitor"
flavor bool
default_value 0
parent CYGPKG_HAL_ROM_MONITOR
requires { CYG_HAL_STARTUP == "FLOPPY" || CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "GRUB" }
requires { !CYGHWR_HAL_I386_FPU_SWITCH_LAZY }
description "
Enable this option if this program is to be used as a ROM monitor,
i.e. applications will be loaded into RAM on the board, and this
ROM monitor may process exceptions or interrupts generated from the
application. This enables features such as utilizing a separate
interrupt stack when exceptions are generated."
}
cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
display "Work with a ROM monitor"
flavor booldata
legal_values { "Generic" "GDB_stubs" }
default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
parent CYGPKG_HAL_ROM_MONITOR
requires { CYG_HAL_STARTUP == "RAM" }
description "
Support can be enabled for different varieties of ROM monitor.
This support changes various eCos semantics such as the encoding
of diagnostic output, or the overriding of hardware interrupt
vectors.
Firstly there is \"Generic\" support which prevents the HAL
from overriding the hardware vectors that it does not use, to
instead allow an installed ROM monitor to handle them. This is
the most basic support which is likely to be common to most
implementations of ROM monitor.
\"GDB_stubs\" provides support when GDB stubs are included in
the ROM monitor or boot ROM."
}
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
display "Redboot HAL options"
flavor none
no_define
parent CYGPKG_REDBOOT
active_if CYGPKG_REDBOOT
description "
This option lists the target's requirements for a valid Redboot
configuration."
cdl_component CYGBLD_BUILD_REDBOOT_BIN {
display "Build RedBoot binary image"
no_define
default_value 1
cdl_option CYGBLD_BUILD_REDBOOT_BIN_FLOPPY {
display "Build Redboot FLOPPY binary image"
active_if CYGBLD_BUILD_REDBOOT
active_if { CYG_HAL_STARTUP == "FLOPPY" }
calculated 1
no_define
description "This option enables the conversion of the Redboot
ELF image to a binary image suitable for
copying to a floppy disk."
make -priority 325 {
<PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
$(OBJCOPY) -O binary $< $@
}
}
cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROM {
display "Build Redboot ROM binary image"
active_if CYGBLD_BUILD_REDBOOT
active_if { CYG_HAL_STARTUP == "ROM" }
calculated 1
no_define
description "This option enables the conversion of the Redboot
ELF image to a binary image suitable for ROM
programming."
make -priority 325 {
<PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
$(OBJCOPY) -O binary $< $(@:.bin=.img)
$(OBJCOPY) -O binary $(PREFIX)/bin/romboot.elf $(PREFIX)/bin/romboot.img
dd if=/dev/zero of=$@ bs=1024 count=64 conv=sync
dd if=$(@:.bin=.img) of=$@ bs=512 conv=notrunc,sync
dd if=$(PREFIX)/bin/romboot.img of=$@ bs=256 count=1 seek=255 conv=notrunc
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -