Copyright: Made with Shalom Help Maker www.danish-shareware.dk/soft/shelpm/


Configure AsmIDE

1. Install AsmIDE on your computer.
Extract the files from the ZIP archive.

Now start AsmIDE.

2. COM Port Selection.
Now it asks if you want to select your COM port. Say Yes.

This configuration item is used to select the COM port that you will use with the Terminal window, and with the Download function.
Pick your port in the dropdown box. It defaults to 9600 baud, which is normally correct.

NOTE: If you will be using the Wytec 68hc11 Tools, then you won't be able to use them same COM port with both the terminal window and the Wytec Tools. It's best to disable the terminal window if you will be using the Wytec Tools, unless you will be using a different COM port.

3. Assembler
Before you press OK, switch to the Assembler tab in this dialog.  (If you pressed OK before coming here, then select "View..Options, Assembler" to return here.

The main configuration item you need to select here is the type of processor you want to use. You must select either 6809. 68hc11 or 68hc12 as your Currently Selected Chip Family. This is used to select which Assembler will be executed to assemble your programs. This is also used to select your Assembler helpfile.

This configuration tab also shows the path names of your assembler executables and help files. These will normally be correctly set up for you, but you may need to change them in special situations.

4. Filename Association
Before you press OK, switch to the Associations tab in this dialog. (If you pressed OK before coming here, then select "View..Options, Associations" to return here.

This option allows you to associate your assembler file extension to AsmIDE. This lets you double-click on an assembler file in Windows Explorer to launch AsmIDE to edit the file.

Specify the extension of the assembler files you normally use. It defaults to .asm, but you can change it.

Press the "Associate Assembler Files with AsmIDE" button to make this association.

5. Wytec 68hc11 Tools
The Wytec company has a couple proprietary programs used to download .s19 files, and to interact with the debugger on their 68hc11 EVB boards. These tools are only used with the Wytec 68hc11 Phantom monitor. If you have the Buffalo monitor, then you don't need these tools.

If you have the Wytec software loaded on your computer (in the default directories), then the pathnames for the Wytec tools will be setup for you automatically. If you don't have the Wytec tools, then leave these pathnames blank.

You must disable the Wytec tools if you want to use the Terminal window on the same COM port. For obvious reasons, you can't have 2 programs using the same COM port at the same time. However, you can use both the Wytec tools and the Terminal window at the same time if you are using different COM ports.


How to Assemble a sample source file

1. Open the project.
Choose File..Open from the main menu, or else press the Open button on the toolbar (second button from the left).

If you selected the 68hc11 as your current chip family in View..Options, then open file: Ex2-hc11.asm.

If you selected the 68hc12, then open file: Ex2-hc12.asm.

2.  Assemble the file.
When you assemble a source file, it creates a .s19 file that can later be downloaded to your board.

You can assemble the file by selecting Build..Assemble from the main menu, or by clicking on the Assemble button (it has a picture of a gear).


How to create a new Assembler Source file

Select File..New from the main menu, or press the New button (the first button).

This lets you enter the text for your new program.

When you are done, you should remember to Save the file (File..Save, or use the Save button (third button).


How to download an .S19 file to an embedded board

There are Special Procedures for the 9S12C32  See the help topic on the 9S12C32 for more info. The procedures described here assume you are not using that device.

How to download an .S19 file to an embedded board

An .s19 file is generated by the assembler. This is the file you use to program your board.

You don't have to open an Assembler source file in order to do a download, but it might be handy for you if you want to open the source file first.

Make sure you Assemble the file if you have made any changes to it.

This function is not designed to be used with the Wytec hc11 Phantom monitor. Please see the special instructions for the Wytec hc11 tools.

Most people who use this function will use the Buffalo monitor with the 68hc11, or the D-bug12 monitor with the 68hc12.

For the 6809, you will use the custom monitor that comes with your board.

Any monitor you use must support execution of commands over the COM port using text commands.

IMPORTANT!  This download function will send the .s19 file directly to your board through the COM port. You have to tell your board to prepare to receive the file BEFORE you actually start the download. This is normally done by giving commands to the monitor on your board by using the terminal window. The actual commands to do this will vary depending on your monitor.

For the D-bug12 monitor:
1) Reset the board by pressing the reset button
2) In the Terminal window, issue the LOAD command

You can do a download by selecting Build..Download from the main menu, or by pressing the Download button (it has a picture of lightning on it). Once you select this function, it lets you pick the file you want to download. Select the file and press Open to begin the download.


How to use the Wytec 68hc11 Tools

The Wytec 68hc11 Tools are proprietary programs developed by the Wytec company. I do not distribute these tools with AsmIDE. You must get the programs with a Wytec board that you purchase.

Their are two Wytec Tools that can be used directly from AsmIDE: the debugger, and the 68hc711 programmer.

These tools should ONLY be used if you have a Wytec 68hc11 board with a Phantom monitor. If you have any other board, or if you are using a Buffalo monitor, then you must not enable the Wytec tools.

The debugger is used to download programs to Wytec 68hc11 boards that have a Phantom monitor. For example, I have the EVBPlus2 board that uses the Phantom monitor. The debugger can also interact with the Phantom monitor to help you run and debug programs. Please see the Wytec documentation for details.

The 68hc711 programmer is used to program the onboard flash memory on the chip.

Before you use the Wytec Tools, make sure that your settings are correct in View..Options on the "Wytec hc11 Tools" tab.

NOTE: If you will be using the Wytec 68hc11 Tools, then you won't be able to use them same COM port with both the terminal window and the Wytec Tools. It's best to disable the terminal window if you will be using the Wytec Tools, unless you will by using a different COM port. To disable the Terminal Window, go to the General Options tab in View..Options, and uncheck the box that says "Enable the Terminal Window".

To download an .s19 file using the Wytec debugger:

You don't have to open an Assembler source file in order to do a download.

Start the Wytec tools by selecting "Build..Wytec hc11 Tools" from the main menu, or by pressing the "Wytec hc11 Tools" button.

Now you get the tools menu. This lets you select the name of the .s19 file you want to download. You can press the Browse button (with three dots) to bring up a dialog box that lets you select a filename.

The first time you select a filename you don't need to press the "Select this file" button. This button is only needed if you have already started the debugger and you want to change to a different filename.

Press the Debugger button to start the Wytec debugger. It will set up your COM port and automatically begin downloading the .s19 file to your board.

Use the "go" command to run your program. You can give it the starting address of your program, or the name of the label for this address.

See the Wytec documentation for details on the various commands.

How to change to another .s19 file while the debugger is running

The "Wytec hc11 Tools" dialog can be used to select a different filename while the debugger is still running. You can select a different filename and press the "Select this file" button. Then, the Wytec debugger can see the new filename and do another download if you press F10 then R from inside the debugger.


General Info

1) To see what function each toolbar button performs, just let your mouse hover over the top of the button.

2) The tabbed-windows along the bottom of the screen can be made larger by grabbing the separator horizontal line and dragging the window to  make it larger or smaller.

3) You can program text values for function keys to be sent from the terminal window. go to View, Options, and select the Terminal Func Keys tab

4) You can check for updates to AsmIDE at my web site:
http://www.ericengler.com/AsmIDE.aspx


9S12C32 Special Procedures

9S12C32 Special Procedures

The 9S12C32 is a special type of MPU that lets you program the flash without the use of a BDM (Background Debug Module). You only need a serial cable to program the flash if you are using the internal Motorola 2K serial monitor.

I am using Karl Lunt's binload commandline program from inside AsmIDE to program the flash memory on the 9S12C32. If you'd like to see Karl's web page on binload, go here: http://www.seanet.com/~karllunt/binload.htm

These instuctions were tested on a 9S12C32 board made by Technological Arts. I have the 32 pin DIP module that is plugged in to their docking module. The serial port on the docking module is connected to the PC serial port.

General Info About How Programs Are Downloaded and Executed

The method of programming this chip is different than the normal way of downloading programs into RAM using Buffalo or D-bug12. This chip does not have a full-featured monitor that can execute commands given in the terminal window.  Instead, it has a small 2K serial monitor that can only execute binary encoded commands. You can only interact with it using a special program running on your PC.

There is a special switch on the 9S12C32 DIP board that lets you select one of 2 operating modes. The boot position is used to write programs to  the flash memory. The Run position is used to run programs after they have been written to the flash memory.

There are 2 free programs for the PC that help you interact with the serial monitor.

1. binload from Karl Lunt This is a commandline program that only supports a few features. The main features are the ability to erase the flash and to program the flash by downloading .s19 files. To make it easier for end-users of AsmIDE, there is built-in support for binload that lets you program the flash simply by pressing the Download button.  I've included binload.exe with AsmIDE, so you already have it installed on your hard disk. There is no integrated support for examining registers or memory with binload, so your only debugging option is to modify your program and then download it again to see if you fixed the bug. This isn't as bad as it sounds because it's a very fast and easy process. Karl has built-in a special memory remapping algorithm that lets you treat the flash a one big segment of 30K bytes beginning at location $8000. The upper 2K bytes of flash are reserved for the serial monitor. The 2K bytes of RAM will be at $3800 to $3fff.

2. uBug12 from Technological Arts This is a full-featured program that lets you examine memory and registers, change memory and registers, erase flash, and download programs. It does not support breakpoints - you need to use a BDM to get breakpoint support. This uBug12 program requires version 1.1 of the Microsoft .NET Framework. I do not have any integrated support for uBug12 so you have to use it as a separate program if you want to use it. You can download uBug12 here:
http://www.technologicalarts.com/myfiles/9s12c.html
Important: uBug12 assumes you will be loading the flash into memory with the starting address of $4000. My profile for the 9S12C32 has been set up for a starting address of $8000 to make it compatible with binload. This means you need to set up a new profile if you want to download using uBug12.

Configuration Options in AsmIDE for the 9S12C32

Go to View...Options, select the Assembler tab, then select the 68hc12 processor. In the tab for the 68hc12 you'll see a checkbox that enables binload for downloading. Put a check in this box. We will use the same COM port configured for use in the Terminal Window.

You might also want to specify a commandline for SRecCVT. Since you will be programming Flash memory, it is advised that you use SRecCVT. Here is the commandline I am using for my device:
-m 0x00000 0xfffff 32

How to use the Sample project and Download the .s19 file

1. Open the project.
Choose File..Open from the main menu, or else press the Open button on the toolbar (second button from the left).

Select my demo assembler file: blinkC32.asm. This will be in the same directory as AsmIDE.

2.  Assemble the program.
You can assemble the file by using Build..Assemble from the main menu, or by pressing the "Assemble" button on the toolbar (it has a gear picture on it).

3. Download to the flash memory
Select Build..Download from the main menu, or press the Download button (it has a picture of lightning on it). Once you select this function, it tells you to put the switch on the DIP module in the boot postion, press the reset button on the docking module, then press OK. Then it asks you to select your .s19 file (it correctly defaults to Ex2.s19) and press Open. Once you do this, it erases the flash memory (except for the top 2K of protected flash where the serial monitor lives), and then it downloads the Ex2.s19 file to the device. This will program the flash memory starting at location $8000. When it's done it will pop up a message saying "File download was successful".

3a. What if you see an error message saying "File Download Failed - See Make Log for Details"?
This means the download and flash programming failed. This is usually caused by you forgetting to press the reset button on the docking module, or maybe you didn't have the switch in the boot position. Some other possible causes: maybe you didn't apply power to the docking board, maybe your serial port wire wasn't plugged in to the docking board or the PC, or maybe you didn't configure the right serial port on the COM Port Options screen.

4. Run your program
You simply need to move the switch on the DIP module to the Run position and press the reset button on the docking board. You should now see the LEDs blinking in a binary counting routine!  Also, anytime you apply power to the board while the switch is in the Run position, your program will begin automatically.


SRecCVT for 68hc12

For the 68hc12, you can use the Motorola SRecCVT program to modify your .s19 file to make sure you can use it to program Flash memory. To specify the commandline for this, go to View..Options, Select the Assembler tab, then select the 68hc12 processor.

Specify a set of commandline options in the box for SRecCVT. Do NOT specify the pathname or filename of the SRecCVT program. This program is distributed with AsmIDE, and it must be located in your AsmIDE folder.

Here is the commandline I am using for my 9S12C32 device:
-m 0x00000 0xfffff 32

See the Motorola documentation for details on the commandline options for SRecCVT. I've included the Motorola PDF file and the device table with AsmIDE.


Auto features for all processor types

These Auto features apply to all processor types:

- AsmIDE will automatically re-open the last assembler file you worked on.

- AsmIDE will automatically save your changes when you Assemble or Download

- AsmIDE will use the .s19 file for the current ASM file when you download (no filename prompts)

You can disable any or all of these actions if you go to View, Options, and select the AutoFunctions tab


Auto Commands for d-bug12 only

These Auto Commands apply to the d-bug12 monitor used with 68hc12/68hcs12 parts only.

 AutoLoad - This will automatically download your .s19 file to the board if your assembly completes without errors. This sends the LOAD command to your monitor, and then sends the .s19 file.

 AutoGo - This will automatically begin program execution by sending the GO command to your monitor.

 AutoDump - This waits for your program to finish execution, then it automatically sends one or more dump commands to the monitor (MD). To make it easier for you to look at the dumped memory info, it will automatically create a new window in the IDE for each dump you specify! You can easily scroll through the data. It also does a register dump for you automatically anytime you specify a dump. You can print all of the dump windows easily with File, Print All Dumps.

All of the AUTO commands are programmable by giving the command text as comments in your source code. Here's an example of one of these special comment lines:

   ;AsmIDE AutoLoad="Load" AutoGo="g 2000" AutoDump="md 2000 2040"

The new features are enabled by default, but you can disable them through the Options screens in case you find that they don't work right for your board, or COM port, etc. These features are also not used unless you add the special ";AsmIDE" comment line in your source code, because this comment line tells me exactly which auto commands you want me to generate for that particular source code file. The memory addresses in this line should be customized for each particular program.

The AutoDump command is the most magic of these commands because it sits and waits for your program to finish. The best way to end your program is to use the SWI assembler instruction because this will preserve the register values, and you will see the right register values in the Register dump display. However, we often write "infinite loop" programs that never really finish - we just press the RESET button on the board to end the program. This method of ending the program causes your monitor to be reset, so the register contents will be changed and the Register dump display won't show the register contents that were being used by your program when it was interupted by the reset button. If you really need to know what values were in the registers, then you can either end the program with SWI, or you can save those values to memory locations and specify an AutoDump to display those memory locations. User RAM memory contents are preserved accross a reset.

You can have more than one AutoDump spec for each program! Simply add extra clauses to the same comment line shown above,  or use extra comment lines:

;AsmIDE AutoLoad="Load" AutoGo="g 2000" AutoDump="md 2000 2040" AutoDump="md 2500 2580"
;AsmIDE AutoDump="md 3000 3340"

These features are great time-savers when you're developing programs that run from RAM. You can press the Assemble button, if you get an error-free assembly, it can automatically download the .s19 file to the RAM on your device, it can automatically give it the "go" command to begin execution, and it can automatically dump memory areas when the program ends. This will save a LOT of time during program development!

You can print the contents of all dump windows at one time by using File, Print All Dumps.

You also have 2 new toolbar buttons for use with d-bug12 only

The DUMP toolbar button performs an "on demand" AutoDump anytime you want it. You must have the AutoDump comment line in your source code as described above.

The HYPERBAUD toolbar button sends a new baud rate command to the monitor, and then it changes your serial port to the new baud rate. The hyperbaud rate is 57600 baud.

Important! If you are using the HYPERBAUD mode, and then you reset the processor, it will automatically change back to 9600 baud. You can swith AsmIDE back down to 9600 by pressing HYPERBAUD one more time. Or, if you'd rather stay at the higher speed, just press HYPERBAUD 2 times after each reset of your board!


Keyboard Shortcuts in Editor

Keyboard Shortcuts

Cursor Position: change the position of the cursor

Left Arrow	Left one character
Right Arrow	Right one character
Up Arrow	Up one line
Down Arrow	Down one line
Control+Left	Left one word
Control+Right	Right one word
Home	Start of line
End	End of line
PgUp	Up one page
PgDn	Down one page
Control+PgUp	Top of page
Control+PgDn	Bottom of page
Control+Home	Begining of file
Control+End	End of file

Selection: control how the currently highlighted text behaves.

Shift+Left	Select left
Shift+Right	Select right
Shift+Up	Select up
Shift+Down	Select down
Control+Shift+Left	Select word left
Control+Shift+Right	Select word right
Shift+Home	Select line start
Shift+End	Select line end
Shift+PgUp	Select PgUp
Shift+PgDn	Select PgDn
Control+Shift+PgUp	Select page top
Control+Shift+PgDn	Select page bottom
Control+Shift+Home	Select editor top
Control+Shift+End	Select gotoxy
Control+A	Select All
Control+C	Copy selection to clipboard

Scrolling:  control everything to do with scrolling.

Scroll Up+Control	Go up one line
Scroll Down+Control	Go down one line
Scroll Left	Left one character
Scroll Right	Right one character

Actions: perform various actions.

Control+Shift+B	Go to matching bracket
Control+(number)	Move to marker (number)
Control+Shift+(number)	Set marker (number)
Enter	Line break at current position, move caret
Control+N	Line break at current position, no move caret
Alt+Backspace	Perform undo if available
Control+Z	Perform undo if available
Alt+Shift+Back	Perform redo if available
Control+Shift+Z	Perform redo if available
Shift+Delete	Remove selection place on clipboard
Control+X	Remove selection place on clipboard
Shift+Insert	Move clipboard contents to current position
Control+V	Move clipboard contents to current position
Control+Shift+I	Move selection to right
Control+Shift+U	Move selection to left
Tab	Tab key
Shift+Tab	Tab to left
Insert	Toggle between Insert and Overwrite mode

Delete:  commands having to do with deleting text.

Backspace	Character to left
Delete	Character to right
Control+T	Word to right
Control+Bkspc	Word to left
Control+Shift+Y	From cursor to end of line
Control+Y	Current line