Quick and Easy Code Generation for NXP Microcontrollers

Code Architect

Visit the main Embedded Systems Academy site for technical information and more related to CAN, CANopen and embedded systems!

Help

Why can't I open a seperate window containing the code?

Code Architect uses Javascript to open the window. This is the same method that many web sites use to pop up adverts. If you have a program installed on your computer that stops adverts from appearing in pop up windows, it may also stop you opened the window containing the source code.

Some of these pop up stopper programs have a way to override their functionality temporarily, for example holding down the Ctrl key while clicking on a link. Alternatively they may also allow you to temporarily disable them by clicking on their icon or opening their options.

If you have a pop up stopper program installed, check the documentation for methods to temporarily disable it. Once disabled try clicking on the link again.

What do I do after generating the code?

Once you have generated code for a module you need to save it as a plain text file so it may be added to a project. The options and methods for doing this depend on if you are using the Windows or Internet version of Code Architect and which browser you are using in the case of the Internet version. You must select the filenames to use (if applicable), add the code to your project and call it if needed. The following subsections explain each step.

Saving: Windows Version

Go to the File menu and choose Save Source Files... All source files generated by Code Architect will be saved to the folder you select. A warning will be given before overwriting existing files, unless you have selected to generate backups.
To save individual functions or parts of the code, scroll down to the code and select the section you want with the mouse. Right-click and choose Copy from the menu. Open a text editor and choose Paste.

Saving: Internet Version

Most browsers have the ability to allow selection of part of the generated code and choose Copy from a menu, either by right-clicking over the selected code or from a menu at the top of the browser window. It may then be pasted into a text editor and saved.

Filenames

In the generated code are recommendations for filenames to use in bold. You may save the code using any filenames you desire, but note that if header files are generated then you may have to alter the #include statements in the generated code. Also note that if the generated code is split up into header files and source files, it is strongly recommended that you save the code as header files and source files, as indicated, rather than one large file. Saving as one large file will likely not generate code that can compile.

Adding to Project

Once you have saved your source files you can add them to your project. Code Architect does not create projects for you so you will have to first create a project in the Toolset you are using (Keil, Raisonance, etc) if you do not already have one.

Using the code

Finally you will need to create a main function and call the generated code, if applicable. Read the header comments for the functions to find out which functions to call and how.

Some modules may generate a source file containing callback functions. These functions will be called by the generated code as needed and must be customized before using the code. Normally these callback functions are empty. The header comments for the callback function explain what must be performed inside the functions.

How do I select the Microcontroller and Peripheral I want?

The selection is arranged like a tree. First you start off with the top level where you can click on the name of the device you are using or name of the device family. You will be presented with the next set of choices. This continues until you are presented with a list of peripheral or modules. Selecting a peripheral or module displays a form where you can configure it.

At any time your current selections through the tree are shown. Each selection can be clicked on to return to that point in the tree. For example clicking on the device name will take you back to the list of peripherals for that device.

To start from the beginning again click on "Start", which is the top level of the selection tree.

Where can I get more help?

First check if your question is answered in the manual. If it isn't then support for Code Architect may be obtained from support@codearchitect.org