diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2019-11-04 11:01:03 +0000 |
---|---|---|
committer | Jozef Lawrynowicz <jozefl@gcc.gnu.org> | 2019-11-04 11:01:03 +0000 |
commit | d7eabfd452f6f447ca8f3a955e7a4b531884fadb (patch) | |
tree | 7654a0733dcf2cd4ab85896373c854912bda4b7c /gcc/doc/invoke.texi | |
parent | b76f4e6c06bd494d2383c4c16d1e1a034da74641 (diff) | |
download | gcc-d7eabfd452f6f447ca8f3a955e7a4b531884fadb.zip gcc-d7eabfd452f6f447ca8f3a955e7a4b531884fadb.tar.gz gcc-d7eabfd452f6f447ca8f3a955e7a4b531884fadb.tar.bz2 |
MSP430: Add new methods of finding external MCU data file
MCU data file can now be specified with an environment variable or installed
into a toolchain subdirectory.
2019-11-04 Jozef Lawrynowicz <jozef.l@mittosystems.com>
gcc/
* config/msp430/driver-msp430.c
(msp430_get_linker_devices_include_path): New spec function.
* config/msp430/msp430-devices.c (msp430_dirname): New function.
(extract_devices_dir_from_exec_prefix): New function.
(extract_devices_dir_from_collect_gcc): New function.
(msp430_check_env_var_for_devices): New function.
(msp430_check_path_for_devices): Use xstrdup instead of ASTRDUP.
(parse_devices_csv): Call msp430_check_env_var_for_devices if
devices.csv was not found using other methods.
* config/msp430/msp430-devices.h (msp430_check_env_var_for_devices):
New prototype.
(msp430_dirname): Likewise.
* config/msp430/msp430.c (msp430_register_pre_includes): New function.
* config/msp430/msp430.h (EXTRA_SPEC_FUNCTIONS): Add
msp430_get_linker_devices_include_path.
(TARGET_EXTRA_PRE_INCLUDES): Define.
* doc/invoke.texi: Document new ways of searching for support files.
gcc/testsuite/
* gcc.target/msp430/devices/csv-using-env-var.c: New test.
* gcc.target/msp430/devices/csv-using-installed.c: New test.
* gcc.target/msp430/devices/csv-using-option.c: New test.
* gcc.target/msp430/devices/devices-main.c: New test source file.
* gcc.target/msp430/devices/msp430-devices.h: New test.
* gcc.target/msp430/msp430.exp (msp430_device_permutations_runtest):
Add special cases for csv-using* tests.
Define TESTING_HARD_DATA when running tests that use hard-coded device
data.
(get_installed_device_data_path): New.
(msp430_hide_installed_devices_data): New.
(msp430_restore_installed_devices_data): New.
(msp430_test_installed_device_data): New.
(msp430_install_device_data): New.
From-SVN: r277772
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index faa7fa9..122a23e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -23231,8 +23231,33 @@ The ISA and hardware multiply supported for the different MCUs is hard-coded into GCC. However, an external @samp{devices.csv} file can be used to extend device support beyond those that have been hard-coded. -GCC searches for the @samp{devices.csv} file on the paths specified -with the @code{-I} and @code{-L} options. +GCC searches for the @samp{devices.csv} file using the following methods in the +given precedence order, where the first method takes precendence over the +second which takes precedence over the third. + +@table @asis +@item Include path specified with @code{-I} and @code{-L} +@samp{devices.csv} will be searched for in each of the directories specified by +include paths and linker library search paths. +@item Path specified by the environment variable @samp{MSP430_GCC_INCLUDE_DIR} +Define the value of the global environment variable +@samp{MSP430_GCC_INCLUDE_DIR} +to the full path to the directory containing devices.csv, and GCC will search +this directory for devices.csv. If devices.csv is found, this directory will +also be registered as an include path, and linker library path. Header files +and linker scripts in this directory can therefore be used without manually +specifying @code{-I} and @code{-L} on the command line. +@item The @samp{msp430-elf/include/devices} directory +Finally, GCC will examine @samp{msp430-elf/include/devices} from the +toolchain root directory. This directory does not exist in a default +installation, but if the user has created it and copied @samp{devices.csv} +there, then the MCU data will be read. As above, this directory will +also be registered as an include path, and linker library path. + +@end table +If none of the above search methods find @samp{devices.csv}, then the +hard-coded MCU data is used. + @item -mwarn-mcu @itemx -mno-warn-mcu |