@@ -25,53 +25,65 @@ Wiring
25
25
| GND | module's GND |
26
26
+-------------------+-----------------+
27
27
28
+ Preparing
29
+ ~~~~~~~~~
30
+
31
+ #. Install and initialize theCore (if not done previously)::
32
+
33
+ pip3 install tcore
34
+ # Or if python3-pip is default: pip install tcore
35
+ tcore bootstrap
36
+
37
+
38
+ #. Download the example::
39
+
40
+ tcore init --remote https://github.com/theCore-embedded/example_cs43l22_audio
41
+ cd example_cs43l22_audio
42
+
28
43
Building
29
44
~~~~~~~~
30
45
31
- #. Complete :ref: `theCore_examples_initial_setup ` section.
32
- #. Execute build commands.
33
- The CMake Toolchain file is required to build this application.
34
- theCore already has one suitable for this target.
46
+ Run ``compile `` command using theCore CLI::
35
47
36
- ::
37
-
38
- cd examples/cs43l22_audio
39
- mkdir build
40
- cd build
41
- cmake -DCMAKE_TOOLCHAIN_FILE=../../../toolchains/arm-cm4-gnu.cmake ..
42
- make
48
+ tcore compile --target stm32f4_disc
43
49
44
50
Running
45
51
~~~~~~~
46
52
47
- Firmware will be flashed via ``openocd `` and ``gdb `` .
53
+ Firmware will be flashed via ``openocd `` debugger and ``flash `` command .
48
54
49
55
#. Connect stm32f4 Discovery board to USB cable and connect USB <-> UART converter to the PC.
50
56
51
57
#. Launch ``minicom `` with device associated with USB <-> UART converter.
52
58
(``/dev/ttyUSB0 `` here used as an example)::
53
59
54
- # From new terminal
55
- minicom -D /dev/ttyUSB0
60
+ # From new terminal
61
+ tcore runenv "minicom -D /dev/ttyUSB0"
62
+
63
+ Or the same, but with superuser permissions::
64
+
65
+ # From new terminal
66
+ tcore runenv --sudo "minicom -D /dev/ttyUSB0"
56
67
57
68
#. Determine stm32f4discovery board revision.
58
69
59
70
If you don't remember your board revision, check FAQ section
60
71
:ref: `theCore_STM32F4_Discovery_rev `.
61
72
62
- #. Launch ``openocd `` and flash image using script from openocd installation .
73
+ #. Launch ``flash `` command in separate terminal, as shown below .
63
74
64
75
For old STM32F407G-DISC boards, with STLINK/V2:
65
76
66
77
::
67
78
68
- sudo $(which openocd) -f board/stm32f4discovery.cfg -c 'init; reset halt; flash write_image erase audio.bin 0x08000000; reset run; exit'
79
+ tcore flash --sudo
80
+
69
81
70
82
For new STM32F407G-DISC1 boards, with STLINK/V2.1:
71
83
72
84
::
73
85
74
- sudo $(which openocd) -f board/stm32f429disc1.cfg -c 'init; reset halt; flash write_image erase audio.bin 0x08000000; reset run; exit'
86
+ tcore flash --sudo --debuger-config stlink-v2.1
75
87
76
88
See :ref: `theCore_SudoOpenOCD_Nix ` section to get insight why ``which openocd ``
77
89
is important.
@@ -83,6 +95,8 @@ Firmware will be flashed via ``openocd`` and ``gdb``.
83
95
84
96
#. Attach headphones to the audio jack on Discovery board.
85
97
98
+ #. Wear your headphones and enjoy.
99
+
86
100
Expected output
87
101
~~~~~~~~~~~~~~~
88
102
0 commit comments