Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert a .tmc file to a .hex file? #101

Open
cuixixixi-xi opened this issue Nov 28, 2023 · 1 comment
Open

convert a .tmc file to a .hex file? #101

cuixixixi-xi opened this issue Nov 28, 2023 · 1 comment

Comments

@cuixixixi-xi
Copy link

How do I convert a .tmc file to a .hex file?Can I compile it with tmcl-ide?I don't want to use tmcl-ide, can you provide code to do this?

@trinamic-bp
Copy link
Contributor

Hi. There is a little command line tool called TMCLAsm. It is not part of PyTrinamic but might fit your needs. It can be downloaded from the Analog.com website: https://www.analog.com/en/design-center/evaluation-hardware-and-software/motor-motion-control-software/tmcl-ide.html. It does not create a .hex file but a binary file.

This is the output of the help (TMCLAsm -h)

TMCL Assembler V1.0.0.0
TMCLAsm is a command line TMCL (Trinamic Motion Control Language) assembler.
It compiles TMCL files into binary files. It is also possible to generate a symbol file.

Usage: TMCLAsm [-h|--help] [-v] [-s] [-S] [-oOutputFile] [-iIncludePath] InputFile
Command line options:
-h or --help: Show this message.
-v: Verbose. Show extended information messages.
-s: Also generate a symbol file.
-S: Append a STOP command at the end of the TMCL program.
-o: Specify the name of the output binary file.
-i: Specify the path to search for include files.

At least the input file name needs to be specified. If no output file name is specified
the output file will have the same base name as the input file but ending with '.bin'.
The symbol file will have the same base name as the output file but ending with '.sym'.

Examples:
        TMCLAsm -v Example.tmc
        Assemble the file Example.tmc, generating a binary file named Example.bin.
        Show extended information messages.

        TMCLAsm -s Example.tmc -oOutput.bin
        Assemble the file Example.tmc, generating a binary file named Output.bin.
        A symbol file named Output.sym will also be generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants