Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ endif()
set(FREERTOS_PORT_DIR "${FREERTOS_KERNEL_PATH}/portable/GCC/ARM_CM3")
set(LWIP_CONTRIB_FREERTOS_DIR "${LWIP_DIR}/contrib/ports/freertos")

# --- SolidSyslog ---------------------------------------------------------------
# Naming the platforms is the whole of the selection; anything unnamed is off.
# https://docs.cososo.co.uk/solid-syslog/getting-started/#path-a--cmake-consumer
# Pinned to a commit until there is a release tag to pin to.
set(SOLIDSYSLOG_PLATFORMS "LwipRaw" CACHE STRING "" FORCE)

include(FetchContent)
FetchContent_Declare(SolidSyslog
GIT_REPOSITORY https://github.com/cososo-ltd/solid-syslog.git
GIT_TAG e4bc54d23d8b46c7479f319886bc775e4e8f3fbd
)
FetchContent_MakeAvailable(SolidSyslog)

# --- stage FatFs so ff.h's `#include "ffconf.h"` resolves to our integrator config
# GCC's "" lookup checks the including file's own directory first, so colocating
# the upstream ff.c/ff.h/diskio.h with our ffconf.h is how our config wins.
Expand Down Expand Up @@ -148,7 +161,7 @@ target_include_directories(baseline PRIVATE
# library, or context struct sizes diverge between consumer and library.
target_compile_definitions(baseline PRIVATE MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_HEADER})

target_link_libraries(baseline PRIVATE mbedtls mbedx509 mbedcrypto)
target_link_libraries(baseline PRIVATE mbedtls mbedx509 mbedcrypto SolidSyslog SolidSyslog::LwipRaw)

target_link_options(baseline PRIVATE
-mcpu=cortex-m3 -mthumb
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ It builds on a baseline that simulates the sort of device you might be adding th
measures itself: see [docs/baseline.md](docs/baseline.md) for what the baseline is, how the
figures are made, and how to run it.

## This stage — Baseline
## This stage — Linked

The device before any of this: networking up, a filesystem mounted, and a mutual-TLS session held
to its broker. Two application tasks sit idle, ready to be occupied.

Nothing is logged and nothing is sent. This is the thing every later figure is measured against.
SolidSyslog is in the build with the lwIP platform selected: the core library, plus the components
that integrate lwIP in raw mode. Nothing calls it yet, so the linker strips it all back out.

<!-- STAGE-COST:START (generated by scripts/gen-cost-table.py — do not edit by hand) -->

This is the baseline itself: Flash 350,308 B, RAM 111,192 B.
**Cost above baseline: Flash +0 B, RAM +0 B.**

<!-- STAGE-COST:END -->

Expand All @@ -33,6 +31,7 @@ committed as [`run-report.md`](run-report.md), and rewritten by every stage.
| Stage | What it gives you | Flash | RAM |
|---|---|---|---|
| Baseline | a device that already networks, stores, and holds an mTLS session — before any syslog | — | — |
| Linked | the core library and lwIP raw-mode networking, linked but not yet called | +0 | +0 |

*Deltas are bytes above the baseline, which is itself Flash 350,308 B, RAM 111,192 B.*

Expand Down
6 changes: 3 additions & 3 deletions measurements/linked.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ flash_text,349992
flash_data,316
static_bss,110876
heap_used,4440
mbedtls_peak,21324
mbedtls_free,11444
mbedtls_peak,21332
mbedtls_free,11436
lwip_mem_free,7576
lwip_pbufs_free,13
lwip_pbufs_free,14
stack_log,120
stack_service,52
stack_harness,2840
1 change: 1 addition & 0 deletions measurements/stages.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
# Slugs, not numbers: a stage inserted mid-history would renumber every file
# after it, and this history has already had one inserted.
Baseline Baseline a device that already networks, stores, and holds an mTLS session — before any syslog
linked Linked the core library and lwIP raw-mode networking, linked but not yet called
12 changes: 6 additions & 6 deletions run-report.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# solid-syslog-example — run (Baseline)
# solid-syslog-example — run (linked)

## Device (self-measured)

Expand All @@ -13,8 +13,8 @@
[report] flash_data,316,316,0
[report] static_bss,110876,110876,0
[report] heap_used,4440,4440,0
[report] mbedtls_peak,21340,21332,8
[report] mbedtls_free,11428,11436,-8
[report] mbedtls_peak,21328,21332,-4
[report] mbedtls_free,11440,11436,4
[report] lwip_mem_free,7576,7576,0
[report] lwip_pbufs_free,14,14,0
[report] stack_log,120,120,0
Expand Down Expand Up @@ -49,15 +49,15 @@
(nothing — this device sends no records yet)
```

## Self-check (vs measurements/Baseline.csv)
## Self-check (vs measurements/linked.csv)

```text
OK flash_text: 349992 (expected 349992, Δ0)
OK flash_data: 316 (expected 316, Δ0)
OK static_bss: 110876 (expected 110876, Δ0)
OK heap_used: 4440 (expected 4440, Δ0)
OK mbedtls_peak: 21340 (expected 21332, Δ8)
OK mbedtls_free: 11428 (expected 11436, Δ8)
OK mbedtls_peak: 21328 (expected 21332, Δ4)
OK mbedtls_free: 11440 (expected 11436, Δ4)
OK lwip_mem_free: 7576 (expected 7576, Δ0)
OK lwip_pbufs_free: 14 (expected 14, Δ0)
OK stack_log: 120 (expected 120, Δ0)
Expand Down
Loading