GPASM(1)

πŸ“¦
version 1.5.2 Β· 2 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ GPASM(1) ✨

okay so bestie, gather round, because today we're talking about gpasm, aka the GNU PIC assembler, and it's from the Linux user's manual section 1 πŸŽ€


πŸ’– NAME πŸ’–

gpasm β€” the GNU PIC assembler, no cap 🫢


🌸 SYNOPSIS 🌸

gpasm [options] file

⚠️ WARNING ⚠️

bestie. real talk. 🚨 The info in this man page is an extract from the full documentation of gputils, and it's limited to the meaning of the options. For the complete and current docs, go read "gputils.ps" β€” it lives in the gputils docs directory. This is the teaser trailer, not the whole movie. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

gpasm is an assembler for Microchip (TM) PIC (TM) micro-controllers. It's intended to be compatible with the manufacturer's MPASM assembler. gpasm is part of gputils, and honestly? iconic. πŸ‘‘

Check the gputils(1) manpage for details on the other GNU PIC utilities β€” the whole fam is there. πŸ’œ


🌈 OPTIONS 🌈

Below is a summary of the gpasm options. And listen: gpasm options always supersede any settings in the source code. Always. The command line is the main character here. πŸ’…

  • -a FMT, --hex-format FMT β€” GPASM supports inhx8m, inhx8s, inhx16, and inhx32 hex file formats. This option controls which hex file format is used. The default is inhx32. ✨
  • -c, --object β€” Output a relocatable object (new COFF format).
  • -C, --old-coff β€” Output a relocatable object (old COFF format).
  • -d, --debug β€” Output debug messages. Spill the tea, gpasm. πŸ“
  • -D SYM=VAL, --define SYM=VAL β€” Define SYM with value VAL. This is equivalent to placing #define SYM VAL in the source. Same energy, less typing. πŸ’…
  • -e [ON|OFF], --expand [ON|OFF] β€” Macro expansion in the listing file is controlled using the EXPAND and NOEXPAND directives. This option can force either directive to be ignored. When "ON" is selected the macros are always expanded regardless of the presence of NOEXPAND. Likewise, "OFF" will force macros not to be expanded. Not me overriding your directives. πŸ™ˆ
  • -f, --full-address β€” Show full address in .lst file at the memory map region.
  • -g, --debug-info β€” Use debug directives for COFF.
  • -h, --help β€” Show the usage message and exit. Baby's first flag. πŸŽ€
  • -i, --ignore-case β€” All user defined symbols and macros are case sensitive. This option makes them case insensitive.
  • -I DIR, --include DIR β€” The top level assembly file is passed to gpasm as an argument. This file can contain INCLUDE directives. These directives open the specified file and then its contents are assembled. GPASM searches for these files in the local directory. If the file is not located, the default header path is checked. Finally, all paths specified using this argument are searched. It's giving very thorough search order. πŸ”
  • -j, --sdcc-dev16-list β€” Help to the extension of the pic16devices.txt file in the sdcc project. Using by itself, displays the all '16e' devices. Along with the '-p' option, shows only the specified device.
  • -k, --error β€” Enables creation of the error file.
  • -l[12[ce]|14[cef]|16[ce]], --list-chips[=([12[ce]|14[cef]|16[ce]])] β€” List supported processors based on various aspects. (f => x)
  • -L, --force-list β€” Ignore NOLIST directives. This forces gpasm to print every line assembled in the list file output. No hiding, we see everything. πŸ‘€
  • -m, --dump β€” Upon completion of the final pass of assembly, display the contents of instruction memory.
  • --mpasm-compatible β€” This option sets the MPASM compatibility mode.
  • -M, --deps β€” Output a dependency file.
  • -n, --dos β€” By default, gpasm generates hex files using ISO format. However, some device programmers required a DOS formatted file. This option will cause gpasm to generate a DOS formatted hex file. Old school, but valid. πŸ’Ύ
  • -o FILE, --output FILE β€” Alternate name of output files. Option effect of:
    • If the "-c" option included in the command line:
      • FILE.o, FILE.lst, FILE.err
      • (The "FILE.o" should specified.)
    • If the "-c" option not included in the command line:
      • FILE.hex, FILE.cod, FILE.lst, FILE.err
      • (The "FILE.hex" should specified.)
  • -p PROC, --processor PROC β€” Select the processor.
  • -P FILE, --preprocess FILE β€” Write preprocessed asm file to FILE.
  • -q, --quiet β€” Suppress anything sent to standard output. 🀫
  • -r RADIX, --radix RADIX β€” The supported radices are BIN, DEC, OCT, and HEX. The default is HEX.
  • -s[12[ce]|14[cef]|16[ce]], --list-processor-properties[=([12[ce]|14[cef]|16[ce]])] β€” Lists properties of the processors. Using by itself, displays the all devices or group of the devices. Along with the '-p' option, shows only the specified device. (f => x)
  • -S [0|1|2], --strict [0|1|2] β€” Set the strict level of the recommended instruction-parameters (W or F and A or B). The "strict messages" have higher priority than the warnings. (See: -w [0|1|2]) [0]
    • 0: Is the default. No strict messages.
    • 1: Show warning messages if one of is missing.
    • 2: Show error messages if one of is missing.
  • -t, --sdcc-dev14-list β€” Help to the extension of the pic14devices.txt file in the sdcc project. Using by itself, displays the all '14' and '14e' devices. Along with the '-p' option, shows only the specified device.
  • --strict-options β€” If this is set, then an option may not be parameter of an another option. For example: -I -c. Yeah, no nesting options, bestie, that's the rule. 🚫
  • -u, --absolute β€” Use absolute paths.
  • -v, --version β€” Show the version information and exit.
  • -w [0|1|2], --warning [0|1|2] β€” This option sets the message level.
    • 0: Is the default. It will allow all messages, warnings and errors to be reported.
    • 1: Will suppress the messages.
    • 2: Will suppress the messages and warnings.
  • -X, --macro-dereference β€” Use the source from where the macro was invoked for errors.
  • -y, --extended β€” Enable 18xx extended mode.

πŸ”₯ SEE ALSO πŸ”₯

gputils(1)


πŸ‘‘ AUTHOR πŸ‘‘

Craig Franklin <craigfranklin@users.sourceforge.net>


Copyright (C) 2002, 2003, 2004, 2005 James Bowman, Craig Franklin

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


and that's the whole thing bestie!! πŸ’– this page is from gputils-1.5.2, dated 2016-02-28, and it's the GPASM(1) page from the Linux user's manual. slay, go assemble something iconic βœ¨πŸ¦‹πŸŽ€