Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
60041a6
Update libparam to include fix for SI-546
jeanbaptistelab Nov 7, 2024
499843a
Add Docker files to build for Ubuntu 22.04 & 24.04
jeanbaptistelab Nov 8, 2024
2083cac
Update pack script to handle Ubuntu 22.04 & 24.04
jeanbaptistelab Nov 8, 2024
be59f43
Add script to build debian packages via Docker
jeanbaptistelab Nov 8, 2024
adfbc45
Remove extra "csh_obc"
kivkiv12345 Nov 8, 2024
b301e67
Squashed libparam commits
troelsjessen Nov 14, 2024
89db0e7
apm: dont add failed apms to queue, better printing
edvardxyz Nov 26, 2024
c1b8f01
PLT-291 Set environment varibles to chosen init file.
kivkiv12345 Dec 4, 2024
1971a51
PLT-291 Strip trailing slash in INIT_DIR
kivkiv12345 Dec 5, 2024
8f94d76
PLT-291 Added __FILE__ and __FILE_DIR__ env vars to "run <file.csh> c…
kivkiv12345 Dec 8, 2024
7ca6857
Merge pull request #27 from spaceinventor/PLT-291-init-script-path-en…
kivkiv12345 Dec 10, 2024
72c57e8
Fix a couple of different "Uninitialized values" Valgrind warnings
kivkiv12345 Dec 11, 2024
8b2c3a5
Merge branch 'PLT-291-init-script-path-env-var'
kivkiv12345 Dec 11, 2024
b6914d5
Update CSH version information regarding environment variables support
jeanbaptistelab Dec 12, 2024
6cc787e
Update comment about how to run "partool" to generate the list of bui…
jeanbaptistelab Dec 12, 2024
3b5ec55
PLT-288 Change param default prio to NORM (#26)
troelsjessen Dec 20, 2024
84badca
Update slash submodule
jeanbaptistelab Dec 20, 2024
1385304
Do not initialize schedule server
troelsjessen Dec 20, 2024
ae6de31
Unify pack procedure
troelsjessen Dec 24, 2024
84556e8
Support -i without filename
troelsjessen Dec 24, 2024
3e33928
Reduce printout when CSH starts
troelsjessen Dec 24, 2024
3f2ca40
Enable slash cmd print with CMD client enabled only
troelsjessen Dec 30, 2024
f57eeae
PLT-294 Added slash command to check used version of CSH (#28)
kivkiv12345 Jan 2, 2025
978e3a1
Update libparam submodule and update code after API change
jeanbaptistelab Jan 2, 2025
1b8e7f4
Remove hard-coded folder
jeanbaptistelab Jan 2, 2025
42071d8
libparam update
troelsjessen Jan 2, 2025
4f6bedf
Fix compilation warning
jeanbaptistelab Jan 2, 2025
b1ccf73
Fix some compilation warnings
jeanbaptistelab Jan 3, 2025
94a4ef1
build system: do not install anything from subprojects
jeanbaptistelab Jan 3, 2025
32a0c0f
Update libparam submodule
jeanbaptistelab Jan 3, 2025
10275cb
Update libparam submodule
jeanbaptistelab Jan 3, 2025
d841825
Add support for building Ubuntu 20.04 packages
jeanbaptistelab Jan 9, 2025
c877870
Add builtin_commands.csv
troelsjessen Jan 14, 2025
2d4b352
queue loki json logs
edvardxyz Jan 17, 2025
e93b7a6
Update build.yml
jeanbaptistelab Jan 20, 2025
67d0396
loki: json_str_max more safely calculated
edvardxyz Jan 20, 2025
cfab117
loki: race cond fix
edvardxyz Jan 20, 2025
6bc5138
Update Raspberry file cross files as a C++ compiler is now required (…
jeanbaptistelab Jan 22, 2025
33958fe
Allow passing extra cmd line arguments to configure script
jeanbaptistelab Jan 22, 2025
488bb5d
Add sysroot* and *.deb to gitignore
jeanbaptistelab Jan 22, 2025
dab1b3c
Differentiate sysroots by name to aollow building for multiple platforms
jeanbaptistelab Jan 22, 2025
733cda8
Allow building Debian packages for Raspberry PI
jeanbaptistelab Jan 22, 2025
d328295
Update libparam to include 32-bits platforms compilation fix
jeanbaptistelab Jan 23, 2025
7d94e06
Doc update: typo
jeanbaptistelab Jan 23, 2025
991d7ce
Check for numeric addr argument in `csp add *`
kivkiv12345 Jan 24, 2025
02788f8
Fix computation of "USER_FOLDER" in Debian packaging
jeanbaptistelab Feb 13, 2025
bda9e88
Remove promisc argument from "csp add kiss"
kivkiv12345 Feb 27, 2025
e8a5eb1
Added slash command to print CSH version
kivkiv12345 Feb 27, 2025
5998cb8
sniffer: if param not found in param list dont discard whole packet t…
edvardxyz Mar 4, 2025
08b862d
Constrain max length of interface names to CSP_IFLIST_NAME_MAX
kivkiv12345 Mar 6, 2025
564765b
sniffer: if param not found in param list dont discard whole packet t…
edvardxyz Mar 6, 2025
541b606
Submodule update
troelsjessen Mar 11, 2025
ec0fb22
Moved CMD and param slash to CSH
troelsjessen Mar 11, 2025
5c9cd61
Add feature to let HK sniffer auto-update UTC offset when receving a …
troelsjessen Mar 11, 2025
d34a5ef
Align `node save` with `list save` (#31)
kivkiv12345 Mar 21, 2025
9dde07c
Implement hostname tab-completion in "node" command (#32)
jeanbaptistelab Mar 29, 2025
a026bf0
Reintroduce "timeout" cmd that should have been in last commit
jeanbaptistelab Mar 31, 2025
df339ea
Use newly introduce CSH API, implement hostname tab-completion functi…
jeanbaptistelab Apr 1, 2025
bad68f1
Print current time when setting HK epoch
troelsjessen Apr 8, 2025
d6b7955
Code update after "know hosts" and "environment functionality promoti…
jeanbaptistelab Apr 8, 2025
519de1c
Fix bug in environment variable name tab-completion
jeanbaptistelab Apr 10, 2025
2533b52
CSH-21 Rollout of `csh_add_node_option(...)` (#35)
kivkiv12345 Apr 11, 2025
99121f3
Indicate VMEM type in list save also for RAM params
troelsjessen Apr 13, 2025
ab82088
CSH-21 Expanded support for hostnames
kivkiv12345 Apr 16, 2025
a737a9b
Update slash submodule for an off-by-one fix
jeanbaptistelab Apr 16, 2025
4530e37
zmqproxy: -k takes private key as arg
edvardxyz Apr 23, 2025
c5cb564
environment variable expansions can cause a crash when the length of …
jeanbaptistelab Apr 29, 2025
57d6777
Update submodules in preparation for 2.8 release
jeanbaptistelab Apr 30, 2025
05fbede
Update documentation of built-in commands
jeanbaptistelab Apr 30, 2025
7a5de95
Enable -Wall & -Wextra warnings (and fix a lot of them)
jeanbaptistelab May 7, 2025
a20373e
Update libparam submodule
jeanbaptistelab May 8, 2025
ec36aa2
Update CSP submodule
troelsjessen May 13, 2025
64d22af
crc32: print timeout, 0 init crc var
edvardxyz May 22, 2025
871f05e
Streamline Dockerfiles, allowing building for aarch64 & amd64 in one go
jeanbaptistelab May 28, 2025
0e9162c
`require version csh` allows dirty short commit tags (e.g 2.7+)
kivkiv12345 May 29, 2025
533edda
"walkdir" util function: fix double "/" when source dir ends with a "…
jeanbaptistelab May 28, 2025
411916e
Update "manual" command to allow opening APM manuals, if present
jeanbaptistelab Jun 2, 2025
46321a7
Update to libparam using ns timestamp precisison
troelsjessen Jun 3, 2025
877d429
Use csp_timestamp_t for param-related timestamps
troelsjessen Jun 3, 2025
c3bdf68
Add a new "python" CSH built-in command that allows... (#36)
jeanbaptistelab Jun 4, 2025
9f61927
Silence `PySys_SetArgv()` deprecation warning.
kivkiv12345 Jun 4, 2025
93a582a
Update pycsh to get crash fix
jeanbaptistelab Jun 4, 2025
ba25ccb
Fix pack script
jeanbaptistelab Jun 4, 2025
cb860ca
Fix pack script, for real this time
jeanbaptistelab Jun 4, 2025
586ee0a
Update libparam
jeanbaptistelab Jun 5, 2025
41ad517
Update libcsp submodule
jeanbaptistelab Jun 5, 2025
7af9c04
Update apm submodule
jeanbaptistelab Jun 6, 2025
b923212
"patchelf" package is apparently not automatically installed on 22.04
jeanbaptistelab Jun 6, 2025
4f1708b
Use new pycsh_core dependency
jeanbaptistelab Jun 6, 2025
cacc655
Update libdoc version requirement to get sorted slash commands when g…
jeanbaptistelab Jun 6, 2025
13e49a5
Restore "sec_key" size
jeanbaptistelab Jun 11, 2025
ead596d
Add Python APM to CSH's list of APMs
jeanbaptistelab Jun 11, 2025
817eedc
Update pycsh_core to get vmem 64-bits address fix
jeanbaptistelab Jun 17, 2025
3f7b36b
Update submodules
jeanbaptistelab Jun 25, 2025
58a13ab
Added filename argument to `sps` command
kivkiv12345 Jun 26, 2025
da1a948
Add a new "pwd" slash command
jeanbaptistelab Jun 26, 2025
55d9486
Fix crash when using "cd ~" and actually handle "~"
jeanbaptistelab Jun 26, 2025
1c3ce78
Get new libslash version to get better path tab-completion
jeanbaptistelab Jun 26, 2025
98b9966
Update README.md
georgepdk Jun 27, 2025
c1567a3
Update submodules
jeanbaptistelab Jun 30, 2025
7957326
Update slash submodule
jeanbaptistelab Jun 30, 2025
878f936
Update slash to get fix in path completion
jeanbaptistelab Jul 3, 2025
36c6cd9
Fix broken implementation of csp_init handling conflicting with pycsh
jeanbaptistelab Jul 3, 2025
4eedfa3
Use PATH_MAX constant where applicable
jeanbaptistelab Jul 3, 2025
ccb2def
Update submodules
jeanbaptistelab Jul 4, 2025
5a007aa
Fix memory leak in "apm info" slash command
jeanbaptistelab Jul 4, 2025
b66e84e
Fix valgrind warning in "ifstat" slash command
jeanbaptistelab Jul 4, 2025
913a5f8
Added `param_completer()` to `list()` command
kivkiv12345 Jul 4, 2025
f0a5a0b
Remove nonsensical "-I../include" from call to add_project_arguments(…
jeanbaptistelab Jul 4, 2025
a458480
Also preemptively `import pycsh` with `python -c <string>`
kivkiv12345 Jul 7, 2025
e26177a
Do not set param timestamp at handling in param sniffer (#38)
troelsjessen Jul 7, 2025
dd4a76c
Rename lib/apm -> lib/apm_csh
jeanbaptistelab Jul 7, 2025
660c2da
Correctly rename lib/apm -> lib/apm_csh
jeanbaptistelab Jul 7, 2025
2f929c9
Update pycsh_core submodule
jeanbaptistelab Jul 7, 2025
2c087ab
Update caninit script to handle both can0 & can1
jeanbaptistelab Jul 8, 2025
dbd4a3b
Remove dependency on packaging version which is not in Python's stdlib
jeanbaptistelab Jul 8, 2025
2949864
Allow loading of Python APMs from /usr/lib/csh
jeanbaptistelab Jul 8, 2025
2f926c4
Allow loading of Python APMs from /usr/lib/csh
jeanbaptistelab Jul 9, 2025
a974a38
Propagate Contrl-C (SIGINT) to Python Interpreter
jeanbaptistelab Jul 9, 2025
0ce5747
Don't print index error for unknown parameters
kivkiv12345 Jul 9, 2025
dc13364
Added path completer to `python` command
kivkiv12345 Jul 9, 2025
6df6755
Added `python3-dev` to README.md
kivkiv12345 Jul 9, 2025
7cf3e77
Update apm_csh submodule
jeanbaptistelab Jul 9, 2025
0b2d905
Clear Python exceptions before and after slash commands.
kivkiv12345 Jul 10, 2025
6e5c005
Submodule update lib/pycsh_core/
kivkiv12345 Jul 11, 2025
35cd31d
Add -lrt to CSH link flags as indicated in the Posix Message Queue ma…
jeanbaptistelab Jul 11, 2025
e8c48b0
Guard Python specific code to allow building without Python, for exam…
jeanbaptistelab Jul 11, 2025
b4168ac
Try to install gendoc when any exception in version check occurs
jeanbaptistelab Jul 12, 2025
438a6c6
Make gendoc work in Github actions
jeanbaptistelab Jul 12, 2025
bc87eb6
Chain-call Python's SIGINT handler.
kivkiv12345 Jul 14, 2025
f1eff0e
Fix version comparison
jeanbaptistelab Jul 15, 2025
bdb2243
Update optparse description of several commands to actually match the…
jeanbaptistelab Jul 15, 2025
af30424
Restore stdout when Loki no longer runs
jeanbaptistelab Jul 16, 2025
1fe8f7f
Added (already documented) wildcard argument to `list save`
kivkiv12345 Jul 17, 2025
561c331
Update submodules
jeanbaptistelab Jul 17, 2025
42b9760
Add `__file__` attribute when `python <filename.py>`
kivkiv12345 Jul 17, 2025
dd8db24
Submodule update
kivkiv12345 Jul 17, 2025
5b54969
Move `rdp_opt_set()` and `rdp_opt_reset()` to `csh_defaults.c`
kivkiv12345 Jul 17, 2025
7b56137
Fix `-c` argument ambiguity in `sps` and `program`
kivkiv12345 Jul 17, 2025
05fe490
Actually actually reset rdp options (in `sps`)
kivkiv12345 Jul 17, 2025
a712625
Fix warning
kivkiv12345 Jul 17, 2025
ff3a145
Fix compilation on Ubuntu 20.04
jeanbaptistelab Jul 18, 2025
611dd9c
Update list of builtin commands
jeanbaptistelab Jul 18, 2025
c8f772e
Update slash
jeanbaptistelab Jul 18, 2025
2d9c5e5
Fix compilation warning
jeanbaptistelab Jul 18, 2025
61c1be8
Update gendoc
jeanbaptistelab Jul 18, 2025
f732e4a
Remove Cross compile section in README
jeanbaptistelab Jul 18, 2025
20c7250
Allow user to specifiy base for `cmd run --hwid=<serial0>`
kivkiv12345 Aug 8, 2025
473394c
`python` command prints when it fails to open a file.
kivkiv12345 Aug 8, 2025
61dcdc5
Update `lib/pycsh_core/` with fixes
kivkiv12345 Aug 9, 2025
7fb41c1
Fix warning in zmqproxy.c
kivkiv12345 Aug 11, 2025
d3ab763
CSH-50 Allow host names in "-n" argument values, allow 0 as host id (…
jeanbaptistelab Aug 13, 2025
ff3ad50
CSH-51 Remove obsolete PARAM_HAVE_COMMANDS_CLIENT to restore cmd get/…
jeanbaptistelab Aug 14, 2025
f3fe384
Use usleep in CSH "sleep" command, use Ctrl+C to interrupt
jeanbaptistelab Aug 19, 2025
90f074d
Remove scheduler v2 vmem definitions, they live in their own APM, now…
jeanbaptistelab Aug 20, 2025
55e54c3
Update submodules
jeanbaptistelab Aug 20, 2025
f425d70
Update submodules
jeanbaptistelab Aug 21, 2025
3e5060e
Also release stdin when running Python scripts and literal strings
kivkiv12345 Aug 29, 2025
c61aa7a
Fix running `python` in init file
kivkiv12345 Aug 29, 2025
495d918
Remove APM documentation from CSH base documentation
troelsjessen Sep 9, 2025
75b7246
Remove unused scheduler client from CSH
troelsjessen Sep 9, 2025
c346054
Merge pull request #41 from spaceinventor/remove_scheduler_client
troelsjessen Sep 9, 2025
1ff2afd
Update submodules
jeanbaptistelab Sep 16, 2025
0bf6eb5
Update pycsh_core submodule to fix runtime issues due to https://gith…
jeanbaptistelab Sep 16, 2025
165f6ef
Update submodules
jeanbaptistelab Sep 16, 2025
d314cf9
Fix incorrect order of `slash_<release/acquire>_std_in_out()` while r…
kivkiv12345 Sep 22, 2025
841d313
Update `lib/slash/` for fixes and `echo` command
kivkiv12345 Sep 22, 2025
b29c51b
Internal: refactor Python execution code into separate functions
jeanbaptistelab Sep 25, 2025
8203469
Prepare code to allow CSH prompt customization from APMs for example,…
jeanbaptistelab Sep 25, 2025
f9c0803
Fix `watch` in init files
kivkiv12345 Sep 26, 2025
457149d
help text fix
edvardxyz Sep 26, 2025
af1649d
CSH-58 Auto-initialize CSP when starting CSH
troelsjessen Oct 2, 2025
34a39c3
Detect WSL and use powershell to open manuals
troelsjessen Oct 2, 2025
0212f0c
CSH-57 Add version field to stdbuf, keep stdbuf2 for backwards compat…
troelsjessen Oct 2, 2025
9b8f30f
Submodule update `lib/pycsh_core/` to fix build on Ubuntu 25.10
kivkiv12345 Oct 7, 2025
8b634f1
Silence `deprecated-declarations` warning for `PySys_SetArgv()` in `p…
kivkiv12345 Oct 11, 2025
41ae51c
Added `--mask` argument to `get`
kivkiv12345 Oct 12, 2025
a2584d3
Correctly handle resuming CSH after it being suspended (Ctrl-Z)
jeanbaptistelab Oct 14, 2025
a281d93
CSH-58 Quick fix to `pycsh.csp_init()` after `af1649df87b40f884ac3c84…
kivkiv12345 Oct 15, 2025
0ec6b23
Actually respect the user's answer in "download" command by setting "…
jeanbaptistelab Oct 15, 2025
0328a77
Update param submodule to latest get vmem_up/download, update "upload…
jeanbaptistelab Oct 22, 2025
8955658
`list forget` uses `param_list_remove_py()` from `lib/pycsh_core`
kivkiv12345 Oct 22, 2025
4903da9
Fix building `list forget` when we don't have Python
kivkiv12345 Oct 23, 2025
db7dc2a
Fix incrementing `ifidx` without adding an interface
kivkiv12345 Oct 23, 2025
09c62d5
Fix compilation warning
jeanbaptistelab Oct 23, 2025
53990c6
Update to param that is protecting local params against remote copies
troelsjessen Oct 23, 2025
703ea15
Throw error if downloading local parameters
troelsjessen Oct 23, 2025
cad0979
Bugfixes to param publish
troelsjessen Nov 3, 2025
f53ddd5
Add support for sniffing published parameters
troelsjessen Nov 3, 2025
a7858b1
CSP Alias support with explicit filter configuration for CAN and ZMQ …
troelsjessen Nov 3, 2025
a92d1b7
Minor manual updates
troelsjessen Nov 5, 2025
45ccdbc
Submodule update prior to upcoming release
troelsjessen Nov 5, 2025
30257dc
Add #ifdef HAVE_PYTHON around include of pycsh header, should fix #48
jeanbaptistelab Nov 5, 2025
f1d58a3
Make sure pycsh related code is guarded by #ifdef HAVE_PYTHON, fixes #48
jeanbaptistelab Nov 5, 2025
71e36cf
Fix a couple of header-related warnings
kivkiv12345 Nov 5, 2025
550a789
Submodule update
kivkiv12345 Nov 5, 2025
3e66c32
Introduce libossi in CSH
troelsjessen Nov 6, 2025
c3e2b81
Client support for VMEM compression
troelsjessen Nov 6, 2025
666effc
Submodule update for pycsh
troelsjessen Nov 6, 2025
90fc69e
Remove unused VMEM define
troelsjessen Nov 6, 2025
8d12858
Limit slash length helper function to 32 bit
troelsjessen Nov 6, 2025
9542cfe
Clean up debug parameters
troelsjessen Nov 6, 2025
487eaff
Documentation updates for APM usage and development
troelsjessen Nov 7, 2025
ae4f7f1
Update to use "apt" instead of "dpkg" in order to get missing depende…
jeanbaptistelab Nov 7, 2025
644bc26
Update submodules for CSH 2.10 release
jeanbaptistelab Nov 7, 2025
807a956
Add CSH version to meson.build
jeanbaptistelab Nov 10, 2025
05e741d
Update code to handle "vmem_upload" return value and print output acc…
jeanbaptistelab Nov 11, 2025
f47524a
Handle error correctly when cwd is deleted/cannot be accessed
jeanbaptistelab Nov 11, 2025
c2c0455
Revert "Added `param_completer()` to `list()` command"
kivkiv12345 Nov 12, 2025
8cba956
Update slash version
jeanbaptistelab Nov 17, 2025
a6df306
Update pycsh_core submodule
jeanbaptistelab Nov 18, 2025
9fb19ae
Fix crash when having bin files in path not containing firmware
troelsjessen Nov 24, 2025
3ab4dbe
Handle switching to invalid slot IDs
troelsjessen Nov 26, 2025
45258c7
Fix crash when having bin files in path not containing firmware
troelsjessen Nov 26, 2025
0bd5b68
Set meson version requirement, compute project version from git
jeanbaptistelab Dec 3, 2025
8858d9e
Replace loki message queue implemented currently using private intern…
jeanbaptistelab Dec 16, 2025
0839107
Make functions that are only used in their translation unit static
jeanbaptistelab Dec 17, 2025
3bfa126
Update no parameter functions prototypes: () -> (void)
jeanbaptistelab Dec 17, 2025
170d222
Add more internal function prototypes
jeanbaptistelab Dec 17, 2025
149b599
Update "hk_set_epoch" prototype to actually match the implementation
jeanbaptistelab Dec 17, 2025
20244a2
Correct initialization of structs
jeanbaptistelab Dec 17, 2025
e6f4464
Include headers for implemented function prototypes
jeanbaptistelab Dec 17, 2025
c712d0b
Enable '-Wstrict-prototypes' & '-Wmissing-prototypes' GCC warnings
jeanbaptistelab Dec 17, 2025
c4ffa8e
Add function prototype to header to fix warning
jeanbaptistelab Dec 17, 2025
8b2d76e
Fix more warnings
jeanbaptistelab Dec 18, 2025
339dc9f
Remove randombytes.c as the only function it defines is no longer req…
jeanbaptistelab Dec 18, 2025
be66a5c
Remove hk_* functions prototypes that are now exposed through csh_api.h
jeanbaptistelab Dec 19, 2025
283e707
Changed HK epoch-related prints to prevent future confusion
fadeto404 Jan 7, 2026
c3d7c34
Remove current time string
fadeto404 Jan 7, 2026
d0f07da
Changed HK epoch-related prints to prevent future confusion
fadeto404 Jan 8, 2026
7b17d59
Merge branch 'master' of https://github.com/spaceinventor/csh
troelsjessen Jan 12, 2026
d940d1c
Indicate if the embedded Python interpreter is within a virtual envir…
jeanbaptistelab Jan 21, 2026
51783c7
program: fix memleak when invalid length, also faster search for FW .…
edvardxyz Jan 22, 2026
510ec44
Remove 'clock_get_nsec' implementation, which is now available in lib…
jeanbaptistelab Jan 27, 2026
2d1c969
Update submodules
jeanbaptistelab Jan 27, 2026
5b357f3
meson: minimum version required is 1.6
edvardxyz Jan 27, 2026
4fe4510
ensure meson does not change .settings.json
johandc Jan 28, 2026
1c5750e
param slash: use new queue_apply with verbose flag
johandc Jan 28, 2026
c21162e
In hk param sniffer handle extended UTC timestamp (#54)
hendav76 Jan 29, 2026
72b4f5f
param: add local timestamp on rx
johandc Jan 29, 2026
a0b4113
hk param sniffer should only use epoch if param timestamp is not a UT…
hendav76 Feb 6, 2026
b63fdc7
client_timestamp has been removed from param_queue_t (#56)
hendav76 Feb 17, 2026
570aa0c
udp: fix interface sockfd uninitialized and iface name idx for multip…
edvardxyz Feb 26, 2026
bd3531e
Allow getting individual parameters without a mask
troelsjessen Mar 13, 2026
1d41d0e
Fix `python` command `wchar_t **w_argv` memory leak
kivkiv12345 Mar 23, 2026
bbc0d71
Inject an LF into the stdout stream when the last packet from stdbuf2…
Lykkeberg Mar 30, 2026
b3abbbe
Fix for CSH-77 Loki logging stops after encountering 2 newline chars …
jeanbaptistelab Apr 15, 2026
e667cfe
Update py_apm_load_cmd so that it updates the count of Python APMs it…
jeanbaptistelab Apr 30, 2026
524122d
Merge remote-tracking branch 'origin/master' into chore/sync-upstream…
MahmoodSeoud Jun 4, 2026
314c7d3
fix(hk): guard data_len underflow in hk_param_sniffer on short sport-…
MahmoodSeoud Jun 4, 2026
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
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CSH CI

on:
push:
pull_request:

jobs:
ci:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libcurl4-openssl-dev libzmq3-dev libsocketcan-dev libpython3-dev
- name: Install gcovr
run: pip3 install gcovr==8.3 meson==1.8.1
- name: Build
run: ./configure -Db_coverage=true && ninja -C builddir -v
- name: Run gcovr
run: ninja -C builddir test coverage-text && tail -n3 builddir/meson-logs/coverage.txt
20 changes: 7 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
[submodule "lib/libcsp"]
path = lib/csp
url = https://github.com/spaceinventor/libcsp
branch = master
[submodule "lib/libparam"]
path = lib/param
url = https://github.com/spaceinventor/libparam
branch = master
[submodule "lib/slash"]
path = lib/slash
url = https://github.com/spaceinventor/slash
branch = master
[submodule "lib/yaml"]
path = lib/yaml
url = https://github.com/yaml/libyaml.git
[submodule "lib/csp_proc"]
path = lib/csp_proc
url = https://github.com/discosat/csp_proc.git
[submodule "lib/param"]
path = lib/param
url = https://github.com/spaceinventor/libparam
branch = master
[submodule "lib/csp_ippc"]
path = lib/csp_ippc
url = https://github.com/discosat/csp_ippc.git
[submodule "lib/apm"]
path = lib/apm_csh
url = https://github.com/spaceinventor/libapm_csh
[submodule "lib/pycsh_core"]
path = lib/pycsh_core
url = https://github.com/spaceinventor/pycsh_core.git
[submodule "lib/ossi"]
path = lib/ossi
url = https://github.com/spaceinventor/libossi.git
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"mesonbuild.buildFolder": "builddir",
"mesonbuild.configureOnOpen": false,
"mesonbuild.modifySettings": false,
"files.associations": {
"*.h": "c",
"*.c": "c",
Expand Down
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@ Preferrably, you should use the provided Ubuntu Packages from Github's [Release

## Build

Requirements: libcurl4-openssl-dev build-essential, libsocketcan-dev, can-utils, libzmq3-dev, libyaml-dev, meson, ninja, pkg-config, fonts-powerline, python3-pip, libelf-dev, libbsd-dev libprotobuf-c-dev
![build.yml status](https://github.com/spaceinventor/csh/actions/workflows/build.yml/badge.svg)

```
sudo apt install libcurl4-openssl-dev git build-essential libsocketcan-dev can-utils libzmq3-dev libyaml-dev pkg-config fonts-powerline python3-pip libelf-dev libbsd-dev libprotobuf-c-dev
sudo pip3 install meson ninja
```
Requirements: libcurl4-openssl-dev build-essential, libsocketcan-dev, can-utils, libzmq3-dev, libyaml-dev, meson, ninja, pkg-config, fonts-powerline, python3-pip, libelf-dev, libbsd-dev

Sometimes needed:
```
link /usr/sbin/ninja /usr/local/lib/python3.5/dist-packages/ninja
export PATH=~/.local/bin:$PATH
sudo apt install libcurl4-openssl-dev git build-essential libsocketcan-dev can-utils libzmq3-dev libyaml-dev pkg-config fonts-powerline pipx libelf-dev libbsd-dev python3-dev
pipx install meson
```

Build:
```
git clone --recurse-submodules https://github.com/discosat/csh.git
git clone --recurse-submodules https://github.com/spaceinventor/csh.git
cd csh
./configure
./install
Expand Down Expand Up @@ -79,6 +75,28 @@ wsl --install
After a reboot, you can then start the application WSL to get a virtual Ubuntu environment and follow the guidelines for installing CSH in Linux as above. Windows by default does not forward USB devices to WSL entities. To enable USB forwarding, follow the guide in https://learn.microsoft.com/en-us/windows/wsl/connect-usb.


## Testing

Host tests live in `tests/` and run through meson:

```
meson test -C builddir # whole suite
meson test -C builddir hk_sniffer_tests # one test
```

`hk_sniffer_tests` is a regression for a `size_t` underflow in `hk_param_sniffer()`:
a short packet on source port 13 (e.g. a DIPP `ring_size`/`observation_meta` RDP
reply, which shares sport 13 with HK params) underflowed the param payload length
and walked the mpack reader off the buffer, segfaulting the param sniffer under
`prometheus start`. The test feeds the real function such packets and asserts they
are skipped.

Note: meson build directories are not relocatable. If the tree was first configured
under a different absolute path (a moved or renamed checkout), `meson setup
--reconfigure` fails with `FileNotFoundError` on a stale `meson-private` path.
Recreate the build dir instead of reconfiguring: `rm -rf builddir && ./configure`.


## Extension support

src/slash_apm.c defines a command, apm load, for loading a shared library as an APM, and a command, ap, info, for listing loaded APMs.
Expand Down
1 change: 1 addition & 0 deletions doc/MAN/APMs/csh_example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A new APM shall based on a fork of the repository https://github.com/spaceinventor/csh_example. This repository contains a simple APM that registers a custom slash command and a few example parameters, allowing the APM functionality to be remotely operated from other CSP nodes.
72 changes: 72 additions & 0 deletions doc/MAN/APMs/csh_si.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Space Inventor is relasing CSH together with an APM called CSH SI that provides commands to interface with Space Inventor hardware. The following documentation describes the commands provided by the CSH SI APM.

**node add**

When loading the APM, this command is extended to include a Space Inventor PDU-P4 node and channel number as arguments. When registering this additional information, CSH is able to power on and off the module by remote controlling the PDU.

The following example shows how to add a Space Inventor OBC module having node 6, connected to channel 2 of a PDU-P4 with the hostname ``pdu1-a``.

.. class:: table

.. list-table::
:widths: 100
:header-rows: 0

* -
.. csh-prompt:: host>6> node add -p pdu1-a -c 2 obc
.. csh-prompt:: host>obc@6>

**power on/off**

Having a node registered with PDU information allows the user to power cycle the module remotely using the ``power on`` and ``power off`` commands as shown in the following example. The explicit obc reference can be excluded, but preselcting the node by using ``node obc`` before starting the operations.

.. class:: table

.. list-table::
:widths: 100
:header-rows: 0

* -
.. csh-prompt:: host>> power on obc
.. csh-prompt:: host>> sleep 1000
.. csh-prompt:: host>> ping obc
| Ping node 6 size 1 timeout 1000: Reply in 1 [ms]
.. csh-prompt:: host>> power off obc

**conf get**

This command receives and stores all persistent configuration parameters from module compliant with Space Inventor Parameter System. Optionally, the command can reboot the module into each available firmware slot to record the firmware version, and perform a list download to create a complete representation of the module configuration.

The command can retrieve the configuration from multiple modules by a single command, by providng a list of nodes separated by commas.

.. class:: table

.. list-table::
:widths: 100
:header-rows: 0

* -
.. csh-prompt:: host>bat@8> conf get -r -l
|
| IDENT 8
| bat
| samc21 01]
| v1.0-32-g61cfbc9
| Apr 12 2024 16:04:12
|
| IDENT 8
| bat
| samc21 [1]
| v1.0-32-g61cfbc9
| Apr 12 2024 16:04:46
|
| Got param: temp:8[1]
| Got param: boot_cnt:8[1]
| Got param: boot_cur:8[1]
| ...
| Got param: heater_auto:8[1]
| Got param: cell_voltage:8[8]
| Got param: bus_current:8[1]
|
| Configuration is stored into ./configuration and ./paramdefs
.. csh-prompt:: host>bat@8>
18 changes: 18 additions & 0 deletions doc/MAN/APMs/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CSH can be extended via Extension Modules (APMs) using C code or python. These modules provide additional commands and features that are not part of the core CSH shell but can be loaded as needed.

Loading an APM is done by using the ``apm load`` slash command. The command enables the user to load all, or specific APMs available in the system.

.. class:: table

.. list-table::
:widths: 100
:header-rows: 0

* -
.. csh-prompt:: host>> apm load
| Loaded: /home/tjessen/.local/lib/csh/libcsh_obc.so
| Slash command 'node save' is overriding an existing command
| Slash command 'node list' is overriding an existing command
| Slash command 'node add' is overriding an existing command
| Loaded: /home/tjessen/.local/lib/csh/libcsh_si.so
.. csh-prompt:: host>>
22 changes: 22 additions & 0 deletions doc/MAN/Installation/build.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
As an alternative to installing a released version, in case of required local modifications, or due to a need for features not yet released, the software is available as open source on github.

.. class:: table

.. list-table::
:widths: 100
:header-rows: 0

* -

.. csh-prompt:: >>$ git clone --recurse-submodules https://github.com/spaceinventor/csh.git

.. csh-prompt:: >>$ cd csh

.. csh-prompt:: >>$ ./configure

.. csh-prompt:: >>$ ./install

.. class:: centered

*Clone, configure, build and install software*

4 changes: 2 additions & 2 deletions doc/MAN/Installation/init_config.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
In order to avoid configuring csp and interfaces on every launch an init.csh file can be created. CSH will look for one in your home directory or you can select one at launch with the -i argument. In the init folder, examples can be found for different interface configurations.

In order to avoid configuring csp and interfaces on every launch, an init.csh file can be created. CSH will look for one in your home directory or you can select one at launch with the -i argument. In the init folder, examples can be found for different interface configurations.

Loading the default init.csh file in the home directory can be omitted by providing the -i argument without any filename.
22 changes: 4 additions & 18 deletions doc/MAN/Installation/install.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

The software is available as open source on github.
The preferred way to aquire the application is by installing a release. Go to https://github.com/spaceinventor/csh/releases/, and download the .deb package matching your Ubuntu LTS OS version. Open a terminal in the folder containing the package, and execute the command

.. class:: table

Expand All @@ -8,22 +7,9 @@ The software is available as open source on github.
:header-rows: 0

* -

.. csh-prompt:: >>$ git clone https://github.com/spaceinventor/csh.git

.. csh-prompt:: >>$ cd csh

.. csh-prompt:: >>$ git submodule update --init --recursive

.. csh-prompt:: >>$ ./configure

.. csh-prompt:: >>$ ./build

.. csh-prompt:: >>$ sudo apt install ./si-csh_<Ubuntu_version>_amd64_<CSH_version>.deb

.. class:: centered

*Clone, configure, build and install software*





*Install CSH from release version*
11 changes: 4 additions & 7 deletions doc/MAN/Installation/launch_sw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ In order to launch in shell / interactive mode, start csh without a command. Run
* -

.. csh-prompt:: >>$ csh -h
| usage: csh -i init.csh[command]
| usage: csh -i init.csh
| In CSH, type 'manual' to access CSH manuals
|
| Copyright (c) 2016-2025 Space Inventor A/S <info@space-inventor.com>
.. csh-prompt:: >>$ csh
.. csh-prompt:: host>> csp init
| Version 2
| Hostname: lenovo
| Model: #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2
| Revision: 5.19.0-35-generic
| Deduplication: 3
.. csh-prompt:: host>>csp add zmq -d 8 localhost
| ZMQ init ZMQO: addr: 8, pub(tx): [tcp://localhost:6000], sub(rx): [tcp://localhost:7000]

Expand Down
2 changes: 1 addition & 1 deletion doc/MAN/Introduction/description.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CSH is a Linux program designed to interface to Space Inventor modules and satellites using a CSP interface. With a CAN dongle the PC will perform as a first-class citizen on the satellite bus and have full access to all systems.
CSH is a Linux application designed to interface to Space Inventor modules and satellites using a CSP interface. With a CAN dongle the PC will perform as a first-class citizen on the satellite bus and have full access to all systems.

After launch, CSH is also used to operate the satellite through the radio interface, utilising CSPs routing functionalities.

Expand Down
24 changes: 12 additions & 12 deletions doc/MAN/Operating_Instructions/builtin_commands.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ cmd add,<param>[offset] [value],Add a new parameter to a command
cmd done,-,Exit cmd edit mode
cmd new,<get/set> <cmd name>,Create a new command
cmd run,-,-
cmd server download,<name>,-
cmd server list,-,-
cmd server rm,<name>,-
cmd server upload,-,-
confirm,-,Block until user confirmation
crc32,<address> <length>,Calculate CRC32 on a VMEM area
csp add alias,-,Add a new Alias address
csp add can,-,Add a new CAN interface
csp add eth,-,Add a new Ethernet interface
csp add kiss,-,Add a new KISS/UART interface
Expand All @@ -25,6 +22,7 @@ csp add zmq,-,Add a new ZMQ interface
csp init,-,Initialize CSP
csp scan,-,-
download,<address> <length> <file>,Download from VMEM to FILE
echo,[string],Display a line of text
eth debug,-,Toggle ethernet debugging
eth info,-,List devices
exit,-,Exit application
Expand All @@ -44,7 +42,7 @@ list save,-,Save parameters
loki start,-,Start Loki log push thread
ls,[path],list files
manual,[manual pdf],"Show CSH documentation, use with no parameter to get the list of available manuals."
node,[node],Set global default node
node,node,Set global default node
node add,-,-
node list,-,Save or print known nodes
node save,-,Save or print known nodes
Expand All @@ -53,13 +51,19 @@ ping,[node],Ping a system
poke,<address> <data>,Poke
program,<slot>,Upload new firmware
prometheus start,-,Start prometheus webserver
pull,[OPTIONS],Pull all metrics from given CSP node(s)
pull,-,Pull all metrics from given CSP node(s)
pwd,-,Print current working directory
python,[(-c <python_string>|<filename>) [args...]],"Starts an interactive Python interpreter in the current CSH process
or execute the script in given file.
This allows you to run pretty much any Python code, particularly code using PyCSH which allows for interacting
with CSP nodes.

Use ""Control-D"" to exit the interpreter and return to CSH."
python3,[(-c <python_string>|<filename>) [args...]],"Starts an interactive Python interpreter in the current CSH process
or execute the script in given file.
This allows you to run pretty much any Python code, particularly code using PyCSH which allows for interacting
with CSP nodes.

Use ""Control-D"" to exit the interpreter and return to CSH."
rdp opt,-,Set RDP options to use in stream and file transfers
reboot,[node],Reboot a node
Expand All @@ -80,12 +84,6 @@ Sets the following environment variables during execution:

- __FILE__ to the path and name of the executed file
- __FILE_DIR__ to the directory containing the executed file, useful for running other files located relative to __FILE__"
schedule cmd,-,-
schedule list,-,-
schedule push,-,-
schedule reset,<server> <last id> [timeout],-
schedule rm,<server> <id> [timeout],-
schedule show,-,-
set,<param> <value>,Set
shutdown,[node],Shutdown a node
sleep,<sleep ms>,Sleep the specified amount of milliseconds
Expand All @@ -107,5 +105,7 @@ version,-,Print CSH version (and date if verbose)
vm start,-,Start Victoria Metrics push thread
vm stop,-,Stop Victoria Metrics push thread
vmem,-,List virtual memory
vmem compress,<src_address> <dst_address> <length>,Perform compression from src into dst
vmem decompress,<src_address> <dst_address> <length>,Perform decompression from src into dst
vts init,-,Push data to VTS
watch,<command...>,Repeat a command
Loading
Loading