cmake: armfvp: allow for extra arguments
Taking example on the qemu cmake file. Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
This commit is contained in:
parent
e7a4aec3c9
commit
562069d4ed
|
@ -63,6 +63,19 @@ UART0.
|
|||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Environment
|
||||
===========
|
||||
|
||||
First, set the ``ARMFVP_BIN_PATH`` environment variable before building.
|
||||
Optionally, set ``ARMFVP_EXTRA_FLAGS`` to pass additional arguments to the FVP.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARMFVP_BIN_PATH=/path/to/fvp/directory
|
||||
|
||||
Programming
|
||||
===========
|
||||
|
||||
Use this configuration to build basic Zephyr applications and kernel tests in the
|
||||
Arm FVP emulated environment, for example, with the :ref:`synchronization_sample`:
|
||||
|
||||
|
@ -72,14 +85,8 @@ Arm FVP emulated environment, for example, with the :ref:`synchronization_sample
|
|||
:board: fvp_baser_aemv8r_aarch32
|
||||
:goals: build
|
||||
|
||||
This will build an image with the synchronization sample app. To run with FVP,
|
||||
first set environment variable ``ARMFVP_BIN_PATH`` before using it. Then you
|
||||
can run it with ``west build -t run``.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARMFVP_BIN_PATH=/path/to/fvp/directory
|
||||
west build -t run
|
||||
This will build an image with the synchronization sample app.
|
||||
Then you can run it with ``west build -t run``.
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
|
|
@ -56,6 +56,19 @@ Known Problems or Limitations
|
|||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Environment
|
||||
===========
|
||||
|
||||
First, set the ``ARMFVP_BIN_PATH`` environment variable before building.
|
||||
Optionally, set ``ARMFVP_EXTRA_FLAGS`` to pass additional arguments to the FVP.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARMFVP_BIN_PATH=/path/to/fvp/directory
|
||||
|
||||
Programming
|
||||
===========
|
||||
|
||||
Use this configuration to build basic Zephyr applications and kernel tests in the
|
||||
ARM FVP emulated environment, for example, with the :ref:`synchronization_sample`:
|
||||
|
||||
|
@ -66,10 +79,7 @@ ARM FVP emulated environment, for example, with the :ref:`synchronization_sample
|
|||
:goals: build
|
||||
|
||||
This will build an image with the synchronization sample app.
|
||||
|
||||
To run with FVP, ARMFVP_BIN_PATH must be set before running:
|
||||
|
||||
e.g. export ARMFVP_BIN_PATH=<path/to/fvp/dir>
|
||||
Then you can run it with ``west build -t run``.
|
||||
|
||||
Running Zephyr at EL1NS
|
||||
***********************
|
||||
|
|
|
@ -70,6 +70,19 @@ UART0.
|
|||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Environment
|
||||
===========
|
||||
|
||||
First, set the ``ARMFVP_BIN_PATH`` environment variable before building.
|
||||
Optionally, set ``ARMFVP_EXTRA_FLAGS`` to pass additional arguments to the FVP.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARMFVP_BIN_PATH=/path/to/fvp/directory
|
||||
|
||||
Programming
|
||||
===========
|
||||
|
||||
Use this configuration to build basic Zephyr applications and kernel tests in the
|
||||
Arm FVP emulated environment, for example, with the :ref:`synchronization_sample`:
|
||||
|
||||
|
@ -79,14 +92,8 @@ Arm FVP emulated environment, for example, with the :ref:`synchronization_sample
|
|||
:board: fvp_baser_aemv8r
|
||||
:goals: build
|
||||
|
||||
This will build an image with the synchronization sample app. To run with FVP,
|
||||
first set environment variable ``ARMFVP_BIN_PATH`` before using it. Then you
|
||||
can run it with ``west build -t run``.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARMFVP_BIN_PATH=/path/to/fvp/directory
|
||||
west build -t run
|
||||
This will build an image with the synchronization sample app.
|
||||
Then you can run it with ``west build -t run``.
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2021 Arm Limited (or its affiliates). All rights reserved.
|
||||
# Copyright (c) 2021-2022 Arm Limited (or its affiliates). All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set(armfvp_bin_path $ENV{ARMFVP_BIN_PATH})
|
||||
|
@ -60,10 +60,16 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
# Use flags passed in from the environment
|
||||
set(env_fvp $ENV{ARMFVP_EXTRA_FLAGS})
|
||||
separate_arguments(env_fvp)
|
||||
list(APPEND ARMFVP_EXTRA_FLAGS ${env_fvp})
|
||||
|
||||
add_custom_target(run_armfvp
|
||||
COMMAND
|
||||
${ARMFVP}
|
||||
${ARMFVP_FLAGS}
|
||||
${ARMFVP_EXTRA_FLAGS}
|
||||
DEPENDS ${logical_target_for_zephyr_elf}
|
||||
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
||||
COMMENT "${ARMFVP_BIN_NAME}: ${armfvp_version}"
|
||||
|
|
Loading…
Reference in a new issue