GithubHelp home page GithubHelp logo

picasm's Introduction

Thanks for trying out PICasm, a little development environment for
writing PIC assembler programs. This is the first release, so there
are probably bugs. Feel free to contact me if you find any.

Features:

* Syntax highlighting
* Indentation
* 'Electric' comment key
* Automatically look up information for a chip at Microchip's website.
* Assembler/Linker support for GNU gputils and Microchip's MPASM (via WINE)
* Programmer support for the pk2cmd program
* Delay loop calculation and code generation

I didn't implement a "Project" system like MPLAB and piklab have; if
you want that there are several project management systems for emacs
that you can add.

I plan to add simulation/debugging support via GPSIM at some point in
the future.

Installation
------------

I don't have much in the way of automated installation; here's a list
of things you'll want to do in no particular order:

* Drop all of the .el files somewhere emacs can find them. 

* Byte-compile all of the .el files if you want.

* Make sure you have either GNU gputils or MPLAB+WINE installed.
  GNU gputils is better supported, so use that if you have a choice.

* Add "(require 'picasm)" to your .emacs, and start Emacs. If you
  won't be writing PIC assembler all the time, another option is to
  use auto-loading. Try adding this to your .emacs instead:
    (autoload 'picasm-mode "picasm"
      "Mode for editing PIC assembly files." t)

* Visit the customization options: "M-x customize-group RET picasm"
  and "M-x customize-group RET picasm-external" to set paths and other
  options.

If you've done all of those things, you should be able to edit files
now. If you use the ".asm" extension for your PIC assembler files (and
only PIC; if you write assembler for other chips this will break
regular assembler-mode), you can change the auto-mode-alist entry for
.asm like this:

(add-to-list 'auto-mode-alist '("\\.asm$" . picasm-mode))

If the file you're editing contains a line like #include
<pSOMETHING.inc>, PICasm will assume that you're using a chip called
PICSOMETHING. Otherwise, it will ask you for the name of the chip
you're writing for when you open or create a file. Don't worry about
case. Once PICasm knows what chip you are using, M-x
picasm-describe-chip will be able to pull up information about it,
automatically downloaded (and cached) from Microchip's website.

If this doesn't work for some reason, the format of their website has
probably changed (unfortunately, the only way to get this information
is by screen scraping). If so, some of the code in picasm-db.el
probably needs to be changed.

Things to Try
-------------
Of course, the first order of business is indentation and syntax
highlighting. After that, here are a few neat things to try:

* "M-x picasm-describe-chip" will give you some interesting information about
  the PIC chip you have selected.
* "C-c C-c" will assemble and link your program using whatever toolchain
  you have selected (gpasm/gplink are the default).
* "C-c C-p" will upload your program (the ".hex" file you created when
  you compiled it) on to your chip. This assumes you have both a
  PicKit2-compatible programmer attached off of a USB port, and the
  Microchip "pk2cmd" command-line program installed. 
* Pressing ";" will insert a comment at the end of the current line
  and move point there.
* "M-x picasm-insert-delay" will ask you for a label, the number of seconds
  you wish to delay (use decimals for delays shorter than one second),
  and the speed of the clock you have selected in MHz (use decimals
  for sub-1MHz clocks), and insert code to delay that many seconds.

Links
-----
* This software can be downloaded at: 
  http://http://code.google.com/p/picasm/
* Links to pk2cmd (for Linux) and MPLAB (for Windows) can be found at: 
  http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805
* Your OS's package repository probably has WINE, needed to run MPASM, available
  as a package. If not, WINE can be downloaded at http://www.winehq.org.


I haven't written assembler for PIC18F-series chips yet, so you won't
find support for them here. Feel free to send me a patch implementing
this! 

Have fun. Report bugs. 

-Daniel Debertin
--
[email protected]
[email protected]

picasm's People

Contributors

ibizaman avatar rswarbrick avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.