Skip to content
This repository was archived by the owner on Dec 6, 2018. It is now read-only.

Commit 9ff344b

Browse files
committed
Merge pull request #387 from forGGe/g378_migrate_blinky
Merge blinky examples and update docs
2 parents bfdb4b5 + efb61eb commit 9ff344b

File tree

13 files changed

+90
-218
lines changed

13 files changed

+90
-218
lines changed

doc/sphinx/source/examples/blinky.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.. _theCore_blinky:
2+
3+
Simple LED blink example
4+
------------------------
5+
6+
:Location: https://github.com/theCore-embedded/example_blinky
7+
:External HW: none
8+
9+
This example flashes available LEDs on supported boards, one by one.
10+
11+
Supported targets (boards)
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
14+
+---------------------+--------------------------+-----------------------------------+
15+
| Target name | Configuration file | Description |
16+
+=====================+==========================+===================================+
17+
| stm32f4_disc | stm32f4_discovery.json | STM32F4 discovery board |
18+
+---------------------+--------------------------+-----------------------------------+
19+
| tiva_tm4c_launchpad | tiva_tm4c_launchpad.json | TM4C123G LaunchPad Evaluation Kit |
20+
+---------------------+--------------------------+-----------------------------------+
21+
22+
Wiring
23+
~~~~~~
24+
25+
No special wiring is required. Just connect the board to the powered USB port.
26+
27+
Building
28+
~~~~~~~~
29+
30+
#. Install theCore (this may take a while)::
31+
32+
pip3 install tcore
33+
tcore bootstrap
34+
35+
#. Download this example::
36+
37+
tcore init --remote https://github.com/theCore-embedded/example_blinky
38+
39+
#. Step into the project directory::
40+
41+
cd example_blinky
42+
43+
#. Compile:
44+
45+
* For STM32 Discovery board::
46+
47+
cd example_blinky
48+
tcore compile --target stm32f4_disc
49+
50+
* For Tiva TM4C LaunchPad::
51+
52+
tcore compile --target tiva_tm4c_launchpad
53+
54+
Running
55+
~~~~~~~
56+
57+
#. Connect your board.
58+
59+
#. Run:
60+
61+
* For TivaC launchpad::
62+
63+
tcore --sudo flash
64+
65+
* For old STM32F407G-DISC boards, with STLINK/V2::
66+
67+
tcore --sudo flash
68+
69+
* For new STM32F407G-DISC1 boards, with STLINK/V2.1::
70+
71+
tcore --sudo flash --debugger-config stlink-v2.1
72+
73+
Expected output
74+
~~~~~~~~~~~~~~~
75+
76+
On-board LEDs will blink with the different (RGB) colors.

doc/sphinx/source/examples/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ Examples
77
:maxdepth: 2
88
:includehidden:
99

10+
blinky
1011
hello-world-host
1112
stm32f4-discovery-htu21d-sensor
1213
stm32f4-discovery-cs43l22
1314
stm32f4-discovery-exti
14-
stm32f4-discovery-blink
1515
stm32f4-discovery-bluetooth-hm10
16-
ti-tm4c123g-launchpad-blink
1716
ti-tm4c123g-sdcard-fatfs-sdspi
1817

1918
theCore examples are organized in a form of separate projects that can be

doc/sphinx/source/examples/stm32f4-discovery-blink.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/sphinx/source/examples/stm32f4-discovery-cs43l22.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
STM32F4 discovery audio example with CS43L22 audio DAC
44
------------------------------------------------------
55

6-
:Location: ``examples/cs43l22_audio``
7-
:Target: STM32F4 Discovery board
6+
:Location: https://github.com/theCore-embedded/example_cs43l22_audio
87
:External HW: UART-to-USB converter attached to the USART3, headphones
9-
:Toolchain: GNU arm-none-eabi v.5.2 or newer
10-
:Additional SW: openocd, minicom
8+
9+
Supported targets (boards)
10+
~~~~~~~~~~~~~~~~~~~~~~~~~~
11+
12+
+---------------------+--------------------------+-----------------------------------+
13+
| Target name | Configuration file | Description |
14+
+=====================+==========================+===================================+
15+
| stm32f4_disc | stm32f4_discovery.json | STM32F4 discovery board |
16+
+---------------------+--------------------------+-----------------------------------+
1117

1218
Wiring
1319
~~~~~~
@@ -83,7 +89,7 @@ Firmware will be flashed via ``openocd`` debugger and ``flash`` command.
8389

8490
::
8591

86-
tcore flash --sudo --debuger-config stlink-v2.1
92+
tcore flash --sudo --debugger-config stlink-v2.1
8793

8894
See :ref:`theCore_SudoOpenOCD_Nix` section to get insight why ``which openocd``
8995
is important.
@@ -105,13 +111,6 @@ In ``minicom`` you should be able to see::
105111
Welcome to theCore
106112
Playing audio sample...
107113

108-
109114
In headphones you should hear cool 8-bit sound.
110115

111-
Target JSON config for the audio example
112-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113-
114-
.. literalinclude:: ../../../../examples/cs43l22_audio/stm32f4_cs43l22.json
115-
116-
117116
.. _such as this: http://www.geekfactory.mx/wp-content/uploads/2013/06/converdidor_usb_ttl_rs232_pl_2303hx_01.jpg

doc/sphinx/source/examples/ti-tm4c123g-launchpad-blink.rst

Lines changed: 0 additions & 61 deletions
This file was deleted.

doc/sphinx/source/platform/ti-tivac-tm4c123g.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Available examples
5050
~~~~~~~~~~~~~~~~~~
5151

5252
* :ref:`theCore_TM4C_FATFS_SDSPI`
53-
* :ref:`theCore_TM4C_Blinky`
53+
* :ref:`theCore_blinky`
5454

5555
Periphery overview
5656
~~~~~~~~~~~~~~~~~~

examples/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,6 @@ ExternalProject_Add(stm32f4_hm10_example
7070
BUILD_ALWAYS 1 # Allows to rebuild external project if its files changes
7171
INSTALL_COMMAND echo "Install isn't required, skipping...")
7272

73-
################################################################################
74-
# TM4C Led example.
75-
################################################################################
76-
77-
ExternalProject_Add(tm4c_led_example
78-
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/tm4c_led
79-
CMAKE_ARGS
80-
-DTHECORE_BUILD_THIRDPARTY_DIR=${THECORE_BUILD_THIRDPARTY_DIR}
81-
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
82-
-DCMAKE_TOOLCHAIN_FILE=${ARM_CM4_GNU_TOOLCHAIN}
83-
BUILD_ALWAYS 1 # Allows to rebuild external project if its files changes
84-
INSTALL_COMMAND echo "Install isn't required, skipping...")
85-
8673
################################################################################
8774
# TM4C FATFS over SDSPI example
8875
################################################################################

examples/tm4c_led/CMakeLists.txt

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/tm4c_led/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/tm4c_led/main.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)