blob: 0410651624c13cd26e4d9fab02bef2649ea71922 [file] [log] [blame]
Miguel Osorio03f2e232019-09-17 19:44:37 -07001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
Miguel Young de la Sota76526c32020-01-28 10:24:41 -05005foreach device_name, device_lib : sw_lib_arch_core_devices
6 hello_usbdev_elf = executable(
7 'hello_usbdev_' + device_name,
Sam Elliott390e4702020-04-03 15:29:01 +01008 sources: [
Sam Elliott9c32a362020-04-03 15:34:38 +01009 hw_ip_usbdev_reg_h,
Sam Elliott390e4702020-04-03 15:29:01 +010010 'hello_usbdev.c',
11 ],
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050012 name_suffix: 'elf',
13 dependencies: [
Miguel Young de la Sota10fe7e52020-02-25 17:00:12 -050014 sw_examples_demos,
15 sw_lib_runtime_hart,
16 sw_lib_pinmux,
17 sw_lib_dif_gpio,
18 sw_lib_irq,
Miguel Young de la Sota58ca4b02020-07-23 11:04:55 -040019 sw_lib_dif_spi_device,
Miguel Young de la Sota69a130b2020-09-22 11:41:15 -040020 sw_lib_runtime_log,
Miguel Young de la Sotaa2c37fb2020-09-21 12:18:03 -040021 sw_lib_dif_uart,
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050022 sw_lib_usb,
23 riscv_crt,
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050024 device_lib,
Timothy Trippela47c82c2021-12-07 23:18:49 +000025 sw_lib_testing_ottf_isrs,
Miguel Young de la Sota460a5af2020-07-06 12:11:28 -040026 sw_lib_testing_test_status,
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050027 ],
28 )
Miguel Young de la Sota3c8ab3b2019-11-21 13:59:09 -060029
Alphan Ulusoy9b5b10c2021-05-13 09:49:06 -040030 target_name = 'hello_usbdev_@0@_' + device_name
31
32 hello_usbdev_dis = custom_target(
33 target_name.format('dis'),
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050034 input: hello_usbdev_elf,
Alphan Ulusoy9b5b10c2021-05-13 09:49:06 -040035 kwargs: elf_to_dis_custom_target_args,
36 )
37
38 hello_usbdev_bin = custom_target(
39 target_name.format('bin'),
40 input: hello_usbdev_elf,
41 kwargs: elf_to_bin_custom_target_args,
42 )
43
44 hello_usbdev_vmem32 = custom_target(
45 target_name.format('vmem32'),
46 input: hello_usbdev_bin,
47 kwargs: bin_to_vmem32_custom_target_args,
48 )
49
50 hello_usbdev_vmem64 = custom_target(
51 target_name.format('vmem64'),
52 input: hello_usbdev_bin,
53 kwargs: bin_to_vmem64_custom_target_args,
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050054 )
Miguel Young de la Sota3c8ab3b2019-11-21 13:59:09 -060055
Timothy Chenfeaf3222021-11-02 13:49:43 -070056 hello_usbdev_scr_vmem64 = custom_target(
57 target_name.format('scrambled'),
58 input: hello_usbdev_vmem64,
59 output: flash_image_outputs,
60 command: flash_image_command,
61 depend_files: flash_image_depend_files,
62 build_by_default: true,
63 )
64
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050065 custom_target(
Alphan Ulusoy9b5b10c2021-05-13 09:49:06 -040066 target_name.format('export'),
Philipp Wagner525891d2020-10-30 19:01:04 +000067 command: export_target_command,
Sam Elliott08f926f2020-11-20 13:09:14 +000068 depend_files: [export_target_depend_files,],
Alphan Ulusoy9b5b10c2021-05-13 09:49:06 -040069 input: [
70 hello_usbdev_elf,
71 hello_usbdev_dis,
72 hello_usbdev_bin,
73 hello_usbdev_vmem32,
74 hello_usbdev_vmem64,
Timothy Chenfeaf3222021-11-02 13:49:43 -070075 hello_usbdev_scr_vmem64,
Alphan Ulusoy9b5b10c2021-05-13 09:49:06 -040076 ],
77 output: target_name.format('export'),
Miguel Young de la Sota76526c32020-01-28 10:24:41 -050078 build_always_stale: true,
79 build_by_default: true,
80 )
81endforeach