Skip to content

Commit

Permalink
Merge pull request #24 from IvanArkhipov1999/19-readmes
Browse files Browse the repository at this point in the history
Fix main readme and write readme for c example
  • Loading branch information
IvanArkhipov1999 authored Mar 30, 2024
2 parents ab7b015 + 8da1ba2 commit 8c36249
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Martos ci workflow

on:
push:
Expand Down
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Martos
![Martos ci workflow](https://github.com/IvanArkhipov1999/Martos/actions/workflows/rust.yml/badge.svg)

Martos is a simple RTOS for developing multi-agent real-time systems.
Software for Martos can be written on both Rust (recommended) and C languages.
Martos is an elegant real-time operating system designed for creating complex multi-agent systems.
Developers have the flexibility to write software for Martos using either Rust (preferred) or C languages.

In current version it has only primitive task manager and timer counter.
In its current version, Martos features a basic task manager and timer counter.

## Programming on Rust
For writing software on Rust you can use Martos as dependency:
## Programming in Rust
To develop software in Rust, you have the option to incorporate the Martos as a dependency:
```
[dependencies]
ma_rtos = ...
ma_rtos = { git = "https://github.com/IvanArkhipov1999/Martos" }
```

Rust examples for different architecures you can see in examples/rust-examples.
You can explore a variety of Rust examples showcasing different architectures in the ['examples/rust-examples'](https://github.com/IvanArkhipov1999/Martos/tree/main/examples/rust-examples) directory.

## Programming on C
For writing software on C you can link your project with Martos static library.
You can get Martos static library from release artifacts.
If you want to build Martos static library yourself, see c-library directory.
It contains static library targets for different architectures.
## Programming in C
To develop software in C, you have the option to incorporate the Martos static library into your project:
```
target_link_libraries(target-name path-to-static-lib.a -Wl,--allow-multiple-definition)
```

You can obtain the Martos static library for supported architectures from either the release artifacts or the continuous integration (CI) artifacts.
If you wish to compile the Martos static library on your own, please refer to the ['c-library'](https://github.com/IvanArkhipov1999/Martos/tree/main/c-library) directory,
which includes static library targets tailored for various architectures.

C examples for different architecures you can see in examples/c-examples.
You can explore diverse C examples tailored for various architectures in the ['examples/c-examples'](https://github.com/IvanArkhipov1999/Martos/tree/main/examples/c-examples) directory.
39 changes: 39 additions & 0 deletions examples/c-examples/xtensa-esp32/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
# C example for xtensa esp32 architecture

Presented here is a straightforward C example utilizing Martos.

Within the setup function, the phrase 'Setup hello world!' is printed once.
Additionally, within the loop function, the phrase 'Loop hello world!' along with the counter value is printed fifty times.

## How to install dependencies

For comprehensive guidance on installing the necessary dependencies for developing applications targeting the Xtensa ESP32 architecture,
please refer to [the official website](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#manual-installation).
Below is an illustrative example demonstrating the installation of building toolchains on a Linux (Ubuntu/Debian):
```
sudo apt-get install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
mkdir -p ~/esp
cd ~/esp
git clone -b v5.2 --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh esp32
```

## How to build the example

For a thorough guide on developing projects for the Xtensa ESP32 architecture across various operating systems,
we recommend consulting [the official website](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#build-your-first-project).
Below, you will find an illustrative example showcasing the building process on a Linux system (Ubuntu/Debian):
```
. $HOME/esp/esp-idf/export.sh
idf.py build
```

## How to run the example
For detailed instructions on running projects for the Xtensa ESP32 architecture across various operating systems,
we recommend consulting [the official website](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#build-your-first-project).
Below, you will find an illustrative example showcasing the running on a Linux system (Ubuntu/Debian):
```
idf.py -p PORT monitor
```

"PORT" refers to the designated name of your serial port.

0 comments on commit 8c36249

Please sign in to comment.