More electronics projects on mikekohn.net here.
Posted: July 25, 2012
Since I was adding new CPU support to naken430asm I decided to rename it to naken_asm. This is a raw, simple assembler. I have some include files for msp430 and Alexander Zhevak has made more complete include files available from: git clone git://github.com/zhevak/naken430-inc.git. Include files from Microchip for dsPIC work after being run through an included script and Atmel include files work directly from Atmel. As a side project, with help from Joe, we have been putting together a Java .class compiler called Java Grinder which produces output that can be compiled with naken_asm.
Stable here means I've been using it and proved it's working well. Beta means all the code is down but I haven't gotten a chance to write much code around it. If anyone else has been using one of these assemblers / disassemblers and finds it stable please let me know.
The source code is for compiling on Linux, BSD, or any other OS. Just install gcc and type ./configure and then make.
Repository: git clone https://github.com/mikeakohn/naken_asm.git
65xx - Support for 6502, 65c02, 6507, 6510, and any chip of this 8 bit family.
680x - Support for CPU's compatible with the 6800 instruction set.
68HC08/CPU08 - 68HC08 microcontroller instruction (CPU08). I did this specifically for the 68HC908GP32.
680x0/CPU32 - My target for this minimum 68000 for Amiga programming or Sega Genesis or such. I may add Amiga executable support for input and output.
8051/8052 - Support for 8051 and 8052 8 bit family chips (also known as MCS-51). I tested some code on an Atmel AT89S52.
ARM - Disassembler and assembler are mostly done for generic instructions. I made a small program to prove it working on the Raspberry Pi here.
dsPIC - Both disassembler and assembler are working. Proved it out with a Toy Car project.
MSP430 - Full MSP430 and MSP430X support.
STM8 - Added support for STM8. Valentin Dudouyt has created a tool to flash the STM8 Disovery board with Linux: https://github.com/vdudouyt/stm8flash.
TMS1000/TMS1100 - An old TI 4 bit CPU that's used in the Speak & Spell, Speak & Math, some old calculators, and others.
TMS9900 - One of the first 16 bit CPUs. From the looks of it it seems to be the grandfather of the MSP430. I didn't use TMS9900 standard syntax for hex, but I can change it if i get requests.
Z80 - I got all my info for this chip mostly from http://wikiti.brandonw.net/index.php?title=Z80_Instruction_Set and http://search.cpan.org/~pscust/Asm-Z80-Table-0.02/lib/Asm/Z80/Table.pm. There were a few weird things in here so I downloaded the datasheet from Zilog. There were just a couple extra instructions on these pages, not sure why. Anyway, the assembler/disassembler should be working.
How To Help
I've been working on a README I'm going to start including with the
launchpad_blink.asm - Make 2 LED's blink with the MSP430 Launchpad
March 22, 2014: I added symbols information from ELF to naken_asm so bprint and wprint for example can use the symbol names instead of just numbers. I also added a simulator for avr8 to assist in the avr8 Java Compiler for Java Grinder.
March 16, 2014: I added some code so that naken_util can now execute MSP430 code from the command line without entering the simulator. The purpose for this was to help automate testing of Java Grinder. Now if Joe or I make a change to some critical code, make tests will compile some Java programs, grind them into MSP430, and then execute them with naken_util and test that R15 is the expected value. There are a bunch of tests like this that I've been wanting to add to naken_asm too, but I have so little time.
February 22, 2014: I've been cleaning up some code today. Trying to make some of the older naken430asm code that I moved here easier to read. I've also started changing my spacing system from the x=1 format to the more common x = 1. I fixed a bug that made $ for hex in 65xx stop working and added a .set directive. Now from anywhere in the code .set can be used to set a variable in the address list (same list as labels are put in) except this number can change as many times as the user wants.
Also, I've currently been working on a project called Java Grinder (with Joe Davisson again doing the 65xx part) which uses this assembler.
November 29, 2013: I introduced a bug into the September 18, 2013 release that made naken_asm not deal with single ascii characters inside of '' correctly. This is fixed in the November 29, 2013 version. I removed any versions of naken_asm with that problem from my website.
November 28, 2013: Made some major improvements to ARM. Doing some comparing between GNU's as and naken_asm to make sure it's okay. Eventually I'm planning on making some auto-test of all the instructions like I did with dsPIC. Also, naken_prog can now program LPC chips. I can read the flash back and see that it came back the same way I wrote it so it appears it's working. I also fixed a bug in writing out symbols in ELF output.
November 07, 2013: I fixed a bug in the cycle counter in MSP430 and finished my clean-up of the ARM code. Over the next couple weeks I'm going to do some QA on it to make sure everything is working okay. I also added naken_prog which is currently able to read info and flash from LCP1114 ARM chips (and probably some others). Tomorrow I plan to make it so I can write to the flash of a chip.
October 30, 2013: I started on a major cleanup / rewrite of the ARM code a couple weeks ago. Hopefully in the next couple weeks I'll have a chance to finish it up. If not it's my Thanksgiving project.
July 28, 2013: Major rewrite of dsPIC assembler / disassembler is done. I added a script for converting Microchip's include files to naken_asm style. Working on my first big dsPIC project so I can mark this as stable.
July 21, 2013: Posted the latest. I deleted almost all of the dsPIC assembler and started over. I've been checking every type of instruction against the Microchip assembler and everything is looking really good. I have a couple things to polish up and a little more testing to do. Also, I have 6 DSP instructions that I haven't added yet. Should be done in a couple days I hope. Also, thanks to Ene Alexandru for reporting a segfault in the disassembler for msp430x and sending me a fix. That's included in this release too.
Copyright 1997-2014 - Michael Kohn