[6d85e05] | 1 | ## |
---|
| 2 | # |
---|
| 3 | # @file |
---|
| 4 | # |
---|
[6f5d88a] | 5 | # @brief Configure script of LibBSP for riscv BSP. |
---|
[6d85e05] | 6 | # |
---|
| 7 | |
---|
| 8 | AC_PREREQ([2.69]) |
---|
[6f5d88a] | 9 | AC_INIT([rtems-c-src-lib-libbsp-riscv],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla]) |
---|
[6d85e05] | 10 | RTEMS_TOP(../../../../../..) |
---|
[2afb22b] | 11 | RTEMS_SOURCE_TOP |
---|
| 12 | RTEMS_BUILD_TOP |
---|
[6d85e05] | 13 | |
---|
| 14 | RTEMS_CANONICAL_TARGET_CPU |
---|
[4ff09d5b] | 15 | AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) |
---|
[6d85e05] | 16 | RTEMS_BSP_CONFIGURE |
---|
| 17 | |
---|
[fe2cd01b] | 18 | RTEMS_BSPOPTS_SET([BSP_START_COPY_FDT_FROM_U_BOOT],[*],[1]) |
---|
| 19 | RTEMS_BSPOPTS_HELP([BSP_START_COPY_FDT_FROM_U_BOOT],[copy the U-Boot provided FDT to an internal storage]) |
---|
| 20 | |
---|
| 21 | RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_SIZE_MAX],[*],[65536]) |
---|
| 22 | RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_SIZE_MAX],[maximum size of the FDT blob in bytes]) |
---|
| 23 | |
---|
| 24 | RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_READ_ONLY],[*],[1]) |
---|
| 25 | RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_READ_ONLY],[place the FDT blob into the read-only data area]) |
---|
| 26 | |
---|
| 27 | RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[*],[1]) |
---|
| 28 | RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[copy the FDT blob into the read-only load area via bsp_fdt_copy()]) |
---|
| 29 | |
---|
[1a19239] | 30 | RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[115200]) |
---|
| 31 | RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],[default baud for console driver devices (default 115200)]) |
---|
| 32 | |
---|
[8db3f0e] | 33 | RTEMS_BSPOPTS_SET([RISCV_MAXIMUM_EXTERNAL_INTERRUPTS],[*],[64]) |
---|
| 34 | RTEMS_BSPOPTS_HELP([RISCV_MAXIMUM_EXTERNAL_INTERRUPTS],[maximum number of external interrupts supported by the BSP (default 64)]) |
---|
| 35 | |
---|
[1232cd46] | 36 | RTEMS_BSPOPTS_SET([RISCV_ENABLE_HTIF_SUPPORT],[*],[1]) |
---|
| 37 | RTEMS_BSPOPTS_HELP([RISCV_ENABLE_HTIF_SUPPORT],[enables the HTIF support if defined to a non-zero value, otherwise it is disabled (enabled by default)]) |
---|
| 38 | |
---|
[1a19239] | 39 | RTEMS_BSPOPTS_SET([RISCV_CONSOLE_MAX_NS16550_DEVICES],[*],[2]) |
---|
| 40 | RTEMS_BSPOPTS_HELP([RISCV_CONSOLE_MAX_NS16550_DEVICES],[maximum number of NS16550 devices supported by the console driver (2 by default)]) |
---|
| 41 | |
---|
[3dd381f] | 42 | RTEMS_BSP_CLEANUP_OPTIONS |
---|
[6d85e05] | 43 | |
---|
[16d905f] | 44 | case "${RTEMS_BSP}" in |
---|
| 45 | rv64*medany) |
---|
| 46 | RISCV_RAM_REGION_BEGIN_DEFAULT=0x80000000 |
---|
| 47 | ;; |
---|
| 48 | rv64*) |
---|
| 49 | RISCV_RAM_REGION_BEGIN_DEFAULT=0x70000000 |
---|
| 50 | ;; |
---|
| 51 | *) |
---|
| 52 | RISCV_RAM_REGION_BEGIN_DEFAULT=0x80000000 |
---|
| 53 | ;; |
---|
| 54 | esac |
---|
| 55 | |
---|
| 56 | AC_DEFUN([RISCV_LINKCMD],[ |
---|
| 57 | AC_ARG_VAR([$1],[$2])dnl |
---|
| 58 | [$1]=[$]{[$1]:-[$3]} |
---|
| 59 | ]) |
---|
| 60 | |
---|
| 61 | RISCV_LINKCMD([RISCV_RAM_REGION_BEGIN],[begin of the RAM region for linker command file (default is 0x70000000 for 64-bit with -mcmodel=medlow and 0x80000000 for all other)],[${RISCV_RAM_REGION_BEGIN_DEFAULT}]) |
---|
| 62 | RISCV_LINKCMD([RISCV_RAM_REGION_SIZE],[size of the RAM region for linker command file (default 64MiB)],[0x04000000]) |
---|
| 63 | |
---|
| 64 | AC_CONFIG_FILES([ |
---|
| 65 | Makefile |
---|
| 66 | linkcmds:../../../../../../bsps/riscv/riscv/start/linkcmds.in |
---|
| 67 | ]) |
---|
[6d85e05] | 68 | AC_OUTPUT |
---|