JTAG Connection

Why am I getting a "Cannot identify target" error message when I connect to the target?

This error message could be caused by the following:

Why am I getting a "Target not responding" error message when I connect to the target?

This error message could be caused by the following:

Why am I getting a "Cannot stop CPU" error message?

This error message could be caused by the following:

How should the JTAG connector signals nSRST and nTRST be used?

See the "Reset Signals" section in "Chapter 6, System Design Guidelines" of the Multi-ICE User Guide for a description of the correct reset circuit design.

For reliable debugging over JTAG, the JTAG connector's nSRST signal should only reset the ARM core and not the JTAG state machine / EmbeddedICE logic. If this is not the case, the debugger will be unable to reset and stop the processor without allowing the program currently in memory to execute for a period of time. This may cause unreliability because the processor and peripherals may not be in their reset state or invalid code may have been executed before a new program can be downloaded or run.

CrossStudio does not use the nTRST signal.

Program Loading

How can I check that my program has been downloaded correctly?

You can verify that your program has been downloaded after every load by enabling load verification. To do this check the Tools | Options | Target | Enable load verification option.

Alternatively, you can carry out a program verification at any time by selection the Debug | Verify menu option. This will verify that your current active project is correctly loaded onto the target.

Is it possible to reduce the time it takes to download a program?

Download speeds can be increased when using a program loader on some some targets by changing the Target | Loader File Type from Comms Channel Loader to Fast Comms Channel Loader.

The Fast Comms Channel loader option may not work or be may be unreliable on certain ARM targets, so revert to the Comms Channel Loader option if you experience any unreliability.

Memory Placement

How do I put code and data into different sections?

There are two ways to put code and data into different named sections:

  1. Use gcc's section attribute. For example, the following declaration will place the function foobar into the section named .foo section:

    void foobar(void) __attribute__ ((section(".foo")));

  2. Change a section's name for an entire module using the Section Name project properties. For example to put all code from a particular module into the section ".foo":

    • Select project element in project window.
    • Open the element's Properties window.
    • Select the Section tab.
    • Change the Code Section Name from ".text" to ".foo".

How do I place program sections at a particular position in memory?

The memory map file specified by a project's Memory Map File property is used to place sections in memory. A program section's Input Sections property is used to specify which input sections will be placed in a program section.

For example, to put the contents of the ".foo" section at a particular location in memory:

C Runtime

How do I change the stack sizes?

The ARM maintains six separate stacks. The sizes for these stacks are specified using the memory map file. Each stack has it's own section in the memory map file:

To change the size of a particular stack:

How do I change the heap size?

The size of the heap is specified using the memory map file. To change the size of the heap:

C Library

Why don't floating point numbers work with the printf and scanf functions?

In order to minimize size, versions of the printf and scanf functions without floating point support are linked by default. To enable floating point printf and scanf support, set the Floating Point I/O Supported property of your project to Yes

Projects

How do I compile or assemble THUMB code?

The Instruction Set compiler project property controls the type of code generated by both compiler and assembler, it can be set to ARM or THUMB.

The ARM/THUMB Interworking compiler project property instructs the compiler whether to produce code that supports calling between ARM and THUMB instruction sets.

How do I link a THUMB version of the standard C library?

The Library Instruction Set linker project property controls the version of the standard C library to use. If ARM is selected, the ARM version of the standard C library will be linked. If THUMB is selected, the THUMB version of the standard C library will be linked.