Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use shell commands, four files, in addition to the clk module, must be included in the build:

  • Micirum/Software/uC-Clk/Cmd/clk_cmd.c
  • Micirum/Software/uC-Clk/Cmd/clk_cmd.h
  • Micrium/Software/uC-Shell/Source/shell.c
  • Micrium/Software/uC-Shell/Source/shell.h

The file  clk_cmd.h  and shell.h must also be #included in any application or header files initialize µC/Shell or handle shell commands. The following directories must be on the project include path:

  • Micrium/Software/uC-Clk/CmdMicrium/Software/uC-Shell
µC/Shell with the µC/Clk shell commands is initialized in Listing - Initializing µC/Shell. The clk module initialization (Clk_Init()) function should have previously been called.
Code Block
languagecpp
titleInitializing µC/Shell
linenumberstrue
CPU_BOOLEAN App_ShellInit (void) { CPU_BOOLEAN ok; CLK_CMD_ERR clk_cmd_err; ok = Shell_Init(); if (ok == DEF_FAIL) { return (DEF_FAIL); }

Refer to ClkCmd_Init(

&clk_cmd_err); if (clk_cmd_err != CLK_CMD_ERR_NONE) { return (DEF_FAIL); } return (DEF_OK); }

) API for an usage example.