Sei sulla pagina 1di 2

Department of Electrical Engineering, Indian Institute of Technology – Bombay

ccm command set description: TMS320F28379d interface

Invocation: ccm [n], where n = 0...9. This opens up a UART serial port to the TMS320F28379D board
over the /dev/ttyUSBn interface.

The argument n is optional. The commands ccm and ccm 0 are equivalent. They both use the interface
/dev/ttyUSB0 to communicate with the processor board.

Typing ccm on the host computer at a shell command prompt invokes the command-line interface. If invoked
successfully, it displays the current core CPU and FPU register contents and presents the ‘‘CCM-> ’’ prompt.
At this prompt the user can type commands to interact with the TMS320F28379D processor. Pathname and
filename completion are enabled. Further, command history is enabled. Previous commands can be accessed
by the Up and Down arrow keys. Previous commands can also be edited after they are accessed.

Note: The processor-side firmware associated with ccm uses memory in the M1 SARAM block as follows.

Stack space: 0x000400 to 0x00043f Firmware code: 0x000440 to 0x0005ff

Users should not place their programs in these locations. Further, ccm uses the SCIA Recieve Interrupt 9.1
(SCIRXINTA) to communicate with the processor. User programs should not disable this interrupt.

The user commands supported by ccm are described below, including the variants of these commands.

• r: Read and display memory contents as 16-bit words.


r address: Read and display the contents of the memory location with the address address.
r address range: Read and display range words from memory, starting at the location with the
address address.
The memory contents are displayed both as 16-bit words and their corresponding Q-15 values. The
parameters address and range are entered as hexadecimal numbers, with or without a leading “0x”.
The r command may be used while the processor is executing a user program. It need not be halted.

• rf: Read and display memory contents as 32-bit floating point numbers. The variants of the rf com-
mands are the same as those for the r command. Starting with the specified address, the rf command
concatenates two 16-bit words and displays the 32-bit result as a floating-point number in the scientific
notation. It also displays the corresponding 32-bit hexadecimal word. Note that this command ignores
word alignment: it does not care whether the starting address given is an even or odd number.

• w address data: Write the 16-bit data word to the memory location with address address. Both param-
eters are entered as hexadecimal numbers, with or without a leading “0x”.
The w command may be used while the processor is executing a user program. It need not be halted.

• c: Display and change CPU core and FPU register contents.


c: Display the contents of all CPU core and FPU R0–R7 registers.
c register: Display the contents of the register register.
c register value: Change the contents of the specified register register to value.
The register name register can be given either in upper- or lower-case letters. For the CPU core registers,
the value is given as a 32-bit hexadecimal number, entered with or without a leading “0x”. For the FPU
R0–R7 registers, the value is given as a floating-point number such as 314.15 or 31.415e1 or 3141.5e-1.

1
• l filename: Load the binary executable file filename into the processor’s memory. If the program entry
point is specified in the executable file, the l command will initialize the Program Counter, PC, with this
value. The command only initializes the PC but does not initiate program execution.
The binary file specified must be in the boot data stream format recognized by the TMS320F28379D
ROM bootloader. Valid files have 0xaa and 0x08 as their first two bytes. These files can be created from
Common Object File Format (COFF) binary files using the Texas Instruments hex2000 format conversion
utility. Refer to Section 4.9.5.1 Bootloader Data Stream Structure of the processor’s technical reference
manual for more details.

• x: Execute a program on the processor. This transfers control of the CPU from the ccm firmware to the
user program.
x: Execute the program from the current Program Counter (PC) location. Note that the l command
may have already initialized the PC to the correct starting point of a loaded binary file.
x address: Execute the program starting from the address specified by address. The address is
entered as a hexadecimal number, with or without a leading “0x”.

• h: Halt a running program. This transfers control of the CPU from the user program to the ccm firmware.

• si address range filename: Save the contents of the specified block of memory into a file on the host
computer as 16-bit hexadecimal numbers. The contents are saves in the file filename on the host computer.
The address is the start and range is the size of the memory block. Both are entered as hexadecimal
numbers, with or without a leading “0x”.

• sq address range filename: This command functions in the same way as the si command, except that
the contents of the specified memory block as saved as Q-15 fractions.

• sf address range filename: This command functions in the same way as the si command, except that
the contents of the specified memory block as saved as 32-bit floating point numbers in the scientific
notation. Please see the description of the rf command for further elaboration.

• gid: Print the processor’s 32-bit unique identification number.

• gport: Print the name of the port to which the processor board is connected.

• fver: Print the build date of the currently loaded processor-side firmware.

• sys: Execute a system command.


sys: Present the shell prompt of the sh shell. The user may type shell commands at the prompt.
Typing exit returns control back from the shell to the command line interface, and the ‘‘CCM-> ’’
prompt is displayed.
sys command: The shell command command is executed, and the ‘‘CCM-> ’’ prompt is re-
displayed. The command command may have blanks and other characters. For example, sys ls is
a valid input, and so is sys ls -l.

• t: Restart the ccm firmware. This re-initializes several parameters to their default values set by the ccm
firmware. In particular, the stack is flushed and the stack pointer is initialized to the address 0x0400.

• q: Quit the command line interface.

mcc/20190819

Potrebbero piacerti anche