Application note for integration with Codewright

Introduction

This application note describes how to integrate the Codewright programmers’ editor with the Lightfoot SDK. After this integration, you will be able to edit, build, run and debug applications from within the Codewright environment.
 

Details

The Codewright editor allows you to customise the tools used for building, debugging and running applications.

You can either edit the default project properties, or edit each required projects properties.

Tools

Modify the Project->Properties for either the default settings or a specific project. Select the Tools tab and change the settings as described below.

Tool

Command

Options

Build

${LF_HOME}/bin/lfmake

No command shell, Save all files, Use VDOS

Build (Debug)

${LF_HOME}/bin/lfmake DEBUG=1

No command shell, Save all files, Use VDOS

Rebuild

${LF_HOME}/bin/lfmake clean all

No command shell, Save all files, Use VDOS

Rebuild (Debug)

${LF_HOME}/bin/lfmake DEBUG=1 clean all

No command shell, Save all files, Use VDOS

Debug

${LF_HOME}/bin/lf2debug sw %y.lfa


Execute

${LF_HOME}/bin/lfdownload –m %y.bin[1]

No command shell, Use VDOS

Errors

The Lightfoot SDK provides a DLL that can be used by Codewright to parse the errors that come from the tool chain. In order to use this, you need to add the DLL to the list of libraries that Codewright loads at startup. You then need to set either the default project properties, or the current project properties to use the error parser.

Select the menu option Customize->Libraries and add a user defined library. Select the DLL %LF_HOME%\bin\lightfoot_error_parser.dll, and close the window.

Modify the Project->Properties for either the default settings or a specific project. Select the Errors tab and add the error parser _LightfootErrorInfo. For the best results with the Lightfoot tool chain, you should also use the _ErrorInfoDefault and _JAVAErrorInfo parsers.

Example

The example in the directory provides a C file with some warnings in. Build the debug version of the application and start up the debugger to see the integration in action.
To build
    Project->Build (debug)

To run in the debugger
    Project->Debug

This has built the application and allows you to debug it, all controlled using Codewright.

[1]As executing an application can take a significant amount of time, the –m option disables the serial port. This requires another window available to open a terminal to the board. This can be done by the following command: ‘lfdownload –p <com port> -s <speed>’.