kevinpt / opbasm

Open PicoBlaze Assembler
http://kevinpt.github.io/opbasm/
MIT License
60 stars 13 forks source link

How to provide KCPSM6_version$ without modifying psm source #13

Closed svenn71 closed 7 years ago

svenn71 commented 7 years ago

KCPSM6 assembler seems to provide a magic definition to insert this variable in some reference examples. I tried to do: -D KCPSM6_version=opbasm --version, but this failed How can I provide a variable from the command line?

kevinpt commented 7 years ago

You need to use m4 for the -D options to be processed. Either save your source with the ".psm4" extension or add "--m4". However, the output of "--version" is a string that can't be handled cleanly from m4. I will look into copying the KCPSM6 behavior.

kevinpt commented 7 years ago

I have added a new Opbasm_version$ you can use to get the assembler version. Only available from the Github repo as v1.3.3. Install manually or with "pip install --upgrade https://github.com/kevinpt/opbasm/tarball/master".