Skip to content

Commit

Permalink
Update various docs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Feb 4, 2024
1 parent 6cec680 commit 247bc08
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 18 deletions.
8 changes: 4 additions & 4 deletions examples/chapter02_02/cstdint
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2021.
// Copyright Christopher Kormanyos 2007 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef _CSTDINT_2010_02_23_H_
#define _CSTDINT_2010_02_23_H_
#ifndef _CSTDINT_2010_02_23
#define _CSTDINT_2010_02_23

#include <stdint.h>

Expand Down Expand Up @@ -45,4 +45,4 @@
typedef ::uintmax_t uintmax_t;
}

#endif // _CSTDINT_2010_02_23_H_
#endif // _CSTDINT_2010_02_23
2 changes: 1 addition & 1 deletion examples/chapter02_02/led.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2023.
// Copyright Christopher Kormanyos 2007 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
2 changes: 1 addition & 1 deletion examples/chapter02_02/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## The LED program

<p align="center">
<a href="https://godbolt.org/z/v5f45fMqq" alt="godbolt">
<a href="https://godbolt.org/z/fxWzb6h6f" alt="godbolt">
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
</p>

Expand Down
17 changes: 16 additions & 1 deletion examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Real-Time-C++ - Examples
<img src="https://github.com/ckormanyos/real-time-cpp/actions/workflows/real-time-cpp-examples.yml/badge.svg" alt="Build Examples"></a>
<a href="https://github.com/ckormanyos/real-time-cpp/blob/master/LICENSE_1_0.txt">
<img src="https://img.shields.io/badge/license-BSL%201.0-blue.svg" alt="Boost Software License 1.0"></a>
<a href="https://godbolt.org/z/fxWzb6h6f" alt="godbolt">
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
</p>

These examples are motivated by the book
Expand All @@ -15,7 +17,6 @@ Efficient Object-Oriented
and Template Microcontroller Programming, Fourth Edition
(Springer, Heidelberg, 2021) ISBN 9783662629956.


The first couple of example projects can use the ARDUINO board directly
and non-modified. Examples from the later chapters in the book do, however,
need additional components at times. These need to be provided independently.
Expand Down Expand Up @@ -122,3 +123,17 @@ over multitasking using time slices.

For further informatin on the examples, see the readme notes
in each individual example directory.

## Try it at _godbolt_

<p align="center">
<a href="https://godbolt.org/z/fxWzb6h6f" alt="godbolt">
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
</p>

Use this [short link](https://godbolt.org/z/fxWzb6h6f)
to [godbolt](https://godbolt.org) in order to further explore this program.

In the afore-mentioned link, the main source file of
Example ![chapter02_02](https://github.com/ckormanyos/real-time-cpp/tree/master/examples/chapter02_02)
(the LED program) is compiled with a modern `avr-gcc` compiler.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ The reference application supports the following targets:
## Getting Started with the Reference Application

It is easiest to get started with the reference application using one of the
supported boards, such as Arduino or RaspberryPi ZERO or BeagleBone, etc.
supported boards, such as `avr` (ARDUINO) or `bcm2835_raspi_b`
(RaspberryPi ZERO) or `am335x` (BeagleBoneBlack), etc.
The reference application can be found
in the directory [ref_app](./ref_app) and its
subdirectories.
Expand Down
14 changes: 7 additions & 7 deletions ref_app/src/app/benchmark/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ template class.
A typical range of performance classes is shown in the following table.
The benchmark used is a ${\sim}100$ decimal digit AGM $\pi$ calculation.

| Target | runtime [ms] | relative |
|-------------|---------------|------------|
| am335x | 1.5 | 1.0 |
| stm32f446 | 2.5 | 1.7 |
| avr | 470 | 370 |
| Target | runtime $[ms]$ | relative |
|-------------|-----------------|------------|
| `am335x` | 1.5 | 1.0 |
| `stm32f446` | 5.1 | 3.4 |
| `avr` | 420 | 280 |

There are strikingly differing performance classes
for the $8$-bit MICROCHIP(R) AVR controller of the Arduino
for the $8$-bit MICROCHIP(R) AVR controller of the ARDUINO
and the $32$-bit ARM(R) 8 controller
of the BeagleBone Black Edition, Rev. C.
The $\pi$ calculation requires approximately
$470~\text{ms}$ and $1.5~\text{ms}$,
$420~\text{ms}$ and $1.5~\text{ms}$,
respectively, on these two microcontroller systems.
2 changes: 1 addition & 1 deletion ref_app/src/mcal/nxp_imxrt1062/mcal_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// NOTE: The following table reproduces the layout information of Teensy 4.0.
// See also: https://github.com/KurtE/TeensyDocuments
//
// Teensy-Pin "Arduino"-Pin Name GPIO
// Teensy-Pin "ARDUINO"-Pin Name GPIO
// 1 AD_B0_02 1.02
// 0 AD_B0_03 1.03
// 24 A10 AD_B0_12 1.12
Expand Down
4 changes: 2 additions & 2 deletions ref_app/target/build/build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@rem
@rem Copyright Christopher Kormanyos 2007 - 2023.
@rem Copyright Christopher Kormanyos 2007 - 2024.
@rem Distributed under the Boost Software License,
@rem Version 1.0. (See accompanying file LICENSE_1_0.txt
@rem or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -11,7 +11,7 @@
@rem
@rem %1: target
@rem am335x : BeagleBone with TI(R) AM3359, creates a bare-metal binary file "MLO"
@rem avr : ATMEL(R) AVR(R) ATmega328P i.e., Arduino compatible
@rem avr : ATMEL(R) AVR(R) ATmega328P i.e., ARDUINO compatible
@rem bcm2835_raspi_b : RaspberryPi Zero, creates a bare-metal binary file "kernel.img"
@rem rl78 : Renesas(R) RL78
@rem rx63n : Renesas(R) RX600
Expand Down

0 comments on commit 247bc08

Please sign in to comment.