Skip to content

Commit 7b05ace

Browse files
committed
Doc update
1 parent 3f3497d commit 7b05ace

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

README.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ A compact C finite state machine (FSM) implementation that's easy to use on embe
1616
- [Getting Started](#getting-started)
1717
- [Introduction](#introduction)
1818
- [Background](#background)
19-
- [Project Build](#project-build)
20-
- [Windows Visual Studio](#windows-visual-studio)
21-
- [Linux Make](#linux-make)
19+
- [Getting Started](#getting-started-1)
2220
- [Why use a state machine?](#why-use-a-state-machine)
2321
- [State machine design](#state-machine-design)
2422
- [Internal and external events](#internal-and-external-events)
@@ -111,21 +109,14 @@ switch (currentState) {
111109

112110
<p>The first problem revolves around controlling what state transitions are valid and which ones are invalid. There is no way to enforce the state transition rules. Any transition is allowed at any time, which is not particularly desirable. For most designs, only a few transition patterns are valid. Ideally, the software design should enforce these predefined state sequences and prevent the unwanted transitions. Another problem arises when trying to send data to a specific state. Since the entire state machine is located within a single function, sending additional data to any given state proves difficult. And lastly these designs are rarely suitable for use in a multithreaded system. The designer must ensure the state machine is called from a single thread of control.</p>
113111

114-
# Project Build
115-
116-
<a href="https://www.cmake.org">CMake</a> is used to create the build files. CMake is free and open-source software. Windows, Linux and other toolchains are supported. Example CMake console commands executed inside the project root directory:
117-
118-
## Windows Visual Studio
119-
120-
<code>cmake -G "Visual Studio 17 2022" -A Win32 -B Build -S .</code>
121-
122-
After executed, open the Visual Studio project from within the <code>Build</code> directory.
123-
124-
## Linux Make
112+
# Getting Started
125113

126-
<code>cmake -G "Unix Makefiles" -B Build -S .</code>
114+
[CMake](https://cmake.org/) is used to create the project build files on any Windows or Linux machine. The state machine source code works on any C compiler on any platform.
127115

128-
After executed, build the software from within the Build directory using the command <code>make</code>. Run the console app using <code>./C_StateMachineApp</code>.
116+
1. Clone the repository.
117+
2. From the repository root, run the following CMake command:
118+
`cmake -B Build .`
119+
3. Build and run the project within the `Build` directory.
129120

130121
# Why use a state machine?
131122

0 commit comments

Comments
 (0)