blob: 71b236c3c520373578ba93289e63c44404dbf726 [file] [log] [blame]
Armando Montanez08745582019-12-12 10:51:50 -08001.. _chapter-stm32f429i-disc1:
2
3.. default-domain:: cpp
4
5.. highlight:: sh
6
7----------------
8stm32f429i-disc1
9----------------
10The STMicroelectronics STM32F429I-DISC1 development board is currently Pigweed's
11primary target for on-device testing and development.
12
13Building
14========
15To build for this target, change the ``pw_target_config`` GN build arg to point
16to this target's configuration file.
17
18.. code:: sh
19
20 $ gn gen --args='pw_target_config = "//targets/stm32f429i-disc1/target_config.gni"' out/disco
21 $ ninja -C out/disco
22
23or
24
25.. code:: sh
26
27 $ gn gen out/disco
28 $ gn args
29 # Modify and save the args file to update the pw_target_config.
30 pw_target_config = "//targets/stm32f429i-disc1/target_config.gni"
31 $ ninja -C out/disco
32
33Testing
34=======
35The default Pigweed build target will build all of the pigweed module unit
36tests. These tests can be run on-device in a few different ways.
37
38Run a unit test
39---------------
40Test if using ``out/disco`` as your build directory, tests will be located in
41``out/disco/obj/[module name]/[test_name].elf``. To run these on device, the
42stm32f429i-disc1 target provides a helper script that flashes the test to a
43device and then runs it.
44
45.. code:: sh
46
47 # Setup pigweed environment.
48 $ . env_setup/setup.sh
49 # Run test.
50 $ stm32f429i_disc1_unit_test_runner /path/to/binary
51
52Run multiple tests
53------------------
54Running all tests one-by-one is rather tedious. To make running multiple
55tests easier, use Pigweed's ``pw test`` command and pass it your build directory
56and the name of the test runner. By default, ``pw test`` will run all tests,
57but you can restrict it to specific groups using the ``--group`` flag.
58Individual test binaries can be specified with the ``--test`` flag as well.
59
60.. code:: sh
61
62 # Setup pigweed environment.
63 $ . env_setup/setup.sh
64 # Run test.
65 $ pw test --root out/disco/ --runner stm32f429i_disc1_unit_test_runner