diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2019-08-13 10:31:17 +0000 |
---|---|---|
committer | Jozef Lawrynowicz <jozefl@gcc.gnu.org> | 2019-08-13 10:31:17 +0000 |
commit | d5c949950c8941e945b08e82181b52a208fa3af4 (patch) | |
tree | 51cf70166889421fecd2420275c15f31a6aba84a /gcc/config/msp430/msp430.opt | |
parent | 1044fa32e2b456b59b3cdc31b4f261145f1589cc (diff) | |
download | gcc-d5c949950c8941e945b08e82181b52a208fa3af4.zip gcc-d5c949950c8941e945b08e82181b52a208fa3af4.tar.gz gcc-d5c949950c8941e945b08e82181b52a208fa3af4.tar.bz2 |
MSP430: Read MCU data from external file
gcc/ChangeLog:
2019-08-13 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/driver-msp430.c (msp430_set_driver_var): New.
* config/msp430/msp430-devices.c (canonicalize_path_dirsep): New.
(msp430_check_path_for_devices): New.
(parse_devices_csv_1): New.
(parse_devices_csv): New.
(msp430_extract_mcu_data): Try to find devices.csv and search for the
MCU data in devices.csv before using the hard-coded data.
Warn if devices.csv isn't found and the MCU wasn't found in the
hard-coded data either.
* config/msp430/msp430.h (DRIVER_SELF_SPECS): Call
msp430_set_driver_var for -mno-warn-devices-csv and -mdevices-csv-loc.
Search for devices.csv on -I and -L paths.
(EXTRA_SPEC_FUNCTIONS): Add msp430_check_path_for_devices and
msp430_set_driver_var.
* config/msp430/msp430.opt: Add -mwarn-devices-csv and
-mdevices-csv-loc=.
* doc/invoke.texi (-mmcu): Document that -I and -L paths are
searched for devices.csv.
(mwarn-devices-csv): Document option.
gcc/testsuite/ChangeLog:
2019-08-13 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* gcc.target/msp430/msp430.exp (msp430_device_permutations_runtest):
Handle csv-* and bad-devices-* tests.
* gcc.target/msp430/devices/README: Document how bad-devices-* tests
work.
* gcc.target/msp430/devices/bad-devices-1.c: New test.
* gcc.target/msp430/devices/bad-devices-2.c: Likewise.
* gcc.target/msp430/devices/bad-devices-3.c: Likewise.
* gcc.target/msp430/devices/bad-devices-4.c: Likewise.
* gcc.target/msp430/devices/bad-devices-5.c: Likewise.
* gcc.target/msp430/devices/bad-devices-6.c: Likewise.
* gcc.target/msp430/devices/csv-device-order.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_00.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_01.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_02.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_04.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_08.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_10.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_11.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_12.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_14.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_18.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_20.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_21.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_22.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_24.c: Likewise.
* gcc.target/msp430/devices/csv-msp430_28.c: Likewise.
* gcc.target/msp430/devices/csv-msp430fr5969.c: Likewise.
* gcc.target/msp430/devices/hard-foo.c: Likewise.
* gcc.target/msp430/devices/bad-devices-1.csv: New test support file.
* gcc.target/msp430/devices/bad-devices-2.csv: Likewise.
* gcc.target/msp430/devices/bad-devices-3.csv: Likewise.
* gcc.target/msp430/devices/bad-devices-4.csv: Likewise.
* gcc.target/msp430/devices/bad-devices-5.csv: Likewise.
* gcc.target/msp430/devices/bad-devices-6.csv: Likewise.
* gcc.target/msp430/devices/devices.csv: Likewise.
From-SVN: r274373
Diffstat (limited to 'gcc/config/msp430/msp430.opt')
-rw-r--r-- | gcc/config/msp430/msp430.opt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/msp430/msp430.opt b/gcc/config/msp430/msp430.opt index c027201..cbbe0fa 100644 --- a/gcc/config/msp430/msp430.opt +++ b/gcc/config/msp430/msp430.opt @@ -14,6 +14,10 @@ mwarn-mcu Target Report Var(msp430_warn_mcu) Init(1) Warn if an MCU name is unrecognized or conflicts with other options (default: on). +mwarn-devices-csv +Target Report Var(msp430_warn_devices_csv) Init(1) +Warn if devices.csv is not found or there are problem parsing it (default: on). + mcpu= Target Report Joined RejectNegative Var(target_cpu) Specify the ISA to build for: msp430, msp430x, msp430xv2. @@ -92,3 +96,8 @@ Passes on a request to the assembler to enable fixes for various silicon errata. msilicon-errata-warn= Target Joined RejectNegative Report ToLower Passes on a request to the assembler to warn about various silicon errata. + +mdevices-csv-loc= +Target Joined Var(msp430_devices_csv_loc) RejectNegative Report +The path to devices.csv. The GCC driver can normally locate devices.csv itself +and pass this option to the compiler, so the user shouldn't need to pass this. |