Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 1 | # Copyright lowRISC contributors. |
| 2 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | |
Sam Elliott | eed65c6 | 2019-12-03 10:28:59 +0000 | [diff] [blame] | 5 | project( |
| 6 | 'opentitan', 'c', 'cpp', |
| 7 | version: '0.1', |
Philipp Wagner | e8ba3dc | 2020-10-30 16:49:31 +0000 | [diff] [blame] | 8 | meson_version: '>=0.53.0', # Matches version in python-requirements.txt |
Miguel Young de la Sota | fa12ce0 | 2019-11-26 14:53:55 -0600 | [diff] [blame] | 9 | default_options: [ |
| 10 | 'c_std=c11', |
| 11 | 'build.c_std=c11', |
Sam Elliott | 0c157c0 | 2019-12-02 19:30:59 +0000 | [diff] [blame] | 12 | 'cpp_std=c++14', |
| 13 | 'build.cpp_std=c++14', |
Sam Elliott | 6fa87b1 | 2020-10-05 19:30:20 +0100 | [diff] [blame] | 14 | 'warning_level=2', |
Sam Elliott | e9f2566 | 2019-12-02 19:33:19 +0000 | [diff] [blame] | 15 | 'werror=true', |
Sam Elliott | 5797c56 | 2019-12-02 19:40:34 +0000 | [diff] [blame] | 16 | 'debug=true', |
Sam Elliott | 6f30e93 | 2020-01-08 15:57:01 +0000 | [diff] [blame] | 17 | 'b_staticpic=false', # Disable PIC for device static libraries |
| 18 | 'b_pie=false', # Disable PIE for device executables |
Sam Elliott | 0c157c0 | 2019-12-02 19:30:59 +0000 | [diff] [blame] | 19 | ], |
Sam Elliott | eed65c6 | 2019-12-03 10:28:59 +0000 | [diff] [blame] | 20 | ) |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 21 | |
Sam Elliott | 1e49899 | 2021-01-08 15:40:22 +0000 | [diff] [blame] | 22 | # We allow both GCC and Clang, but these minimum versions. |
| 23 | required_gcc_version = '>=5' |
| 24 | required_clang_version = '>=3.5' |
| 25 | |
Miguel Young de la Sota | b2ef483 | 2019-11-22 12:55:46 -0600 | [diff] [blame] | 26 | ot_version = get_option('ot_version') |
| 27 | if ot_version == 'undef' |
| 28 | error('ot_version option not set. Please run meson with a valid OpenTitan version option.') |
| 29 | endif |
| 30 | |
Philipp Wagner | 525891d | 2020-10-30 19:01:04 +0000 | [diff] [blame] | 31 | bin_dir = get_option('bin_dir') |
| 32 | if bin_dir == 'undef' |
| 33 | error('bin_dir option not set. Please run meson with a valid binary directory option.') |
Miguel Young de la Sota | 3c8ab3b | 2019-11-21 13:59:09 -0600 | [diff] [blame] | 34 | endif |
Jon Flatley | a863a28 | 2020-03-03 10:49:39 -0500 | [diff] [blame] | 35 | tock_local = get_option('tock_local') |
Miguel Young de la Sota | 3c8ab3b | 2019-11-21 13:59:09 -0600 | [diff] [blame] | 36 | |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 37 | # See the comment in `./util/meson-purge-includes.sh` for why this is necessary. |
| 38 | if not get_option('keep_includes') |
| 39 | meson.add_postconf_script(meson.source_root() + '/util/meson-purge-includes.sh') |
| 40 | endif |
| 41 | |
Alphan Ulusoy | d2bbbe1 | 2020-08-14 15:39:51 -0400 | [diff] [blame] | 42 | coverage = get_option('coverage') |
| 43 | # Coverage requires clang. |
| 44 | if coverage and meson.get_compiler('c').get_id() != 'clang' |
| 45 | error('Coverage requires clang.') |
| 46 | endif |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 47 | |
Sam Elliott | 1e49899 | 2021-01-08 15:40:22 +0000 | [diff] [blame] | 48 | # Check C/C++ compiler version numbers. |
| 49 | c_compilers = { |
| 50 | 'C compiler for host': meson.get_compiler('c', native: true), |
| 51 | 'C compiler for device': meson.get_compiler('c', native: false), |
| 52 | 'C++ compiler for host': meson.get_compiler('cpp', native: true), |
| 53 | } |
| 54 | foreach kind, compiler : c_compilers |
| 55 | if compiler.get_id() == 'clang' |
| 56 | if not compiler.version().version_compare(required_clang_version) |
| 57 | error('@0@ version mismatch, @1@ required.'.format(kind, required_clang_version)) |
| 58 | endif |
| 59 | elif compiler.get_id() == 'gcc' |
| 60 | if not compiler.version().version_compare(required_gcc_version) |
| 61 | error('@0@ version mismatch, @1@ required.'.format(kind, required_gcc_version)) |
| 62 | endif |
| 63 | else |
| 64 | warning('Unsupported @0@: @1@'.format(kind, compiler.get_id())) |
| 65 | message('Please ensure this compiler satisfies the OpenTitan requirements in:') |
| 66 | message(' https://docs.opentitan.org/doc/ug/install_instructions/#system-requirements') |
| 67 | endif |
| 68 | endforeach |
| 69 | |
| 70 | |
Sam Elliott | f928f2d | 2020-10-06 17:02:57 +0100 | [diff] [blame] | 71 | # C compiler arguments to to catch common errors, used on all builds. |
| 72 | extra_warning_args = [ |
Sam Elliott | 3eed4a7 | 2020-10-05 19:11:18 +0100 | [diff] [blame] | 73 | '-Wimplicit-fallthrough', # Error on implicit fallthrough |
Sam Elliott | 499ad61 | 2020-10-05 19:27:55 +0100 | [diff] [blame] | 74 | '-Wswitch-default', # Ensure all switches have default statements |
| 75 | '-Wno-covered-switch-default', # We require `default:` always. |
Sam Elliott | a49d704 | 2020-10-07 10:46:41 +0100 | [diff] [blame] | 76 | '-Wgnu', # We aim to be standards compliant, and avoid gnu extensions. |
Philipp Wagner | 9061076 | 2020-11-04 17:34:58 +0000 | [diff] [blame] | 77 | '-Wno-error=unused-function', # Don't error out on unused functions, only warn. |
Sam Elliott | 6fa87b1 | 2020-10-05 19:30:20 +0100 | [diff] [blame] | 78 | # Issues we intend to fix in the future but are currently ignored as there are |
| 79 | # many places they are triggered. |
| 80 | '-Wno-unused-parameter', |
| 81 | '-Wno-sign-compare', |
| 82 | '-Wno-missing-field-initializers', |
Sam Elliott | a49d704 | 2020-10-07 10:46:41 +0100 | [diff] [blame] | 83 | '-Wno-gnu-zero-variadic-macro-arguments', |
Sam Elliott | f928f2d | 2020-10-06 17:02:57 +0100 | [diff] [blame] | 84 | ] |
| 85 | |
| 86 | # C compiler arguments to optimize for size, used on cross builds only. |
Sam Elliott | ca894e0 | 2019-12-03 10:25:17 +0000 | [diff] [blame] | 87 | optimize_size_args = [ |
| 88 | '-Os', # General "Optimize for Size" Option |
| 89 | '-fvisibility=hidden', # Hide symbols by default |
| 90 | ] |
| 91 | |
Sam Elliott | f928f2d | 2020-10-06 17:02:57 +0100 | [diff] [blame] | 92 | native_c_compiler = meson.get_compiler('c', native: true) |
| 93 | cross_c_compiler = meson.get_compiler('c', native: false) |
| 94 | |
| 95 | if cross_c_compiler.has_argument('-Wa,--no-pad-sections') |
| 96 | # Don't pad assembly sections. This was originally added to avoid sections |
| 97 | # being padded to the alignment size. Specifically, .vectors was being |
| 98 | # padded to 256 bytes when aligning to that value, when it only needed to be |
| 99 | # 128 bytes long. Clang doesn't do this padding, so restricting this option |
| 100 | # to GCC doesn't waste space when compiling with Clang. |
| 101 | optimize_size_args += '-Wa,--no-pad-sections' |
Luís Marques | 1db34ad | 2020-05-27 13:41:57 +0100 | [diff] [blame] | 102 | endif |
| 103 | |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 104 | # The following flags are applied to *all* builds, both cross builds and native |
| 105 | # builds. |
| 106 | c_cpp_args = [ |
| 107 | # We use absolute include paths as much as possible. |
Miguel Young de la Sota | 3fbb28a | 2019-10-16 15:15:07 -0500 | [diff] [blame] | 108 | '-I' + meson.source_root(), |
| 109 | '-I' + meson.build_root(), |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 110 | ] |
| 111 | add_project_arguments(c_cpp_args, language: ['c', 'cpp'], native: false) |
| 112 | add_project_arguments(c_cpp_args, language: ['c', 'cpp'], native: true) |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 113 | |
Sam Elliott | 58d285f | 2019-11-29 11:58:29 +0000 | [diff] [blame] | 114 | # The following flags are applied only to cross builds |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 115 | c_cpp_cross_args = [ |
| 116 | # Do not use standard system headers |
| 117 | '-nostdinc', |
| 118 | # Use OpenTitan's freestanding headers instead |
| 119 | '-isystem' + meson.source_root() / 'sw/device/lib/base/freestanding', |
Sam Elliott | 120c737 | 2020-11-03 15:14:46 +0000 | [diff] [blame] | 120 | # Don't emit unwinding information |
| 121 | '-fno-asynchronous-unwind-tables', |
Sam Elliott | 1d1ac6c | 2020-11-04 19:03:20 +0000 | [diff] [blame] | 122 | # Don't use COMMON sections for uninitialized globals |
| 123 | '-fno-common', |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 124 | ] |
Sam Elliott | f928f2d | 2020-10-06 17:02:57 +0100 | [diff] [blame] | 125 | |
| 126 | # Add extra warning flags for cross builds, if they are supported. |
| 127 | foreach warning_arg : extra_warning_args |
| 128 | if cross_c_compiler.has_argument(warning_arg) |
| 129 | c_cpp_cross_args += [warning_arg] |
| 130 | endif |
| 131 | endforeach |
| 132 | |
| 133 | # Add the flags for cross builds. |
Sam Elliott | 58d285f | 2019-11-29 11:58:29 +0000 | [diff] [blame] | 134 | add_project_arguments( |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 135 | c_cpp_cross_args, |
Sam Elliott | ca894e0 | 2019-12-03 10:25:17 +0000 | [diff] [blame] | 136 | optimize_size_args, |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 137 | language: ['c', 'cpp'], native: false) |
Sam Elliott | 5e5a9dd | 2020-11-10 10:45:48 +0000 | [diff] [blame] | 138 | # Add a C-only flag for cross builds. |
| 139 | add_project_arguments( |
| 140 | '-Wstrict-prototypes', # Ban K&R Declarations/Definitions. |
| 141 | language: ['c'], native: false) |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 142 | |
| 143 | # The following flags are applied only to cross builds |
| 144 | c_cpp_cross_link_args = [ |
| 145 | # Do not use standard system startup files or libraries |
| 146 | '-nostartfiles', |
| 147 | '-nostdlib', |
| 148 | # Only link static files |
| 149 | '-static', |
Sam Elliott | 120c737 | 2020-11-03 15:14:46 +0000 | [diff] [blame] | 150 | # Warn if we use COMMON |
| 151 | '-Wl,--warn-common', |
| 152 | # Warn if we include orphan sections |
| 153 | '-Wl,--orphan-handling=warn', |
| 154 | # Turn Linker Warnings into Errors |
| 155 | '-Wl,--fatal-warnings', |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 156 | ] |
Sam Elliott | 58d285f | 2019-11-29 11:58:29 +0000 | [diff] [blame] | 157 | add_project_link_arguments( |
Sam Elliott | 371c79f | 2020-06-23 20:06:19 +0100 | [diff] [blame] | 158 | c_cpp_cross_link_args, |
| 159 | language: ['c', 'cpp'], native: false) |
| 160 | |
Sam Elliott | 0ad19da | 2020-08-24 17:29:42 +0100 | [diff] [blame] | 161 | # The following flags are applied only to native builds |
| 162 | c_cpp_native_args = [ |
| 163 | # Use a define to exclude libc redefinitions. |
| 164 | '-DHOST_BUILD', |
| 165 | ] |
Sam Elliott | f928f2d | 2020-10-06 17:02:57 +0100 | [diff] [blame] | 166 | |
| 167 | # Add Extra warning flags for native builds, if they are supported. |
| 168 | foreach warning_arg : extra_warning_args |
| 169 | if native_c_compiler.has_argument(warning_arg) |
| 170 | c_cpp_native_args += [warning_arg] |
| 171 | endif |
| 172 | endforeach |
| 173 | |
| 174 | # Add the flags for native builds. |
Sam Elliott | 0ad19da | 2020-08-24 17:29:42 +0100 | [diff] [blame] | 175 | add_project_arguments( |
| 176 | c_cpp_native_args, |
| 177 | language: ['c', 'cpp'], native: true) |
Sam Elliott | 5e5a9dd | 2020-11-10 10:45:48 +0000 | [diff] [blame] | 178 | # Add a C-only flag for native builds. |
| 179 | add_project_arguments( |
| 180 | '-Wstrict-prototypes', # Ban K&R Declarations/Definitions. |
| 181 | language: ['c'], native: true) |
Sam Elliott | 58d285f | 2019-11-29 11:58:29 +0000 | [diff] [blame] | 182 | |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 183 | # Common program references. |
| 184 | prog_python = import('python').find_installation('python3') |
Philipp Wagner | 2d14984 | 2020-11-19 22:56:18 +0000 | [diff] [blame] | 185 | prog_env = find_program('env') |
| 186 | prog_srec_cat = find_program('srec_cat') |
| 187 | |
Philipp Wagner | 80cc823 | 2020-10-29 16:26:09 +0000 | [diff] [blame] | 188 | prog_ld = find_program('ld') |
| 189 | prog_as = find_program('as') |
Timothy Chen | 5f7b9c4 | 2019-10-30 22:27:16 -0700 | [diff] [blame] | 190 | prog_objdump = find_program('objdump') |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 191 | prog_objcopy = find_program('objcopy') |
Philipp Wagner | 2d14984 | 2020-11-19 22:56:18 +0000 | [diff] [blame] | 192 | |
| 193 | prog_otbn_as = meson.source_root() / 'hw/ip/otbn/util/otbn-as' |
| 194 | prog_otbn_ld = meson.source_root() / 'hw/ip/otbn/util/otbn-ld' |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 195 | |
Miguel Young de la Sota | 3fbb28a | 2019-10-16 15:15:07 -0500 | [diff] [blame] | 196 | # Hardware register headers. These are generated from HJSON files, and accesible |
| 197 | # in C via |#include "{IP_NAME}_regs.h"|. |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 198 | gen_hw_hdr = generator( |
| 199 | prog_python, |
| 200 | output: '@BASENAME@_regs.h', |
| 201 | arguments: [ |
| 202 | '@SOURCE_DIR@/util/regtool.py', '-D', '-o', '@BUILD_DIR@/@BASENAME@_regs.h', |
| 203 | '@INPUT@', |
| 204 | ], |
| 205 | ) |
| 206 | |
| 207 | # TODO: Considering moving these into hw/ip directories. |
Pirmin Vogel | 8488477 | 2020-11-27 18:03:19 +0100 | [diff] [blame] | 208 | TOPNAME='top_earlgrey' |
Pirmin Vogel | def712f | 2019-10-24 18:57:36 +0100 | [diff] [blame] | 209 | hw_ip_aes_reg_h = gen_hw_hdr.process('hw/ip/aes/data/aes.hjson') |
Philipp Wagner | c658d4e | 2021-03-24 14:43:11 +0000 | [diff] [blame] | 210 | hw_ip_alert_handler_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/alert_handler/data/autogen/alert_handler.hjson') |
Silvestrs Timofejevs | 947a44a | 2020-12-04 16:42:29 +0000 | [diff] [blame] | 211 | hw_ip_aon_timer_reg_h = gen_hw_hdr.process('hw/ip/aon_timer/data/aon_timer.hjson') |
Michael Munday | 5acd3e1 | 2021-01-22 13:36:25 +0000 | [diff] [blame] | 212 | hw_ip_clkmgr_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/clkmgr/data/autogen/clkmgr.hjson') |
Miguel Young de la Sota | 48771f3 | 2021-02-10 13:30:47 -0500 | [diff] [blame] | 213 | hw_ip_entropy_reg_h = gen_hw_hdr.process('hw/ip/entropy_src/data/entropy_src.hjson') |
Pirmin Vogel | 8488477 | 2020-11-27 18:03:19 +0100 | [diff] [blame] | 214 | hw_ip_flash_ctrl_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/flash_ctrl/data/autogen/flash_ctrl.hjson') |
Tobias Wölfel | 4c5fbec | 2019-10-23 12:43:17 +0200 | [diff] [blame] | 215 | hw_ip_gpio_reg_h = gen_hw_hdr.process('hw/ip/gpio/data/gpio.hjson') |
| 216 | hw_ip_hmac_reg_h = gen_hw_hdr.process('hw/ip/hmac/data/hmac.hjson') |
Michael Munday | a753d34 | 2021-03-22 14:08:15 +0000 | [diff] [blame] | 217 | hw_ip_kmac_reg_h = gen_hw_hdr.process('hw/ip/kmac/data/kmac.hjson') |
Miguel Young de la Sota | 92bc4cc | 2020-04-09 12:32:43 -0400 | [diff] [blame] | 218 | hw_ip_i2c_reg_h = gen_hw_hdr.process('hw/ip/i2c/data/i2c.hjson') |
Alphan Ulusoy | 910cd22 | 2020-11-16 15:04:02 -0500 | [diff] [blame] | 219 | hw_ip_keymgr_reg_h = gen_hw_hdr.process('hw/ip/keymgr/data/keymgr.hjson') |
Miguel Young de la Sota | 29a1e35 | 2020-11-18 10:49:59 -0500 | [diff] [blame] | 220 | hw_ip_lc_ctrl_reg_h = gen_hw_hdr.process('hw/ip/lc_ctrl/data/lc_ctrl.hjson') |
Philipp Wagner | 5c2d294 | 2020-06-22 11:34:00 +0100 | [diff] [blame] | 221 | hw_ip_otbn_reg_h = gen_hw_hdr.process('hw/ip/otbn/data/otbn.hjson') |
Miguel Young de la Sota | 1fac782 | 2020-09-18 13:47:28 -0400 | [diff] [blame] | 222 | hw_ip_otp_ctrl_reg_h = gen_hw_hdr.process('hw/ip/otp_ctrl/data/otp_ctrl.hjson') |
Tobias Wölfel | 4c5fbec | 2019-10-23 12:43:17 +0200 | [diff] [blame] | 223 | hw_ip_spi_device_reg_h = gen_hw_hdr.process('hw/ip/spi_device/data/spi_device.hjson') |
Timothy Chen | 4ca4a2f | 2021-03-19 13:51:39 -0700 | [diff] [blame] | 224 | hw_ip_sram_ctrl_reg_h = gen_hw_hdr.process('hw/ip/sram_ctrl/data/sram_ctrl.hjson') |
| 225 | hw_ip_entropy_src_reg_h = gen_hw_hdr.process('hw/ip/entropy_src/data/entropy_src.hjson') |
| 226 | hw_ip_csrng_reg_h = gen_hw_hdr.process('hw/ip/csrng/data/csrng.hjson') |
| 227 | hw_ip_edn_reg_h = gen_hw_hdr.process('hw/ip/edn/data/edn.hjson') |
Tobias Wölfel | 4c5fbec | 2019-10-23 12:43:17 +0200 | [diff] [blame] | 228 | hw_ip_rv_timer_reg_h = gen_hw_hdr.process('hw/ip/rv_timer/data/rv_timer.hjson') |
| 229 | hw_ip_uart_reg_h = gen_hw_hdr.process('hw/ip/uart/data/uart.hjson') |
| 230 | hw_ip_usbdev_reg_h = gen_hw_hdr.process('hw/ip/usbdev/data/usbdev.hjson') |
Pirmin Vogel | 8488477 | 2020-11-27 18:03:19 +0100 | [diff] [blame] | 231 | hw_ip_pwrmgr_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/pwrmgr/data/autogen/pwrmgr.hjson') |
| 232 | hw_ip_rstmgr_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/rstmgr/data/autogen/rstmgr.hjson') |
| 233 | hw_top_earlgrey_pinmux_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/pinmux/data/autogen/pinmux.hjson') |
| 234 | hw_top_earlgrey_rv_plic_reg_h = gen_hw_hdr.process('hw/' + TOPNAME + '/ip/rv_plic/data/autogen/rv_plic.hjson') |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 235 | |
Sam Elliott | 7e36bd7 | 2020-04-22 14:05:49 +0100 | [diff] [blame] | 236 | # Top Earlgrey library (top_earlgrey) |
| 237 | # The sources for this are generated into the hw hierarchy. |
| 238 | top_earlgrey = declare_dependency( |
| 239 | link_with: static_library( |
| 240 | 'top_earlgrey_ot', |
| 241 | sources: [ |
Pirmin Vogel | 8488477 | 2020-11-27 18:03:19 +0100 | [diff] [blame] | 242 | 'hw/' + TOPNAME + '/sw/autogen/top_earlgrey.c', |
Sam Elliott | 7e36bd7 | 2020-04-22 14:05:49 +0100 | [diff] [blame] | 243 | ], |
| 244 | ) |
| 245 | ) |
| 246 | |
Miguel Osorio | 03f2e23 | 2019-09-17 19:44:37 -0700 | [diff] [blame] | 247 | subdir('sw') |
Philipp Wagner | 7f9a5bb | 2020-11-19 22:59:59 +0000 | [diff] [blame] | 248 | |
| 249 | # Write environment file |
| 250 | prog_meson_write_env = meson.source_root() / 'util/meson_write_env.py' |
| 251 | r = run_command( |
| 252 | prog_python, |
| 253 | prog_meson_write_env, |
| 254 | |
| 255 | '--out-file', |
| 256 | meson.current_build_dir() / '.env', |
| 257 | |
| 258 | 'PYTHON=@0@'.format(prog_python.path()), |
| 259 | 'OTBN_AS=@0@'.format(prog_otbn_as), |
| 260 | 'OTBN_LD=@0@'.format(prog_otbn_ld), |
| 261 | 'RV32_TOOL_OBJCOPY=@0@'.format(prog_objcopy.path()), |
| 262 | 'RV32_TOOL_AS=@0@'.format(prog_as.path()), |
| 263 | 'RV32_TOOL_LD=@0@'.format(prog_ld.path()), |
| 264 | 'RV32_TOOL_OBJDUMP=@0@'.format(prog_objdump.path()), |
| 265 | 'RV32_TOOL_OBJCOPY=@0@'.format(prog_objcopy.path()), |
| 266 | ) |
| 267 | assert(r.returncode() == 0, 'Error while calling meson_write_env.py.\n' + |
| 268 | 'STDOUT:\n' + r.stdout().strip() + '\n' + |
| 269 | 'STDERR:\n ' + r.stderr().strip()) |
| 270 | message(r.stdout().strip()) |