MSP430: Read MCU data from external file

Programming / Compilers / GCC - jozefl [138bc75d-0d04-0410-961f-82ee72b054a4] - 13 August 2019 10:31 EDT

gcc/ChangeLog:

2019-08-13 Jozef Lawrynowicz

- 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

- 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.

6c63abe30d6 MSP430: Read MCU data from external file
gcc/ChangeLog | 36 ++-
gcc/config/msp430/driver-msp430.c | 23 ++
gcc/config/msp430/msp430-devices.c | 276 ++++++++++++++++++++-
gcc/config/msp430/msp430.h | 10 +-
gcc/config/msp430/msp430.opt | 9 +
gcc/doc/invoke.texi | 14 +-
gcc/testsuite/ChangeLog | 38 +++
gcc/testsuite/gcc.target/msp430/devices/README | 5 +
.../gcc.target/msp430/devices/bad-devices-1.c | 5 +
.../gcc.target/msp430/devices/bad-devices-1.csv | 3 +
.../gcc.target/msp430/devices/bad-devices-2.c | 5 +
.../gcc.target/msp430/devices/bad-devices-2.csv | 3 +
.../gcc.target/msp430/devices/bad-devices-3.c | 5 +
.../gcc.target/msp430/devices/bad-devices-3.csv | 3 +
.../gcc.target/msp430/devices/bad-devices-4.c | 5 +
.../gcc.target/msp430/devices/bad-devices-4.csv | 3 +
.../gcc.target/msp430/devices/bad-devices-5.c | 5 +
.../gcc.target/msp430/devices/bad-devices-5.csv | 3 +
.../gcc.target/msp430/devices/bad-devices-6.c | 5 +
.../gcc.target/msp430/devices/bad-devices-6.csv | 3 +
.../gcc.target/msp430/devices/csv-device-order.c | 11 +
.../gcc.target/msp430/devices/csv-msp430_00.c | 7 +
.../gcc.target/msp430/devices/csv-msp430_01.c | 7 +
.../gcc.target/msp430/devices/csv-msp430_02.c | 7 +
.../gcc.target/msp430/devices/csv-msp430_04.c | 7 +
.../gcc.target/msp430/devices/csv-msp430_08.c | 7 +
.../gcc.target/msp430/devices/csv-msp430_10.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_11.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_12.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_14.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_18.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_20.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_21.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_22.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_24.c | 6 +
.../gcc.target/msp430/devices/csv-msp430_28.c | 6 +
.../gcc.target/msp430/devices/csv-msp430fr5969.c | 11 +
.../gcc.target/msp430/devices/devices.csv | 22 ++
gcc/testsuite/gcc.target/msp430/devices/hard-foo.c | 1 +
gcc/testsuite/gcc.target/msp430/msp430.exp | 16 +-
40 files changed, 604 insertions(+), 11 deletions(-)

Upstream: gcc.gnu.org


  • Share