Skip to content

Commit

Permalink
Merge pull request #560 from ckormanyos/docs_and_syntax
Browse files Browse the repository at this point in the history
Update docs and syntax
  • Loading branch information
ckormanyos authored Oct 14, 2024
2 parents 5c19eb5 + d490862 commit 2eac221
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .tidy/make/make_tidy_03_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TIDY_CHECKS = "*, \
-misc-include-cleaner, \
-misc-const-correctness, \
-performance-avoid-endl, \
-readability-avoid-const-params-in-decls, \
-readability-avoid-const-params-in-decls, \
-readability-identifier-length, \
-readability-identifier-naming, \
-readability-named-parameter, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if (defined(APP_BENCHMARK_TYPE) && (APP_BENCHMARK_TYPE == APP_BENCHMARK_TYPE_TRAPEZOID_INTEGRAL))

// See also: https://godbolt.org/z/8ahv5Ghx5
// See also: https://godbolt.org/z/6cexnsW9Y

#include <cstdint>
#include <limits>
Expand Down
9 changes: 5 additions & 4 deletions ref_app/src/app/benchmark/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img src="https://github.com/ckormanyos/real-time-cpp/actions/workflows/real-time-cpp-benchmarks.yml/badge.svg" alt="Build Benchmarks"></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/8ahv5Ghx5" alt="godbolt">
<a href="https://godbolt.org/z/6cexnsW9Y" alt="godbolt">
<img src="https://img.shields.io/badge/try%20it%20on-godbolt-green" /></a>
</p>

Expand All @@ -33,7 +33,7 @@ The benchmark timing will be reflected on microcontroller's corresponding
benchmark port pin (the definition of which can be found in its target-specific MCAL).

Individual benchmarks can also be run standalone on any C++ platform.
In the following [short link](https://godbolt.org/z/j4aM9vzr9)
In the following [short link](https://godbolt.org/z/6cexnsW9Y)
to [godbolt](https://godbolt.org), for instance, we have adapted the
`APP_BENCHMARK_TYPE_TRAPEZOID_INTEGRAL` benchmark for standalone use.
The `main()` subroutine in the benchmark source files is activated
Expand Down Expand Up @@ -110,6 +110,7 @@ time of $8.0~\text{ms}$.
Using only one core (core 1) on the $32$-bit ARM(R) Cortex(R) M0+
controller of the `rpi_pico_rp2040` board results in a calculation
time of $19~\text{ms}$. The next generation `rpi_pico2_rp2350`
with ARM(R) Cortex(R) M33 cores beats the previous one
with a time of $6.3~\text{ms}$, which is slightly more than $3~\text{ms}$ times faster
with dual ARM(R) Cortex(R) M33 cores definitively improves on this
(still using only core 1) with a time of $6.3~\text{ms}$.
This is slightly more than $3~\text{ms}$ times faster
than its predecessor.
14 changes: 7 additions & 7 deletions ref_app/src/mcal/stm32h7a3/mcal_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ void mcal::cpu::detail::enable_d_cache()
std::uint32_t
sets
{
static_cast<std::uint32_t>
(
static_cast<std::uint32_t>
(
mcal::reg::reg_access_static<std::uint32_t, std::uint32_t, mcal::reg::scb_ccsidr>::reg_get()
>> static_cast<unsigned>(UINT8_C(13))
)
static_cast<std::uint32_t>
(
static_cast<std::uint32_t>
(
mcal::reg::reg_access_static<std::uint32_t, std::uint32_t, mcal::reg::scb_ccsidr>::reg_get()
>> static_cast<unsigned>(UINT8_C(13))
)
& static_cast<std::uint32_t>(UINT32_C(0x7FFF))
)
};
Expand Down
10 changes: 5 additions & 5 deletions ref_app/src/mcal/stm32l432/mcal_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ namespace local
{
static_cast<std::uint32_t>
(
static_cast<std::uint32_t>(1UL << 16U)
| static_cast<std::uint32_t>(1UL << 18U)
| static_cast<std::uint32_t>(1UL << 19U)
| static_cast<std::uint32_t>(1UL << 24U)
)
static_cast<std::uint32_t>(1UL << 16U)
| static_cast<std::uint32_t>(1UL << 18U)
| static_cast<std::uint32_t>(1UL << 19U)
| static_cast<std::uint32_t>(1UL << 24U)
)
};

mcal::reg::reg_access_static<std::uint32_t, std::uint32_t, mcal::reg::rcc_cr, rcc_cr_not_value>::reg_not();
Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/mcal_vfd/mcal_vfd_nec_fm20x2kb.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}

auto write(const char* pstr,
const std::uint_fast8_t length,
const std::uint_fast8_t length,
const std::uint_fast8_t line_index) -> bool override
{
static_cast<void>(line_index);
Expand Down
6 changes: 3 additions & 3 deletions ref_app/src/util/STL/chrono
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2011 - 2022.
// Copyright Christopher Kormanyos 2011 - 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 Expand Up @@ -575,7 +575,7 @@
static const bool is_steady = false;

// !!! PLATFORM AND OS SPECIFIC IMPLEMENTATION !!!
static time_point now() STL_LOCAL_NOEXCEPT;
static time_point now() noexcept;
};


Expand Down Expand Up @@ -605,7 +605,7 @@
static const bool is_steady = true;

// !!! PLATFORM AND OS SPECIFIC IMPLEMENTATION !!!
static time_point now() STL_LOCAL_NOEXCEPT;
static time_point now() noexcept;
};


Expand Down
2 changes: 1 addition & 1 deletion ref_app/src/util/memory/util_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class another : public util::factory_product
public:
explicit another(const int m = 0, const int n = 0)
: my_m(m),
my_n(n) { }
my_n(n) { }
~another() override = default;
Expand Down
6 changes: 3 additions & 3 deletions ref_app/target/micros/wch_ch32v307/make/wch_ch32v307.ld
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ __ROM_START_ADDRESS = 0x00000000;

MEMORY
{
BOOT(rx) : ORIGIN = 0x00000000, LENGTH = 0x100
VEC(rx) : ORIGIN = 0x00000100, LENGTH = 0x300
BOOT(rx) : ORIGIN = 0x00000000, LENGTH = 0x100
VEC(rx) : ORIGIN = 0x00000100, LENGTH = 0x300
ROM(rx) : ORIGIN = 0x00000400, LENGTH = 256K - 0x400
SRAM(rwx) : ORIGIN = __RAM_START_ADDRESS, LENGTH = 32K
RAM(rwx) : ORIGIN = __RAM_START_ADDRESS + 32K, LENGTH = __RAM_SIZE - 32K
STACK(rw) : ORIGIN = __STACK_START_ADDRESS, LENGTH = __STACK_SIZE
STACK(rw) : ORIGIN = __STACK_START_ADDRESS, LENGTH = __STACK_SIZE
}

SECTIONS
Expand Down
8 changes: 4 additions & 4 deletions ref_app/target/micros/xtensa32/make/xtensa32_files.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright Christopher Kormanyos 2018 - 2020.
# Copyright Christopher Kormanyos 2018 - 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 All @@ -9,7 +9,7 @@
# File list of the xtensa32 esspressif ESP32 files in the project
# ------------------------------------------------------------------------------

FILES_TGT = $(PATH_APP)/mcal/$(TGT)/from_sdk/esp32-hal-gpio \
$(PATH_APP)/util/STL/impl/cmath_impl_gamma \
$(PATH_APP)/util/STL/impl/cmath_impl_hyperbolic \
FILES_TGT = $(PATH_APP)/mcal/$(TGT)/from_sdk/esp32-hal-gpio \
$(PATH_APP)/util/STL/impl/cmath_impl_gamma \
$(PATH_APP)/util/STL/impl/cmath_impl_hyperbolic \
$(PATH_TGT)/startup/app_main

0 comments on commit 2eac221

Please sign in to comment.