@@ -25,53 +25,65 @@ Wiring
2525 | GND | module's GND |
2626 +-------------------+-----------------+
2727
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+
2843Building
2944~~~~~~~~
3045
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::
3547
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
4349
4450Running
4551~~~~~~~
4652
47- Firmware will be flashed via ``openocd `` and ``gdb `` .
53+ Firmware will be flashed via ``openocd `` debugger and ``flash `` command .
4854
4955#. Connect stm32f4 Discovery board to USB cable and connect USB <-> UART converter to the PC.
5056
5157#. Launch ``minicom `` with device associated with USB <-> UART converter.
5258 (``/dev/ttyUSB0 `` here used as an example)::
5359
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"
5667
5768#. Determine stm32f4discovery board revision.
5869
5970 If you don't remember your board revision, check FAQ section
6071 :ref: `theCore_STM32F4_Discovery_rev `.
6172
62- #. Launch ``openocd `` and flash image using script from openocd installation .
73+ #. Launch ``flash `` command in separate terminal, as shown below .
6374
6475 For old STM32F407G-DISC boards, with STLINK/V2:
6576
6677 ::
6778
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+
6981
7082 For new STM32F407G-DISC1 boards, with STLINK/V2.1:
7183
7284 ::
7385
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
7587
7688 See :ref: `theCore_SudoOpenOCD_Nix ` section to get insight why ``which openocd ``
7789 is important.
@@ -83,6 +95,8 @@ Firmware will be flashed via ``openocd`` and ``gdb``.
8395
8496#. Attach headphones to the audio jack on Discovery board.
8597
98+ #. Wear your headphones and enjoy.
99+
86100Expected output
87101~~~~~~~~~~~~~~~
88102
0 commit comments