- GCC (or a compatible C99 compiler)
- GNU Make
- x86 Linux is required to run the demo, since it uses terminal raw mode (
demo/x86-gcc)
cd zoom-shellmake demo
./build/zoom_shell_demoThe demo uses demo/x86-gcc/zoom_shell_cfg_user.h to override the default configuration and enables most features (including the extension modules). To exit, type exit or press Ctrl+D (depending on your terminal).
make testThe tests use test/zoom_shell_cfg_test.h, which is independent from the demo configuration. When everything passes, the process exits with code 0.
Note: if you encounter link errors after editing zoom_shell_cfg_user.h, run make clean first and then rebuild, so that every translation unit is recompiled with the new macros.
zoom-shell/
├── include/ # zoom_shell.h, zoom_shell_cfg.h
├── src/ # Core: core / cmds / var
├── extensions/ # Optional extensions (hexdump, log, calc, ai_bridge, ...)
├── demo/x86-gcc/ # PC terminal demo + link.lds
├── demo/stm32-freertos/ etc. # Templates for other platforms
├── test/ # Unit tests
└── docs/ # Documentation (this directory)
-
Copy or take inspiration from
demo/x86-gcc/zoom_shell_cfg_user.hto write your ownzoom_shell_cfg_user.h. -
Define a macro at compile time so the config header is included:
-DZOOM_SHELL_CFG_USER='"zoom_shell_cfg_user.h"' -
In
zoom_shell_cfg_user.h, setZOOM_CMD_MAX_LENGTH,ZOOM_GET_TICK(), and so on; toggle individual features withZOOM_USING_*macros.
For more details, see the "Porting to your MCU" and "Linker script" sections of the main README.md; the extension list is in extensions_overview.md, and the general porting procedure is in porting_general.md.
make libThis produces build/libzoomshell.a (the core plus the object files of each extension; the exact contents are defined by the Makefile).