![]() |
||
PortAsm/68K for ColdFire Technical Notes |
||
|
|
We have grouped information on this page as follows: Tips for using different ColdFire toolsets
Other practical information
Diab Data assembler & linkerSelect the -a diab option in PortAsm to generate code for the Diab assembler. There are no special options which you need to set for the Diab tools themselves; code translated by PortAsm should assemble without problems using the default assembler settings. (In order to ensure that only ColdFire instructions are produced by the assembler, you should make sure that DTARGET and DOBJECT are correctly set up for the ColdFire processor and environment you are using. We recommend using the ELF object file format.) The only problem which has been reported is that, in Version 3.7a of the Diab tools, the assembler sometimes doesn't report overflow errors on branches which go out of range. We believe this problem has been fixed by Diab Data in Version 4.0 and later. (If you are using 3.7a, we recommend that you select the PortAsm options -branch_short_unsized and -branch_islands which should work around the problem). Source-level debugging on code assembled and linked using the Diab tools and the ELF object-file format works very well. Setting the PortAsm -sym option will cause PortAsm to generate the necessary debugging directives in the output code. You can test this out with SingleStep (see below). For more information, see the Diab Data site. SingleStep (Software Development Systems, Inc)SingleStep provides an excellent Background Debug Mode (BDM) debugging environment for code translated using PortAsm and assembled using (for example) the Diab assembler and linker. You need to remember to set the default directory in SingleStep to point at the '.lst' files which PortAsm produces (to do this, bring up the SingleStep Command window and use the cd command to set the directory. It is best to do this before using the File/Debug.. command to download the object code to your target ColdFire board). If the entry point of the code you are debugging is an assembler label (rather than a C 'main' function), you need to disable the 'Execute until main' checkbox in the File/Debug.. dialog box - otherwise SingleStep will keep trying to execute instructions waiting for a label called 'main' to be reached - which may be never! For more information, see the Software Development Systems, Inc, site. The Gnu assembler & linkerYou need to set the PortAsm -a gnu option in order to generate code in the format expected by the Gnu assembler. At the time of writing, the ColdFire versions of the Gnu tools are fairly new, and so the information presented here may be subject to change. When testing against the Gnu assembler (Version 2.8.1), we found the following:
The Mentor Graphics Microtec assembler & linkerPortAsm will generate output in the Microtec format if you select the -a mri option, ready for assembling using Microtec's ASMCF assembler. Although PortAsm-generated symbolic debugging directives are not supported with this option set, you can use Microtec's automatic source-level debugging on the translated assembler file (assembler option -g). This provides full source-level debugging without the need for PortAsm to insert extra debugging directives in the output files. More information on the Microtec tools is available from Mentor Graphics Microtec Division. Running PortAsm under Microsoft Developer Studio (Visual C++)Developer Studio can be used to host PortAsm (and also assemblers such as Diab Data's). This provides an integrated development enviroment where you can edit files, translate them, and assemble them under the control of the Developer Studio 'make' process. The Windows hosted version of PortAsm outputs error messages in the correct format for Developer Studio, so you can double-click on the file reference in the error message, and Developer Studio will automatically open the source file at the correct line. To use PortAsm in this environment, you need to download the Windows version of PortAsm. This needs to be placed in a directory where it is in the execution path. You then run Developer Studio, and set up a new project (it's best to specify a Console Application type) in which you place your original 68K source files. You will need to specify a 'Custom Build Step' to cause Developer Studio to call PortAsm (and possibly the assembler) to handle the files. For an illustration of this, see our Developer Studio screen shot which shows an example of setting up the custom build step. The final stages of linking and downloading the assembled ColdFire files needs to be done outside Developer Studio. For example, you could run both Developer Studio and SingleStep on your development machine, and switch to SingleStep for linking, downloading and debugging. Known Bugs and Limitations in PortAsm/68K for ColdFireThese apply to Version 2.4.1
Bugs fixed and Changes in Version 2.4.1 (18th April 2001)
|
Copyright © 1996-2005 MicroAPL Ltd