CWARMv8TM
CWARMv8TM
Contents
Chapter 1 Introduction........................................................................................... 6
1.1 Release notes............................................................................................................................6
1.2 About this Manual......................................................................................................................6
1.3 Accompanying Documentation..................................................................................................6
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 2 / 162
NXP Semiconductors
Contents
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 3 / 162
NXP Semiconductors
Contents
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 4 / 162
NXP Semiconductors
Contents
Index........................................................................................................................................161
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 5 / 162
NXP Semiconductors
Chapter 1
Introduction
This manual explains how to use the CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA product. This chapter
presents an overview of the manual.
The topics in this chapter are:
• Release Notes - Lists new features, bug fixes, and incompatibilities
• About this Manual - Describes the contents of this manual
• Accompanying Documentation - Describes supplementary CodeWarrior documentation, third-party documentation, and
references.
NOTE
The release notes for specific components of the CodeWarrior IDE are located in the ARMv8 folder in the
CodeWarrior for CW4NET installation directory.
Chapter Description
Working with Projects Lists the various project types and explains how to create projects.
ARMv8 Build Properties Explains the CodeWarrior build tools and build tool configurations.
Preparing Target Explains how to prepare for debug various target types.
Flash Programmer Explains how to configure, start, and use flash programmer
Use Cases Lists U-Boot debug, Linux application debug, and Linux kernel debug, and UEFI use cases.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 6 / 162
NXP Semiconductors
Introduction
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 7 / 162
NXP Semiconductors
Chapter 2
Working with Projects
This chapter lists the various project types and explains how to create and work with projects.
The topics in this chapter are:
• ARMv8 New Project wizard
• CodeWarrior Executable Importer wizard
• Creating projects
• Preprocess/Disassemble files
• Debugging projects
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 8 / 162
NXP Semiconductors
Working with Projects
The left panel of the wizard displays a list of available sample projects and the right side panel provides short description for each
of the stationery.
The table lists and explains the ARMv8 New Project wizard options.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 9 / 162
NXP Semiconductors
Working with Projects
Option Description
Project name Enter the name for the new project in this text box.
Note: Do not use the reserved/special characters/symbols such as < (less than), > (greater than), : (colon),
" (double quote), / (forward slash), \ (backslash), | (vertical bar or pipe), ? (question mark), @ (at), *
(asterisk) in the project name. The special characters/symbols in the project name may result in an
unexpected behavior.
Use default location Stores the files required to build the program in the current workspace directory. The project files are
stored in the default location. Clear the Use default location checkbox and click Browse to select a new
location.
Location Specifies the directory that contains the project files. Click Browse to navigate to the desired directory.
This option is available only when Use default location checkbox is clear.
Available List the various stationeries available for you to create a project. The stationeries are categorized under:
Stationeries Bareboard and Linux Application Debug.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 10 / 162
NXP Semiconductors
Working with Projects
Once the executable is selected the image type is auto-detected based on the symbol table. The user can overwrite the value
by selecting another type.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 11 / 162
NXP Semiconductors
Working with Projects
An error message is displayed and the user is not allowed to finish the project creation if the selected executable does not have
the ELF or UEFI format. The created project contains the executable image as a linked resource and also a default launch
configuration file with all the setup ready to debug.
The launch configuration file is created automatically after the project creation. User only needs to review/change the settings
and start the debug session.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 12 / 162
NXP Semiconductors
Working with Projects
NOTE
The Location text box shows the default workspace location. To change this location, uncheck the Use default
location text box and click Browse to select a new location.
4. Click Finish.
The new project appears in the Project Explorer view.
NOTE
Before you build and debug the project, ensure that the target board is ready. For details, see Preparing Target.
NOTE
The Location text box shows the default workspace location. To change this location, uncheck the Use default
location text box and click Browse to select a new location.
4. Click Finish.
The new project appears in the Project Explorer view.
NOTE
Before you build and debug the project, ensure that the target board is ready. For details, see Preparing Target.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 13 / 162
NXP Semiconductors
Working with Projects
The result of preprocessing a file or disassembling an object code is provided to the user in the Editor. Upon invocation, the
Preprocess command preprocesses the C/C++/ASM file and shows the resulting text in a new file. Similarly, upon invocation,
the Disassemble command compiles and disassembles the C/C++/ASM file or directly disassembles the binary file. In all the
cases, the resulted files are located in the active configuration directory.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 14 / 162
NXP Semiconductors
Working with Projects
NOTE
A new Console is created for each operation.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 15 / 162
NXP Semiconductors
Working with Projects
The user can define or modify preprocessor/disassembler options in the Project Properties dialog > Settings > Tool Settings page.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 16 / 162
NXP Semiconductors
Working with Projects
1. From the CodeWarrior IDE menu bar, select Run > Debug Configurations.
The Debug Configurations dialog appears. The left side of this dialog box has a list of debug configurations that apply to
the current application.
The ARMv8 Project wizard adds a default launch configuration in all application sample projects. The debugger settings are
mapped to the default values but you can change these values based on your requirements.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 17 / 162
NXP Semiconductors
Working with Projects
NOTE
To end the debug session, use the Terminate or Disconnect buttons in the Debug view (or from the Run menu).
When using Terminate to end a debug session, debugger detaches from the cores that were debugged and keeps
them in debug mode.
On the other hand, the Disconnect button resumes in-debug cores before the debugger detaches from the target.
NOTE
If target is accessible on a port different than the default 22, like in the case of the ssh tunnelling to other port, the
tunnelling port should be specified instead.
NOTE
For further details, refer Linux application debug.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 18 / 162
NXP Semiconductors
Working with Projects
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 19 / 162
NXP Semiconductors
Chapter 3
ARMv8 Build Properties
A build configuration is a named collection of build tools options.
The set of options in a given build configuration causes the build tools to generate a final binary with specific characteristics. For
example, the binary produced by a "Debug" build configuration might contain symbolic debugging information and have no
optimizations, while the binary product by a "Release" build configuration might contain no symbolics and be highly optimized.
For details about how ARMv8 projects are managed and all the available toolchains, refer Arm GNU Eclipse documentation
available at: https://community.arm.com/tools/b/blog/posts/gnu-arm-eclipse-open-source-tools-with-experimental-cmsis-pack-
support
NOTE
NXP does not own Arm GNU Eclipse documentation. The documents are mentioned solely for the reference
purpose.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 20 / 162
NXP Semiconductors
ARMv8 Build Properties
The following table lists the build properties specific to developing software for Arm Embedded Processors.
The properties that you specify in the Tool Settings panels apply to the selected build tool on the Tool Settings page of the
Properties for <project> dialog box.
Optimization Optimization
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 21 / 162
NXP Semiconductors
ARMv8 Build Properties
Warnings Warnings
Debugging Debugging
Includes
Warnings
Miscellaneous
Includes
Optimization
Warnings
Miscellaneous
Libraries
Miscellaneous
Option Description
Architecture Use to specify the target hardware architecture or processor name. The compiler can
take advantage of the extra instructions that the selected architecture provides and
optimize the code to run on a specific processor. The inline assembler might display
error messages or warnings if it assembles some processor-specific instructions for the
wrong target architecture.
Default: Toolchain default
Instruction set Use to generate suitable interworking veneers when it links the assembler output. You
must enable this option if you write Arm code that you want to interwork with Thumb
code or vice versa. The only functions that need to be compiled for interworking are the
functions that are called from the other state. You must ensure that your code uses the
correct interworking return instructions.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 22 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Thumb interwork (-mthumb- Check to have the processor generate Thumb code instructions. Clear to prevent the
interwork) processor from generating Thumb code instructions. The IDE enables this setting only
for architectures and processors that support the Thumb instruction set.
Default: Clear
Endianness Use to specify the byte order of the target hardware architecture:
• Little-little endian; right-most bytes (those with a higher address) are most significant
Float ABI Use to specify the float Application Binary Interface (ABI).
Default: Toolchain default
FPU Type Use to specify the type of floating-point unit (FPU) for the target hardware architecture:
The assembler might display error messages or warnings if the selected FPU
architecture is not compatible with the target architecture.
Default: Toolchain default
Code model Specifies the addressing mode that the linker uses when resolving references. This
setting is equivalent to specifying the -mcmodel keyword command-line option.
• Tiny (-mcmdel=tiny)
• Small (-mcmodel=small)
• Large (-mcmodel=large)
• Toolchain default
Strict align (-mstrict-align) Controls the use of non-standard ISO/IEC 9899-1990 ("C90") language features.
Other target flags Specify additional command line options; type in custom flags that are not otherwise
available in the UI.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 23 / 162
NXP Semiconductors
ARMv8 Build Properties
3.2.2 Optimization
Use this panel to configure the optimization options.
The following table lists the options in the Optimization panel.
Option Description
Optimization level Specify the optimizations that you want the compiler to apply to the generated object
code:
• None (-O0)-Disable optimizations. This setting is equivalent to specifying the -O0
command-line option. The compiler generates unoptimized, linear assembly-
language code.
• Optimize (-O1)-The compiler performs all target-independent (that is, non-
parallelized) optimizations, such as function inlining. This setting is equivalent to
specifying the -O1 command-line option. The compiler omits all target-specific
optimizations and generates linear assembly-language code.
• Optimize more (-O2)-The compiler performs all optimizations (both target-
independent and target-specific). This setting is equivalent to specifying the -O2
command-line option. The compiler outputs optimized, non-linear, parallelized
assembly-language code.
• Optimize most (-O3)-The compiler performs all the level 2 optimizations, then the
low-level optimizer performs global-algorithm register allocation. This setting is
equivalent to specifying the that is usually faster than the code generated from level
2 optimizations.
• Optimize size (-Os)-The compiler optimizes object code at the specified
Optimization Level such that the resulting binary file has a smaller executable code
size, as opposed to a faster execution speed. This setting is equivalent to specifying
the -Os command-line option.
• Optimize for debugging (-Og)-The compiler optimizes object code at the specified
Optimization Level such that the resulting binary file has a faster execution speed,
as opposed to a smaller executable code size.
Message length (-fmessage- Check if you want to specify the maximum length in bytes for the message.
length=0)
'char' is signed (-fsigned-char) Check to treat char declarations as signed char declarations.
Assume freestanding environment (- Asserts that compilation takes place in a freestanding environment. This implies -fno-
ffeestanding) builtin.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 24 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Position independent code (-fPIC) Select to instruct the build tools to generate position independent-code.
Link-time optimizer (-flto) Runs the standard link-time optimizer. When invoked with source code, it generates
GIMPLE (one of GCC's internal representations) and writes it to special ELF sections in
the object file. When the object files are linked together, all the functions bodies are read
from these ELF sections and instantiated as if they had been part of the same translation
unit.
Disable loop invariant move (-fno- Disables the loop invariant motion pass in the RTL loop optimizer. Enabled at level '-O1'.
move-loop-invariants)
Other optimization flags Specify additional command line options; type in custom optimization flags that are not
otherwise available in the UI.
3.2.3 Warnings
Use this panel to configure the warning options.
The following table lists the options in the Warnings panel.
Option Description
Check syntax only (-fsyntax-only) Check this option if you want to check the syntax of commands and throw a syntax error.
Pedantic (-pedantic) Check if you want warnings like -pedantic, except that errors are produced rather than
warnings.
Pedantic warnings as errors (- Check this option if you want to inhibit the display of warning messages.
pedantic-errors)
Inhibit all warnings (-w) Check this option if you want to enable all the warnings about constructions that some
users consider questionable, and that are easy to avoid (or modify to prevent the warning),
even in conjunction with macros.
Warn on various unused elements (- Warn whenever some element (label, parameter, function, etc.) is unused.
Wunused)
Warn on uninitialized variables (- Warn whenever an automatic variable is used without first being initialized.
Wuninitialised)
Enable all common warnings (-Wall) Check this option if you want to enable all the warnings about constructions that some
users consider questionable, and that are easy to avoid (or modify to prevent the warning),
even in conjunction with macros.
Enable extra warnings (-Wextra) Check this option to enable any extra warnings.
Warn on undeclared global function Check to warn if an undeclared global function is encountered.
(-Wmissing-declaration)
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 25 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Warn if padding is not included (- Check to warn if padding is included in a structure either to align an element of the
Wpadded) structure or the whole structure.
Warn if suspicious logical ops (- Check to warn in case of suspicious logical operation.
Wlogical-op)
Warn if floats are compared as equal Check to warn if floats are compared as equal.
(-Wfloat-equal)
Other warning flags Specify additional command line options; type in custom warning flags that are not
otherwise available in the UI.
3.2.4 Debugging
Use this panel to configure the debugging options.
The following table lists the options in the Debugging panel.
Option Description
Generate prof information (-p) Generates extra code to write profile information suitable for the analysis program prof.
You must use this option when compiling the source files you want data about, and you
must also use it when linking.
Generate gprof information (-pg) Generates extra code to write profile information suitable for the analysis program gprof.
You must use this option when compiling the source files you want data about, and you
must also use it when linking.
Other debugging flags Specify additional command line options; type in custom debugging flags that are not
otherwise available in the UI.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 26 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Command Shows the location of the assembler executable file. Default: ${cross_prefix}${cross_c}$
{cross_suffix}
All Options Shows the actual command line the assembler will be called with. Default: -x assembler-with-
cpp -Xassembler -g
Expert settings
Command line pattern Shows the expert settings command line parameters. Default: ${COMMAND} $
{cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} $
{INPUTS}
3.2.5.1 Preprocessor
Use this panel to configure the Arm GNU assembler preprocessor options.
The following table lists the options in the Cross Arm GNU Assembler Preprocessor panel.
Option Description
Use preprocessor Check this option to use the preprocessor for the assembler.
Do not search system directories Check this option if you do not want the assembler to search the system directories. By
(-nostdinc) default, this checkbox is clear. The assembler performs a full search that includes the system
directories.
Preprocess only (-E) Check this option if you want the assembler to preprocess source files and not to run the
compiler. By default, this checkbox is clear and the source files are not preprocessed.
Defined symbols (-D) Use this option to specify the substitution strings that the assembler applies to all the
assembly-language modules in the build target. Enter just the string portion of a substitution
string. The IDE prepends the -D token to each string that you enter. For example, entering
opt1 x produces this result on the command line: -Dopt1 x. Note: This option is similar to the
DEFINE directive, but applies to all assembly-language modules in a build target.
Undefined symbols (-U) Undefines the substitution strings you specify in this panel.
3.2.5.2 Includes
Use this panel to configure the Arm GNU assembler includes options.
The following table lists the options in the Cross Arm GNU Assembler Includes panel.
Option Description
Include paths (-l) This option changes the build target's search order of access paths to start with the system paths list. The
compiler can search #include files in several different ways. You can also set the search order as follows:
For include statements of the form #include"xyz", the compiler first searches user paths, then the system
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 27 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
paths For include statements of the form #include<xyz>, the compiler searches only system paths This
option is global.
Include files (- Use this option to specify the include file search path.
include)
3.2.5.3 Warnings
Use this panel to configure the Arm GNU assembler warning options.
The following table lists the options in the Cross Arm GNU Assembler Warnings panel.
Option Description
Other warning flags Specify additional command line options; type in custom warning flags that are not
otherwise available in the UI.
3.2.5.4 Miscellaneous
Use this panel to configure the Arm GNU assembler miscellaneous options.
The following table lists the options in the Cross Arm GNU Assembler Miscellaneous panel.
Option Description
Assembler flags Specify the flags that need to be passed with the assembler.
Generates Enables the assembler to create a listing file as it compiles assembly language into object code.
assembler listing (-
Wa, -
adhlns="$@.lst")
Save temporary files Store the usual “temporary” intermediate files permanently.
(--save-temps Use
with caution!)
Verbose (-v) Check this option if you want the IDE to show each command-line that it passes to the shell, along with
all progress, error, warning, and informational messages that the tools emit. This setting is equivalent
to specifying the -v command-line option. By default this checkbox is clear. The IDE displays just error
messages that the compiler emits. The IDE suppresses warning and informational messages.
Other assembler Specify additional command line options; type in custom flags that are not otherwise available in the UI.
flags
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 28 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Command Shows the location of the compiler executable file. Default: ${cross_prefix}${cross_c}$
{cross_suffix}
All Options Shows the actual command line the compiler will be called with.
Expert settings
Command line patterns Shows the expert settings command line parameters. Default: ${COMMAND} $
{cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} $
{INPUTS}
3.2.6.1 Preprocessor
Use this panel to configure the Arm C compiler preprocessor options.
The following table lists the options in the Cross Arm C Compiler Preprocessor panel.
Option Description
Do not search system directories Check this option if you do not want the compiler to search the system directories. By default,
(-nostdinc) this checkbox is clear. The compiler performs a full search that includes the system
directories.
Preprocess only (-E) Check this option if you want the compiler to preprocess source files and not to run the
compiler. By default, this checkbox is clear and the source files are not preprocessed.
Defined symbols (-D) Use this option to specify the substitution strings that the compiler applies modules in the
build target. Enter just the string portion of a substitution string. The IDE prepends the -D
token to each string that you enter. For example, entering opt1 x produces this result on the
command line: -Dopt1 x. Note: This option is similar to the DEFINE directive, but applies to
all assembly-language modules in a build target.
Undefined symbols (-U) Undefines the substitution strings you specify in this panel.
3.2.6.2 Includes
Use this panel to configure the Arm C compiler includes options.
The following table lists the options in the Cross Arm C Compiler Includes panel.
Option Description
Include paths (-l) This option changes the build target's search order of access paths to start with the system paths list. The
compiler can search #include files in several different ways. You can also set the search order as follows:
For include statements of the form #include"xyz", the compiler first searches user paths, then the system
paths For include statements of the form #include<xyz>, the compiler searches only system paths This
option is global.
Include files (- Use this option to specify the include file search path.
include)
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 29 / 162
NXP Semiconductors
ARMv8 Build Properties
3.2.6.3 Optimization
Use this panel to configure the Arm C compiler optimization options.
The following table lists the options in the Optimization panel.
Option Description
Language standard Select the programming language or standard to which the compiler should conform.
• ISO C90 (-ansi) - Select this option to compile code written in ANSI standard C. The
compiler does not enforce strict standards. For example, your code can contain
some minor extensions, such as C++ style comments (//), and $ characters in
identifiers.
• ISO C99 (-std=c99) - Select this option to instruct the compiler to enforce stricter
adherence to the ANSI/ISO standard.
• Compiler Default (ISO C90 with GNU extensions) - Select this option to enforce
adherence to ISO C90 with GNU extensions.
• ISO C99 with GNU Extensions (-std=gnu99)
Other optimization flags Specify additional command line options; type in custom optimization flags that are not
otherwise available in the UI.
3.2.6.4 Warnings
Use this panel to configure the Arm C compiler warnings options.
The following table lists the options in the Warnings panel.
Option Description
Warn if a function has no arg type (- Warn if a function is declared or defined without specifying the argument types.
Wstrict-prototypes)
Warn if a wrong cast (-Wbad- Warn whenever a function call is cast to a non-matching type.
function-cast)
Other warning flags Specify additional command line options; type in custom warning flags that are not
otherwise available in the UI.
3.2.6.5 Miscellaneous
Use this panel to configure the Arm C compiler miscellaneous options.
The following table lists the options in the Miscellaneous panel.
Option Description
Generates Enables the assembler to create a listing file as it compiles assembly language into object code.
assembler listing (-
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 30 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Wa, -
adhlns="$@.lst")
Save temporary files Store the usual “temporary” intermediate files permanently.
(--save-temps Use
with caution!)
Verbose (-v) Check this option if you want the IDE to show each command-line that it passes to the shell, along with
all progress, error, warning, and informational messages that the tools emit. This setting is equivalent
to specifying the -v command-line option. By default this checkbox is clear. The IDE displays just error
messages that the compiler emits. The IDE suppresses warning and informational messages.
Other compiler flags Specify additional command line options; type in custom flags that are not otherwise available in the UI.
Option Description
Command Shows the location of the linker executable file. Default: ${cross_prefix}${cross_c}$
{cross_suffix}
All Options Shows the actual command line the assembler will be called with. Default: -T "${ProjDirPath}"/
Linker_Files/aarch64elf.x -nostartfiles -nodefaultlibs -L"C:\Users
\b14174\workspace-15\FirstProjectTest" -Wl,-Map,"FirstProjectTest.map"
Expert settings
Command line patterns Shows the expert settings command line parameters. Default: ${COMMAND} $
{cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} $
{INPUTS}
3.2.7.1 General
Use this panel to configure the Arm C linker general options.
The following table lists the options in the General panel.
Option Description
Script files (-T) This option passes the -T argument to the linker file
Do not use standard start files (- This option passes the -nostartfiles argument to the linker file. It does not allow the use of the
nostartfiles) standard start files.
Do not use default libraries (- This option passes the -nodefaultlibs argument to the linker file. It does not allow the use of
nodefaultlibs) the default libraries.
No startup or default libs (- This option passes the -nostdlib argument to the linker file. It does not allow the use of startup
nostdlib) or default libs.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 31 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Remove unused sections (- This option passes the -Xlinker --gc-sections argument to the linker file. It removes the unused
Xlinker --gc-sections) sections.
Print removed sections (- This option passes the -Xlinker --print-gc-sections argument to the linker file. It prints the
Xlinker --print-gc-sections) removed sections.
Omit all symbol information (-s) This option passes the -s argument to the linker file. This option omits all symbol information.
3.2.7.2 Libraries
Use this panel to configure the Arm C linker libraries options.
The following table lists the options in the Libraries panel.
Option Description
Libraries (-l) This option changes the build target's search order of access paths to start with the system paths list. The
compiler can search #include files in several different ways. You can also set the search order as follows:
For include statements of the form #include"xyz", the compiler first searches user paths, then the system
paths. For include statements of the form #include<xyz>, the compiler searches only system paths. This
option is global.
Library search path Use this option to specify the include library search path.
(-L)
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 32 / 162
NXP Semiconductors
ARMv8 Build Properties
3.2.7.3 Miscellaneous
Use this panel to configure the Arm C linker miscellaneous options.
The following table lists the options in the Miscellaneous panel.
Option Description
Linker flags This option specifies the flags to be passed with the linker file.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 33 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Other objects This option lists paths that the VSPA linker searches for objects. The linker searches
the paths in the order shown in this list.
Generate Map This option specifies the map filename. Default: $ {BuildArtifactFileBaseName}.map
Cross Reference Check this option to instruct the linker to list cross-reference information on symbols.
(-Xlinker --cref) This includes where the symbols were defined and where they were used, both inside
and outside macros.
Print link map (- Check this option to instruct the linker to print the map file.
Xlinker --printf-
map)
Use newlib-nano Check this option to select a version of Newlib focused on code size. Newlib-Nano can
(-- help to reduce the size of your application compared to using the standard version of
specs=nano.spe Newlib for both C and C++ projects.
cs)
Use float with Check this option to handle floating-point value using nano Newlib-Nano printf. By
nano printf (- default, Newlib-Nano uses non-floating point variants of the printf and scanf family of
u_printf_float) functions, to reduce the size if only integer values are used by such functions.
Use float with Check this option to handle floating-point value using nano Newlib-Nano scanf. By
nano scanf (- default, Newlib-Nano uses non-floating point variants of the printf and scanf family of
u_scanf_float) functions, to reduce the size if only integer values are used by such functions.
Verbose (-v) Check this option to show verbose information, including hex dump of program
segments in applications; default setting
Other linker flags Specify additional command line options for the linker; type in custom flags that are not
otherwise available in the UI.
Option Description
All Options Shows the actual command line the assembler will be called with. Default:
"FirstProjectTest.elf" -O ihex
Expert settings
Command line patterns Shows the expert settings command line parameters. Default: ${COMMAND} ${FLAGS} $
{OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
3.2.8.1 General
Use this panel to configure the Cross Arm GNU create flash image general options.
The following table lists the options in the General panel.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 34 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Other flags Specify additional command line options; type in custom flags that are not otherwise available
in the UI.
Option Description
All Options Shows the actual command line the assembler will be called with. Default:
"FirstProjectTest.elf" --source --all-headers --demangle --line-numbers --wide
Expert settings
Command line patterns Shows the expert settings command line parameters. Default: ${COMMAND} ${FLAGS} $
{OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
3.2.9.1 General
Use this panel to configure the Cross Arm GNU create listing general options.
The following table lists the options in the General panel.
Option Description
Display all headers Check to display headers in the listing file; disassembler writes listing headers, titles, and
subtitles to the listing file
Disassemble Check to disassembles all section content and sends the output to a file. This command is
global and case-sensitive.
Display file headers Check to display the contents of the overall file header.
Display relocation info Check to displays the relocation entries in the file.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 35 / 162
NXP Semiconductors
ARMv8 Build Properties
Option Description
Other flags Specify additional command line options for the linker; type in custom flags that are not
otherwise available in the UI.
Option Description
All Options Shows the actual command line the assembler will be called with. Default: --format=berkeley
"FirstProjectTest.elf"
Expert settings
Command line patterns Shows the expert settings command line parameters. Default: ${COMMAND} ${INPUTS} ${FLAGS}}
3.2.10.1 General
Use this panel to configure the Cross Arm GNU print size options.
The following table lists the options in the General panel.
Option Description
Other flags Specify additional command line options for the linker; type in custom flags that are not
otherwise available in the UI.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 36 / 162
NXP Semiconductors
Chapter 4
Preparing Target
This chapter describes how to prepare for debugging various target types:
• Preparing hardware targets
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 37 / 162
NXP Semiconductors
Chapter 5
Configuring Target
The Target Connection Configuration (TCC) feature lets you configure the probe and the target hardware.
TCC eases out the configuration process due to the auto- discovery capabilities and live validation of the configuration. TCC lets
you use one configuration for multiple projects by setting it as the active configuration (configure once debug all projects), but if
more than one configuration is required, you can add as many configuration as necessary. TCC can be used as an RCP
application for eclipse allowing the user to benefit from the full capabilities either way.
This chapter lists:
• Target Connection configurator overview
• Configuration types
• Operations with configurations
• Configure the target configuration using Target Connection Configurator
• Target Connection editor
• Generating GDB script from a configuration
• Debugger server connection
• Logging Configuration
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 38 / 162
NXP Semiconductors
Configuring Target
Target Connections view has the capability to filter the existing configurations. You can filter the list of existing configuration based
on board name, device name, or connection details.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 39 / 162
NXP Semiconductors
Configuring Target
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 40 / 162
NXP Semiconductors
Configuring Target
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 41 / 162
NXP Semiconductors
Configuring Target
Option Description
Inspect Inspect a board without an elf to debug. It attaches to a board without reset, image, or
symbols and doesn’t run the target initialization file. Inspect command is enabled when
a selection exists.
Connect Connect to a board without an elf to debug. The connect operation is done with reset
and running the target initialization file. The connect command is enabled when a
selection exists.
Flash Programmer Start the Flash Programmer UI. Using this button, a new debug session similar to a
Connect will be started in the background in order to allow programming of the available
flash devices on a board. An existing connection can also be reused.
Diagnose Connection Use it to perform diagnostics on a selected target connection. When a connection is
being diagnosed, a new Connection Diagnostics view will appear, depicting all the tests
that are being executed.
Duplicate Use to duplicate an existing configuration. You can edit the duplicated configuration.
Remove Use to remove an existing configuration. Select the configuration you want to delete,
and click Remove.
Export Use to export a configuration to the workspace. Select the configuration you want to
export. Click Export. Select the location in the workspace where you want to export the
configuration and click OK to finish.
Import Use to import a configuration from the workspace. Select the configuration you want to
import to the internal configuration folder. Click Import.
Set Active configuration Check the checkbox next to the configuration to set it as Active Configuration.
View details about a configuration TCC panel lets you determine whether a configuration is pre-defined or user-defined by
using different color icons; Orange for pre-defined and Green for user-defined. Also, if
a configuration is not complete and cannot be used for debug, TCC panel marks it as
(Incomplete).
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 42 / 162
NXP Semiconductors
Configuring Target
The available probes depend on the selected processor. For example, since there is CMSIS DAP support for LS1012RDB,
CMSIS DAP probe is supported additional to CWTAP. In case you select CWTAP, you could use probe discovery capability.
NOTE
In this release, the list of detected CWTAPs also includes the probes connected to other processors in addition to
the one selected.
a. Click the Search for HW probes button to automatically discover the probes connected to the local machine or
network for SoCs that support CWTAP .
NOTE
CMSIS is a vendor-independent hardware abstraction layer provided by Arm. CMSIS Debug Access Port (CMSIS-
DAP) is a standardized firmware for a debug unit that connects to the CoreSight Debug Access port.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 43 / 162
NXP Semiconductors
Configuring Target
b. When the user selects one of the discovered probes, the target configuration will use the selected CWTAP and the
selected probe attributes will be updated accordingly.
3. Select Preserve Probe Configuration to make all CWTAP configurations disappear. In this case, you will have to specify
only CCS server used to access the CWTAP.
4. Check the Use Target Init checkbox to load/edit the gdb file and launch the target init GDB script.
5. You can load/save and edit the gdb script in the Target Init File tab page.
The script is loaded by GDB and it is run automatically before launching a debug session. Initialization script is embedded
in the TCC configuration.
6. Click Apply to save and set the new target connection as an active configuration. To set an active configuration, select
the check box corresponding to the target connection to be set as active configuration. The active configuration acts as
source for the target connection data necessary to start a debug session.
NOTE
In the Target Connection view, the active configuration name is displayed in bold.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 44 / 162
NXP Semiconductors
Configuring Target
• README – readme information (it’s read only for predefined configurations and writeable for user-defined configurations)
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 45 / 162
NXP Semiconductors
Configuring Target
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 46 / 162
NXP Semiconductors
Configuring Target
— Connect to: User can specify the server address and IP of an already running debug server.
In the CodeWarrior Connection Server section the user can specify the connection server parameters.
• CodeWarrior Connection Server
— Start Local Server: GTA starts and configures the connection server.
— Connect to: The connection server is already started/configured and the GTA can use it.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 47 / 162
NXP Semiconductors
Configuring Target
The INFO level for logging adds more information to the output, for example register IDs, memory addresses, memory spaces.
But it does not output the contents for register values, memory, and JTAG chain expansion (for get_config_chain() command).
For details about monitor log commands, refer Logging.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 48 / 162
NXP Semiconductors
Chapter 6
FSL Debugger References
This chapter explains how to customize debug configurations.
This chapter lists:
• Customizing debug configuration
• Registers features
• OS awareness
• Launch a hardware GDB debug session where no configuration is available
• Memory tools GDB extensions
• Connection tools GDB extensions
• Miscellaneous tools GDB extensions
• Monitor commands
• I/O support
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 49 / 162
NXP Semiconductors
FSL Debugger References
NOTE
The CodeWarrior debugger shares some pages, such as Connection and Download. The settings that you specify
in these pages also apply to the selected debugger.
The IDE restores the last set of saved settings to all pages of the Debug Configurations dialog. The Revert button appears
disabled until you make new pending changes.
4. A debug configuration can be saved within the project by setting its location relative to the project loaded in the current
workspace. For this, click the Common tab, and in the Shared file option, select a project directory where you want to save
the debug configuration. Now, you can import the project into another workspace without loosing the debug configuration
file.
5. Click the Close button to close the Debug Configurations dialog.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 50 / 162
NXP Semiconductors
FSL Debugger References
• Debugger
• Startup
• Source
• OS Awareness
• Other Symbols
• Common
• Trace and Profile
6.1.1 Main
Use this page to specify the project and the application you want to run or debug.
Option Description
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 51 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Variables Click to open the Select build variable dialog box and select the build variables to be associated
with the program. Note: The dialog box displays an aggregation of multiple variable databases
and not all these variables are suitable to be used from a build environment.
Search Project Click to open the Program Selection dialog box and select a binary.
Project Specifies the project to associate with the selected debug launch configuration. Click Browse to
select a different project.
Build (if required) before Controls how auto build is configured for the launch configuration. Changing this setting
launching overrides the global workspace setting and can provide some speed improvements. NOTE:
These options are set to default and collapsed when Connect debug session type is selected.
Build configuration Specifies the build configuration either explicitly or use the current active configuration.
Select configuration using Select/clear to enable/disable automatic selection of the configuration to be built, based on the
‘C/C++ Application’ path to the program.
Enable auto build Enables auto build for the debug configuration which can slow down launch performance.
Disable auto build Disables auto build for the debug configuration which may improve launch performance. No build
action will be performed before starting the debug session. You have to rebuild the project
manually.
Configure Workspace Opens the Launching preference panel where you can change the workspace settings. It will
Settings affect all projects that do not have project specific settings.
6.1.2 Debugger
Use this page to select a debugger to use when debugging an application.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 52 / 162
NXP Semiconductors
FSL Debugger References
Option Description
GDB Setup
Verify memory If selected, download validation is performed after binary is downloaded to target. The console
download displays the validation result in an output similar to the one presented below.
Section .note.gnu.build-id, range 0x400000 -- 0x400024: matched.
If checkbox is deselected, validation is not performed and the above output is not displayed.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 53 / 162
NXP Semiconductors
FSL Debugger References
Option Description
In GDB command line, a user can execute the compare-sections command after the executable
is loaded to target (using the load command), and same output will be displayed. A typical GDB
session with download validation is presented in the example below.
Use launch specific Select to specify the target connection configuration in this launch. This will override the configuration
connection specified globally in Window->Preferences dialog.
Configuration Enabled when Use launch specific connection is checked. Use to select the required configuration.
Use all cores Select if your application uses all cores (SMP).
Synchronize with When activated, all breakpoints set from the GDB console are synchronized with the CodeWarrior UI.
breakpoints set in
GDB console Breakpoints created in the GDB console appear in the Breakpoints view and preserved from the
current Debug session to the next.
Force thread list Click if you want to force thread list update on suspend.
update on suspend
NOTE
When trying read I/O operations (scanf, fget etc.) using semihosting, you have to check Use separate console for
target output and input, otherwise, if you check the other option from Application Console, Use GDB console for
target output, the read I/O operations will be unreliable.
6.1.3 Startup
Use this page to specify the startup options and values to use when an application runs.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 54 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Reset and Delay Select to reset the target at startup and delay the initialization for the specified amount of seconds
(seconds)
Load image Select to specify that an image should be loaded to the target
Use project binary Select to load the binary of the current project
File System Click to select a file to load from the file system
Image offset (hex) Specify the offset on the target from where to load the image
Load symbols Select to specify that symbols should be loaded in the debugger
Use project binary Select to load symbols from the binary of the current project
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 55 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Workspace Click to select a file with symbols to load from the workspace
File System Click to select a file with symbols to load from the file system
Run commands Specify commands to be run in the debugger after loading image / symbols
6.1.4 Source
Use this page to specify the location of source files used when debugging a C or C++ application.
By default, this information is taken from the build path of your project.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 56 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Source Lookup Path Lists the source paths used to load an image after connecting
the debugger to the target.
Add Click to add new source containers to the Source Lookup Path
search list.
Remove Click to remove selected items from the Source Lookup Path
list.
Down Click to move selected items down the Source Lookup Path list.
Search for duplicate source files on the path Select to search for files with the same name on a selected
path.
6.1.5 OS Awareness
Use this page to specify whether the OS Awareness should be enabled.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 57 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Enable OS Awareness Select to enable OS Awareness (and activate the other tab
options).
Use CodeWarrior script for Linux Kernel Awareness Select to enable OS Awareness for Linux Kernel using
CodeWarrior specific script.
Use CodeWarrior script for U-boot Awareness Select to enable OS Awareness for U-boot using CodeWarrior
specific script.
Use CodeWarrior script for UEFI Awareness Select to enable OS Awareness for UEFI using CodeWarrior
specific script.
Add SPL U-Boot ELF Select to specify an SPL U-Boot ELF in order to debug an SPL-
based U-Boot (e.g. NAND/SD type). By using this option,
debugger automatically activates all the required processing
needed to debug the SPL part followed by the main/DDR U-Boot
elf debug.
File System Click to select a custom script from the file system.
Suspend target when module insert or removal is detected Select to suspend target when module insert or removal is
detected.
Automatically load configured symbolic file at module init Select to automatically load symbolic files.
detection
Auto-load module symbolics files list Lists automatically loaded symbolic files.
UEFI root layout Select the Build folder inside the local path to the UEFI root
layout
Add symbols for EFI images loaded at runtime Select to automatically add symbols at attach for EFI images
loaded at runtime
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 58 / 162
NXP Semiconductors
FSL Debugger References
The symbol table information is read by using the add-symbols command; this command is similar to the GDB add-symbol-file
command. However, unlike the add-symbol-file command, the add-symbols doesn't require the user to provide the load
address for the file. The symbols from the elf file are loaded using the compile-time addresses for all loadable sections in case
this address is not given as a parameter.
If an address is given as a parameter, then the add-symbols command loads symbols for all loadable sections based on the
specified memory load address. Similar to the GDB command add-symbol-file, the add-symbols may load symbols for only
specific sections at the given load addresses. In order to add symbols from more than one elf file, you only need to add a new
Load Symbols group specifying the new elf file and the load options. To remove an elf file, press the Remove button
corresponding to the Load Symbols group you want to eliminate.
Option Description
Load Symbols Choose the elf ffile you want to use from either the file system or the
workspace.
Use addresses from file Select to load the symbols from the elf file using compile-time addresses
for all loadable sections.
Use load address (hex) Select to load symbols for all loadable sections based on the specified
memory load address. The input from the user is a hex address, without
the 0x prefix and it represents the load address in target memory (address
of first loadable section).
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 59 / 162
NXP Semiconductors
FSL Debugger References
Use custom sections load address Select to load symbols for explicitly provided sections at the specified load
addresses. Here the user must specify the section and the load address.
Example: -s .text 0x80000000
6.1.7 Common
Use this page to specify the location to store your run configuration, standard input and output, and background launch
options.
The following table lists and explains the Common tab options.
Option Description
Save as
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 60 / 162
NXP Semiconductors
FSL Debugger References
Option Description
Shared file Select to specifies the path of, or browse to, a workspace to
store the launch configuration file, and be able to commit it to
a repository.
Display in favorites menu Check to add the configuration name to Run or Debug menus
for easy selection.
Allocate Console (necessary for input) Select to assign a console view to receive the output.
Browse Workspace Specifies the path of, or browse to, a workspace to store the
output file.
Browse File System Specifies the path of, or browse to, a file system directory to
store the output file.
Act as Server Select to redirect the output from the current process to a local
server socket bound to the specified port.
Hostname/IP Address Select to redirect the output from the current process to a server
socket located on the specified host and bound to the specified
port. The debugger will connect and write to this server socket
via a client socket created on an ephemeral port
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 61 / 162
NXP Semiconductors
FSL Debugger References
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 62 / 162
NXP Semiconductors
FSL Debugger References
The view is automatically opened when a debug session is started and it is populated with registers when the target is first
suspended at program entry point. The view can also be opened manually from the menu: Window > ShowView> Other >
Peripherals or by using the shortcut: Alt+Shift+Q, R.
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 63 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 64 / 162
NXP Semiconductors
FSL Debugger References
Name Address
name REG_GROUP[.REG_NAME[.BIT_FIELD]]
Name Address
-s SELECT, --select SELECT specify what information will be printed; possible values: a - access,
b - bit range, d - description, l - location, r - reset value, v - value
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 65 / 162
NXP Semiconductors
FSL Debugger References
Name Address
<ALL | GROUP_NAME1,GROUP_NAME2...> What to export. All register groups (IP blocks) or a subset of them.
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 66 / 162
NXP Semiconductors
FSL Debugger References
6.3 OS awareness
OS awareness support in the CodeWarrior software is a group of features that simplify and improve the user experience while
debugging the OS-specific projects.
The OS awareness features are enabled from the OS Awareness tab in the Debug Configurations dialog.
Currently, predefined support exists for the following types of OS Awareness: Linux Kernel, U-boot, and UEFI. When importing
an executable image for a Linux kernel, U-Boot, or UEFI project using the CodeWarrior Executable Importer wizard, the image
type is auto-detected and the configuration of the options in the OS Awareness tab is done automatically. The user can manually
change the options in the OS Awareness tab at any time. Advanced users can also use custom scripts to add the OS awareness
support for their specific projects.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 67 / 162
NXP Semiconductors
FSL Debugger References
(gdb) ka-show-info
Build Time = #7 Mon Mar 31 11:44:09 EEST 2014
Linux Version = 3.12.0+
(gdb) ka-show-thread-list
• - ka-reset: Resets the board when an OS Awareness is enabled (Linux Kernel, U-Boot, or UEFI)
(gdb) ka-reset
Name Address
krng 0xffffffbffc010000
rng 0xffffffbffc00c000
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 68 / 162
NXP Semiconductors
FSL Debugger References
• ka-module-load:
Description: Loads symbolics file for a kernel module.
The commands has the following parameters:
— (required) the kernel module symbolics file
— (optional) the module name, necessary when the symbolics file name and the kernel module name are different
Example:
• ka-module-unload:
Description: Unloads symbolics file for a kernel module.
The commands has one required parameter: the module name
Example:
• ka-module-files:
Description: Shows the loaded symbolics file for a kernel modules.
The command has an optional argument (integer > 0) representing the maximum number of files
Example:
(gdb) ka-module-files
Name Loaded file
rng /data/ARM_DEVEL/linux/ls2-linux/crypto/rng.o
krng /data/ARM_DEVEL/linux/ls2-linux/crypto/krng.o
• ka-module-config-suspend:
Description: Configures module detect suspend action:
The command has one optional argument (boolean):
— True: suspend target when module insert/removal is detected
— False: do not suspend target when module insert/removal is detected
If no parameter is passed, the command returns the configuration value
Example:
• ka-module-config-auto-load:
Description: Configures module detect auto-load action:
The command has one optional argument (boolean):
— True: automatically load configured symbolic files at module init detection
— False: no not automatically load module symbolics at module init detection
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 69 / 162
NXP Semiconductors
FSL Debugger References
• ka-module-config-map-load:
Description: Adds the module symbolics file in the module configuration map.
If the auto-load is enabled, this symbolics file is automatically loaded when the corresponding module is inserted.
The commands has the following parameters:
— (required) the kernel module symbolics file
— (optional) the module name, necessary when the symbolics file name and the kernel module name are different
Example:
• ka-module-config-map-unload:
Unloads symbolics file from the module configuration map. The commands has one required parameter: - the module name
Example:
• ka-module-config-show:
Description: Shows the module configuration parameters. The command has an optional argument (integer > 0) representing
the maximum number of files shown from the configuration map
Example:
(gdb) ka-module-config-show
Name Loaded file
rng /data/linux/crypto/rng.o
krng /data/linux/crypto/krng.o
In addition, the user can trigger at any time the version verification in the following way:
• From CLI using the ka-show-info commands. For example:
(gdb) ka-show-info
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 70 / 162
NXP Semiconductors
FSL Debugger References
In case of version mismatch, the Target version check message is Warning: Kernel image running on the target is
different than the vmlinux image in debugger. If the access to target version is not available yet, the Target version
check message is not available yet. The user should check again after the u-boot copies the Linux kernel image into the
DDRAM.
• From Eclipse, OS Resources window, select System Info. The same information as for the CLI command is shown here.
In the same way, the mismatch warning is shown in the gdb console when the U-Boot version is available and the user can check
the version at any time from Eclipse, OS Resource window, selecting “Version”.
NOTE
Note that versions verification when doing SPL U-Boot debug will be available once the main/DDR U-Boot gets
loaded in DDR. Until this happens, target version check will be reported as being unavailable.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 71 / 162
NXP Semiconductors
FSL Debugger References
uefi-add-symbols
(gdb) uefi-add-symbols
uefi-show-images
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 72 / 162
NXP Semiconductors
FSL Debugger References
Example:
(gdb) uefi-show-images
NOTE
For details about configuring target connection, refer Configure the target configuration using Target Connection
Configurator
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 73 / 162
NXP Semiconductors
FSL Debugger References
NOTE
Note that NXP does not own GDB documentation, and is mentioned solely for reference purpose.
mem_spaces
Figure 35. Displaying the available memory spaces using mem_spaces command
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 74 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 75 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 76 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Figure 38. Filling an entire memory area with a given value using mem_fill command
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 77 / 162
NXP Semiconductors
FSL Debugger References
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 78 / 162
NXP Semiconductors
FSL Debugger References
• Issuing mmu command without any parameters will list all the MMU valid entries for the current exception level.
• Issuing mmu –el 3 command will list all the valid MMU entries for the EL3 exception level.
• Issuing mmu –t 0x2000000 will translate the virtual address 0x2000000 to the corresponding physical address using MMU
state for the current exception level.
NOTE
Note that NXP does not own GDB documentation, and is mentioned solely for reference purpose.
Name Address
-c CONFIG [CONFIG ...], --config CONFIG [CONFIG ...] Specify the path to a valid tcc file; template tcc files from {CW Folder}/
CW_ARMv8/Config/boards folder can be used.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 79 / 162
NXP Semiconductors
FSL Debugger References
Name Address
-p PROBE, --probe PROBE Probe details; it overrides what is set in tcc file.
-i [INIT_SCRIPT], --init-script [INIT_SCRIPT] A full path to a .py file that is a valid target initialization script; if no path
specified, no initialization file will be executed; if parameter not
present, initialization file from tcc will be used.
-ca CCS_ADDRESS, --ccs-address CCS_ADDRESS CCS address; "<host>:<port>" For example, 127.0.0.1:41475 or
"auto"; default is auto.
-sk SECURE_DEBUG_KEY, --secure-debug-key Secure debug key used to unlock debug support.
SECURE_DEBUG_KEY
-ga GTA_ADDRESS, --gta-address GTA_ADDRESS GTA (GDB server) address; "<host>:<port>" e.g. 127.0.0.1:45000 or
"auto". Default is 127.0.0.1:45000.
-gc GTA_CONTEXT, --gta-context GTA_CONTEXT GTA (GDB server) debug context :ccs:<soc>[:core] e.g. :ccs:LS2088A
or :ccs:LS2088A:CortexA72#0.
-r, --reset Execute reset; no reset is performed if this parameter is not provided.
-elf ELF_FILE, --elf-file ELF_FILE ELF file containing debug symbols. File will also be loaded into target
memory if --download is specified.
-sym OTHER_SYMBOLS, --other-symbols Load additional debug symbols from the specified file. When
OTHER_SYMBOLS performing U-Boot debug with an SPL file involved, first ELF file
specified via --other-symbols is the actual SPL ELF.
-d, --download Load the specified ELF file into target memory.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 80 / 162
NXP Semiconductors
FSL Debugger References
Figure 42. Example with launching a debug session with OS awareness support
NOTE
In order to start a debug session from command line, launch GDB from the following folder:{CW Folder}
\CW_ARMv8\ARMv8\gdb\bin\ and use cw-launch command from the GDB console to connect to the target.
cw-launch requires a corresponding .tcc file from the folder {CW folder}/CW_ARMv8/Config/boards.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 81 / 162
NXP Semiconductors
FSL Debugger References
Usage
cw-diag -p <probe> -gc <GTA context> [-i <init script>] [-ca <ccs address>] [-sk <secure debug key>] [-
ga <gta address>] [-j <jtag speed>] [-ct <ccs timeout>] [-sc] [-ps]
Name Address
-p PROBE, --probe PROBE Probe details; For example: cwtap:192.168.0.1 - CodeWarrior TAP
ethernet connection using 192.168.0.1 as IP address
-gc GTA_CONTEXT, --gta-context GTA_CONTEXT GTA (GDB server) debug context :ccs:<soc>[:core]
e.g. :ccs:LS2088A or :ccs:LS2088A:CortexA72#0
Name Address
-i [INIT_SCRIPT], --init-script [INIT_SCRIPT] Full path to a .py file that is a valid target initialization script; if no path
specified, no initialization file will be executed
-ca CCS_ADDRESS, --ccs-address CCS_ADDRESS CCS address; "<host>:<port>" e.g. 127.0.0.1:41475 or "auto";
default is auto
-sk SECURE_DEBUG_KEY, --secure-debug-key Secure debug key used to unlock debug support
SECURE_DEBUG_KEY
-ga GTA_ADDRESS, --gta-address GTA_ADDRESS GTA (GDB server) address; "<host>:<port>" e.g. 127.0.0.1:45000 or
"auto". Default is 127.0.0.1:45000
-ps, --preserve-settings Preserve settings already configured in the running CCS instance
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 82 / 162
NXP Semiconductors
FSL Debugger References
Figure 43. Running diagnostics on a given target board using cw-diag command
NOTE
In order to start a debug session from command line, launch GDB from the following folder:{CW Folder}
\CW_ARMv8\ARMv8\gdb\bin\ and use cw-diag command from the GDB console to diagnose the connection.
NOTE
Note that NXP does not own GDB documentation, and is mentioned solely for reference purpose.
Name Description
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 83 / 162
NXP Semiconductors
FSL Debugger References
Name Description
data If no value is specified, it lists the available template for the provided
config_reg. If a value is specified, it configures config_reg with
provided config_data value.
Figure 44. Configuring the CCS option 0x1003 using template command
NOTE
In order to execute this command, GDB has to be connected to the target board.
Name Description
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 84 / 162
NXP Semiconductors
FSL Debugger References
Name Description
Figure 45. Detected parameters after running spd command on a board with DDR4 DIMMs
NOTE
In order to execute this command, GDB has to be connected to the target board.
Name Description
-r, --reset Discard any previously configured RCW source and register values
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 85 / 162
NXP Semiconductors
FSL Debugger References
Name Description
-s [SOURCE], --source [SOURCE] If no value is specified, it lists the available RCW sources defined for
currently used processor. If a value is specified, it configures the
RCW source to be used for RCW override functionality.
-d DATA [DATA ...], --data DATA [DATA ...] Configure the values (hexadecimal) for ranges of RCW register(s) to
be used for RCW override functionality; e.g.: rcw -d 1:0x12345678
10:0xabcdef12
Figure 46. Displaying current RCW configuration using the rcw command
NOTE
In order to execute this command, GDB has to be connected to the target board.
Name Address
<type> Can be one of the following options: probes, idcode, soc. "probes" -
discover available debug probes. "idcode" - list IDCODE of devices
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 86 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 87 / 162
NXP Semiconductors
FSL Debugger References
Name Address
Name Address
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 88 / 162
NXP Semiconductors
FSL Debugger References
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 89 / 162
NXP Semiconductors
FSL Debugger References
Display contexts tree mon ctx id <ctx-id> list Displays the debug contexts tree having
as root the specified context. The context
has the format: <connection>:<soc>:
<core#no>
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 90 / 162
NXP Semiconductors
FSL Debugger References
Set current context mon ctx set current ctx_id Set the context for the debug session.
This should be set after target extended-
remote and before attach. For a single
core application the context should look
like: <connection>:<soc>:<core#no>.
For a multicore application (SMP) the
context should be: <connection>:<soc>
mon ctx id <ctx-id> info List all properties of the specified context
mon ctx id <ctx-id> set <prop-name> Set a property for the specified context
<value>
Reset monitor reset debug Performs reset and keeps cores in debug
mode.
NOTE
These libraries are compiled by using the highest optimize level for speed (-O3) and no debug data (no DWARF
information). The user can recompile these libraries to change the compiler options and use the new libraries in
their projects. Projects for these library are located at {CW_ARMv8}\ARMv8\CodeWarrior_Examples
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 91 / 162
NXP Semiconductors
FSL Debugger References
The user can switch to the I/O UART model by changing the file spec for UART model. The user should replace the
simrdimon.specs with uart.specs in the Other linker flags text box from Cross ARM C (or C++) Linker-- > Miscellaneous.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 92 / 162
NXP Semiconductors
FSL Debugger References
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 93 / 162
NXP Semiconductors
Chapter 7
Flash Programmer
Flash programming is done using python script.
source ../../gdb_extensions/flash/cwflash.py
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 94 / 162
NXP Semiconductors
Flash Programmer
where:
• <offset>: Specifies the offset inside the device.
• <size>: Specifies the size of the area that will be erased.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 95 / 162
NXP Semiconductors
Flash Programmer
For example:
where:
• <verify>: Performs a verify of the content written in flash.
• <n>: Specifies the number of mismatches shown if verify option is used.
• <a>: Shows all the mismatches if verify option is used.
For example:
NOTE
The path to binary file must not contain spaces.
where:
• <offset>: Specifies the offset inside the device.
• <size>: Specifies the size of data to be read.
• <-f>: Specifies the path to the file where the data will be saved.
• <-c>: Specifies the number of bytes per cell. It is incompatible with –f options since it applies only when the output is shown
directly in the console.
For example to dump the content in a binary file:
If [–f FILE] file option is not present the content will be displayed in the console.
NOTE
The path to binary file must not contain spaces.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 96 / 162
NXP Semiconductors
Flash Programmer
where:
• <offset>: Specifies the offset inside the device
• <size>: Specifies the size of the area that will be protected
For example:
where:
• <offset>: Specifies the offset inside the device
• <size>: Specifies the size of the area that will be unprotected.
For example:
fl_list
fl_device [-h] [-al ALIAS] -n NAME -a ADDRESS -wa WADDRESS -ws WSIZE -g GEOMETRY -c CONTROLLER [-d DIE]
positional arguments:
• -n, --name - name of the device; must match one of the supported devices (see "fl_list" command)
• -a, --address - address of the device
• -wa, --waddress - address where the workspace will be located; the workspace is the area where the flash programmer
algorithm will be downloaded
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 97 / 162
NXP Semiconductors
Flash Programmer
fl_id
fl_verify [-h] [-s [SIZE]] [-n NUMBER] [-a] offset data [data ...]
positional arguments:
• offset - offset in device address range
• data - data to be verified in flash; can be a hex sequence or a binary file
optional arguments:
• -h, --help - show this help message and exit
• -s [SIZE], --size - [SIZE] how much to verify
• -n [NUMBER], --number [NUMBER] - number of mismatches shown
• -a, --all - show all the mismatches
fl_current flash_type
For example:
fl_current nor
NOTE
If the command succeeds, the output appears as shown in Figure. Output.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 98 / 162
NXP Semiconductors
Flash Programmer
fl_info
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 99 / 162
NXP Semiconductors
Flash Programmer
The “Flash Programmer” icon in the Debug view toolbar is enabled only when a debug session is active and selected. In this
case, the debug session connection is used by Flash Programmer.
On clicking the Flash Programmer icon, a pop-up appears asking if you wish to continue. Click OK if you want the selected debug
session to be used by Flash Programmer. The debug sessions terminates when the Flash Programmer is closed.
You can also open the Flash Programmer by clicking the Flash Programmer icon from the Target Connection Configuration view
toolbar. This option has the advantage that it doesn’t require to have an existing debug session and the connection to the target
is handled automatically.
This toolbar option is always enabled and uses the selected target configuration (or active target configuration if none is selected)
to establish a connection to the target for using Flash Programmer. In most of the cases, a new debug session is started with the
settings from the used target configuration. However, if a debug session using that target configuration already exists, the existing
debug session is re-used for the Flash Programmer.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 100 / 162
NXP Semiconductors
Flash Programmer
The Devices drop-down list in the Flash Programmer dialog lists all the available flash programmer devices. The used device
can be changed by selecting a different option from the list.
For more information about the device, place the mouse over the icon at the right side of the Devices list. Additional information
about the connection to the target is displayed at the right side of the list.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 101 / 162
NXP Semiconductors
Flash Programmer
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 102 / 162
NXP Semiconductors
Flash Programmer
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 103 / 162
NXP Semiconductors
Flash Programmer
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 104 / 162
NXP Semiconductors
Chapter 8
Use Cases
This chapter explains U-Boot debug, Linux application debug, Linux kernel debug, UEFI debug, and AMP example projects.
This chapter lists:
• U-Boot debug
• Linux application debug
• Linux kernel debug
• UEFI debug
• Import and configure AMP example projects
NOTE
For details on how to prepare the target, see Preparing Target.
NOTE
Step (b) should be done only if nothing is running yet on the target board, or in case you have just started the
target board, but have not started U-Boot. However, in case you simply attach it to a running U-Boot session the
above step should be skipped. PC will reflect the current PC while U-Boot is running.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 105 / 162
NXP Semiconductors
Use Cases
5. If a NAND/SD U-Boot is debugged, the SPL U-Boot ELF file should be specified in the OS Awareness tab, as shown in
the following figure.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 106 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 107 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 108 / 162
NXP Semiconductors
Use Cases
2. The stack and the source views appears as in the following figure.
NOTE
You can add a static map entry using the Edit Source Lookup Path button to avoid locating file using the Locate
File button, whenever a new file is requested.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 109 / 162
NXP Semiconductors
Use Cases
NOTE
If you want to attach to the same U-Boot session, disconnect the CodeWarrior software and reconnect again. You
will not need to set the PC and the path mapping is correct.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 110 / 162
NXP Semiconductors
Use Cases
b. When the debugging starts, you can see stack/registers for every core. Note that the run control is per SoC and not
per core.
2. If an SPL U-Boot is debugged, make sure the SPL U-Boot ELF is specified in the OS Awareness tab, as shown in the
following figure.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 111 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 112 / 162
NXP Semiconductors
Use Cases
3. Click the Edit button right next to the default Remote Host connection. The Edit Connection dialog appears.
4. Specify the IP of the Linux target in the Host text box, specify the user name in the User text box and specify the password
in the Password text box.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 113 / 162
NXP Semiconductors
Use Cases
5. Expand the Advanced section and configure the SSH port and other connection settings, as needed.
6. Click Finish.
NOTE
Before you proceed, ensure that you have completed all the steps in Updating remote connection.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 114 / 162
NXP Semiconductors
Use Cases
To enable full debug support for a Linux application project, perform these steps:
1. GDB should be configured to use the target system libraries.
a. On the host PC, create a folder rootfs and a sub-directory lib.
b. Copy the following libraries: libc, ld, libpthread into to the rootfs/lib/ folder. Use the full library name as you
see it on the target, for example libpthread.so.0, ld-linux-aarch64.so.1, libc.so.6.
c. Create a *.gdbinit file on the file system. For example, test.gdbinit
d. Add following content in the .gdbinit file:
NOTE
If you are running the CodeWarrior software on the same Linux machine where you have compiled the SDK
package, you can directly set up the sysroot from that location in the gdbinit file. For example, the path to sysroot
on a yocto-based sdk would be:
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 115 / 162
NXP Semiconductors
Use Cases
e. Click Apply.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 116 / 162
NXP Semiconductors
Use Cases
2. In the Debug Configuration dialog, expand C/C++ Remote Application and select the launch configuration for the Linux
application project you want to debug.
3. Click Debug.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 117 / 162
NXP Semiconductors
Use Cases
c. Select the project, right-click and select Build Configurations > Set Active > SharedLibTest.
d. Build project. The <project_name>.elf library is created.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 118 / 162
NXP Semiconductors
Use Cases
8.2.3.3 Updating launch configuration for Linux application using shared library
This topic explains steps to set the launch configuration for a Linux application project that uses a shared library
To set the launch configuration for a Linux application project that uses a shared library, perform the following steps:
1. Perform all the steps in Using sysroot.
2. Manually download the .so shared library to the Linux target (to the/lib path).
3. Copy the .so shared library to the sysroot location. (Refer Using sysroot, step 1d)
/home/u12345/Desktop/SDK_Setup/QorIQ-SDK-V2.0-20160527-yocto/build_ls2088ardb/tmp/
sysroots/ls2088ardb/lib
${ProjDirPath}/LibExample
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 119 / 162
NXP Semiconductors
Use Cases
d. Click Apply.
NOTE
This topic only applies for attaching to an application that is already running on the target. To debug an application
from its entry point, see Debugging simple Linux application.
To attach and perform debug operations on the Linux application, an elf file with debug symbols of the application is required on
the machine running the CodeWarrior software. To create an ARMv8 project for attach to a Linux application:
1. Launch CodeWarrior for ARMv8.
2. Import the binary image for the application as described in CodeWarrior Executable Importer wizard.
3. The Debug Configurations dialog appears after you perform the last step in the ELF importer wizard. The dialog will have
a launch configuration of type C/C++ Remote Application selected, with the same name as the newly created project.
4. Select the type C/C++ Attach to Application and press the New launch configuration button.
5. Name the new launch configuration.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 120 / 162
NXP Semiconductors
Use Cases
6. In the Main tab, click Browse and select the newly created project.
7. In the Debugger tab, select gdbserver from the Debugger drop-down list.
8. In the Debugger Options section, select the Connection tab.
9. Specify Type as TCP, specify the host IP of the Linux target and a port number for the gdbserver.
10. Start the gdbserver on the Linux target with the port number specified: gdbserver --multi :<port_number>
11. Click Debug. The gdb client connects to the gdbserver, and can now attach to any application from Linux target by right-
clicking the debug configuration name and selecting Connect.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 121 / 162
NXP Semiconductors
Use Cases
12. Click OK to attach to the running application. At this moment, all debug capabilities will be enabled.
13. For setting up breakpoints in global symbols (for example, main), you should load the application debug symbols using
the file <path_to_application> command in the GDB console in the CodeWarrior software.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 122 / 162
NXP Semiconductors
Use Cases
2. In the Debug Configuration dialog, expand C/C++ Remote Application and select the launch configuration for the multi-
process application project you want to debug.
3. Click the Debugger > Main tab.
4. Check the Automatically debug forked processes (Note: Requires Multi Process GDB) checkbox.
5. Click Debug.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 123 / 162
NXP Semiconductors
Use Cases
NOTE
In order to perform Linux kernel debug, please ensure that the kernel image is build with debug symbols. For
enabling the debug symbols:
1. Start menuconfig, the menu-driven configuration step for the Linux kernel.
2. Go to General Setup, disable the option Compile also drivers which will not load. Note that without performing
this step the option below will not appear in menuconfig.
3. Select Kernel Hacking -> Compile-time checks and compiler options, enable option “Compile the kernel with
debug info”.
NOTE
Step (b) should be done only if nothing is running yet on the target board, or in case you have just started the
target board but have not started the Linux Kernel. However, in case you simply attach it to a running the Linux
Kernel session the above step should be skipped. PC will reflect the current PC while the Linux Kernel is running.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 124 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 125 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 126 / 162
NXP Semiconductors
Use Cases
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 127 / 162
NXP Semiconductors
Use Cases
NOTE
You can add a static map entry using the Edit Source Lookup Path button to avoid locating file using the Locate
File button, whenever a new file is requested
5. To go ahead with next important step in Linux kernel debug (start_kernel), you need to set up a breakpoint there using
this command: break start_kernel in the same gdb console.
6. Click the Resume button. Alternatively, press the F8 key. The breakpoint will be hit.
7. Click the Refresh Debug Views button to refresh the debug views updated with the new stack and the registers view.
8. Close the Source not found window.
9. Double-click the stack for triggering the source-level mapping request.
10. Locate the file suggested by the debugger.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 128 / 162
NXP Semiconductors
Use Cases
11. For details about debug and kernel awareness capabilities, see Debug and Kernel Awareness capabilities.
12. Click the Resume button to run the vmlinux. Alternatively, press the F8 key.
13. To start the Linux Kernel debug again, close/terminate the actual connection.
5. Add watchpoints (data breakpoints) using the Toogle Watchpoint option from the context menu.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 129 / 162
NXP Semiconductors
Use Cases
NOTE
A watchpoint only makes sense for a global variable (or to a global memory address).
You can also add watchpoints using the drop-down menu in the Breakpoint view.
Use CodeWarrior software to see some important information about the Linux kernel, for example general information, build time,
modules list, threads list and so on. To see the full Kernel Awareness capabilities, refer Linux kernel awareness.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 130 / 162
NXP Semiconductors
Use Cases
• The module being inserted, suspend the target execution and load the corresponding symbols file.
b. Automatically ( ka-module-config-auto-load=True.), using ka-module-config-map-loadWhen automatic loading
mode is enabled, the debugger detects when a module is inserted (insmod or modprobe) and automatically searches
the configured symbols file mapping and loads the symbols file. Before inserting the module, the user should add
the corresponding symbols file into the symbols file mapping using ka-module-config-map-load command. This
command can be run at any time (before and after module loading), but the symbols file is loaded only when the
debugger detects that the corresponding module has been inserted.
The user can unload the module’s symbol file if the symbols file is already loaded. When the module is removed (rmmod),
the debugger automatically unloads the module symbols file, independent of the value of ka-module-config-auto-load. This
is done because the module relocation addresses are not valid anymore and even on a new module insertion there will
be different relocation addresses.
2. Setting breakpoints in module
Breakpoints in module’s source code or at a specific module function can be set at any time, even the module symbols
file is not loaded into the debugger.If the module’s symbols file is loaded, the breakpoint is set/enabled and the module
relocation address is displayed in the breakpoint properties.
If the module’s symbols file is not loaded, the debugger could not resolve the corresponding breakpoint relocation address,
but will set the breakpoint as “pending”. When the module is inserted and the module’s symbols file is loaded, the debugger
will refresh the “pending” breakpoints resolving the relocation address.
The debugger behavior for “pending” breakpoint is configurable using “set breakpoint pending” command with the following
values:
• “auto”: this is the default value. When the breakpoint is set from command line interface, the debugger asks the user
to select one of the following values. From Eclipse/gdb-MI, the “auto” value will make the breakpoint pending “on”
• “on” breakpoint “pending” is enabled
• “off” breakpoint “pending” is disabled. With this setting, the breakpoint can not be set when the module’s symbols file
is not loaded
3. Debug Linux kernel module from the module_init function
There are several ways of doing kernel module debug from the module_init function:
a. Without suspend at module insertion
• Add the symbols file to the configured map using the command ka-module-config-map-load.
• Enable module auto-load
• Set a breakpoint to the module’s init function. The breakpoint will be “pending”, as the module is not loaded yet.
• Insert the module (insmod). The debugger will stop at the module’s init function
b. With suspend at module insertion
• Enable suspend at module insertion
• Insert the module. The debugger will suspend the target
• Load the symbols file using ka-module-load command
• Set a breakpoint to the module’s init function. The breakpoint will be resolved as the module and the symbols
file are loaded
• Run. The debugger will stop at the module’s init function
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 131 / 162
NXP Semiconductors
Use Cases
(gdb)
maintenance info breakpoints Num Type Disp Enb Address What-1
breakpoint keep y 0xffffffc0000ef8fc in
load_module at kernel/module.c:3020 inf 1-2 breakpoint keep y 0xffffffc0000eddd4
in
free_module at kernel/module.c:1840 inf 1(gdb)
The eventpoints have negative breakpoint numbers and the user can not modify the breakpoint properties (e.g. delete
breakpoint).
.
The Module Management dialog appears with the currently available modules. The dialog will also show if the symbolics
files for a module is loaded.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 132 / 162
NXP Semiconductors
Use Cases
3. The user can choose a different symbolics file for a module if before opening the Select module symbolics file dialog the
module was selected from the list. In this case, the dialog will ask to confirm the mapping between the current symbolics
file and the module.
4. Click OK.
NOTE
For details on how to prepare the target, see Preparing Target.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 133 / 162
NXP Semiconductors
Use Cases
NOTE
If you are located on a different machine than where UEFI was built, you need to do one of the following:
• map the network address where the UEFI build layout is located to a local drive
To create an ARMv8 bare metal project for UEFI debug, perform these steps:
1. Open CodeWarrior for ARMv8.
2. Import a UEFI image as described in CodeWarrior Executable Importer wizard.
3. A Debug Configurations dialog is opened automatically, with the debug configuration for the newly created UEFI debug
project already selected.
4. Set up the target connection configuration, as explained in Configuring Target.
5. If you want the debugger to automatically load symbols at attach for EFI images loaded during the DXE phase:
a. Open the OS Awareness tab page
b. Select the Add symbols for EFI images loaded at runtime checkbox.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 134 / 162
NXP Semiconductors
Use Cases
6. Click the Debug button to initiate the debug session. The debugger should show source information for the current PC:
• If the current PC is after UEFI entry point, but before DXE phase
• if the current PC is in a EFI image loaded at runtime, and the Add symbols for EFI images loaded at runtime checkbox
is selected
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 135 / 162
NXP Semiconductors
Use Cases
The command will display Done after it finishes the execution successfully.
See section Load debug data for all loaded EFI images for details.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 136 / 162
NXP Semiconductors
Use Cases
The user needs to press the Refresh button in the Debug view in order for the call stack to be updated with the debug information,
and then double-click a stack frame to display the source file.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 137 / 162
NXP Semiconductors
Use Cases
See Show information for all loaded EFI images for details.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 138 / 162
NXP Semiconductors
Use Cases
<CWInstallDir>\CW_ARMv8\ARMv8\CodeWarrior_Examples\HelloWorld_C_AMP_Bare
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 139 / 162
NXP Semiconductors
Use Cases
When RCW is missing or corrupted and switches for setting the board in the hard-coded RCW mode are not available, you can
use the RCW override feature available with the CodeWarrior software for board recovery. For using this feature, perform these
steps:
1. Open CodeWarrior for ARMv8 and define a Target connection configuration for the board using a pre-defined
configuration.
2. Select the newly created configuration and click the Edit button.
3. In Target Configuration tab, select the probe type.
4. Click the Target Init File tab and search for USE_SAFE_RCW. To connect to the board with a missing or corrupted RCW,
set the USE_SAFE_RCW variable to True.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 140 / 162
NXP Semiconductors
Use Cases
NOTE
Select one of the available hard-coded RCW options based on the board reset settings,(such as SYSCLK,
DDRCLK). For the hard-coded RCW options, see QorIQ LS1012A Reference Manual. In the Target Init File tab,
go to def Reset() procedure and set the values of the hard-coded RCW in gdb.execute("monitor rcw
source set <hard-coded RCW>").
NOTE
In case the CodeWarrior software does not support the RCW override for a specific board or SoC, you can
configurie the board for the hard-coded boot source from the DIP switches.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 141 / 162
NXP Semiconductors
Use Cases
2. When the CodeWarrior software connects to the board, the CodeWarrior Flash Programmer window appears.
3. Select the appropriate flash device, the Program action, the RCW file to be programmed and the Offset.
4. Click Add Action and execute the flash programmer sequence.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 142 / 162
NXP Semiconductors
Use Cases
NOTE
When using the CMSIS-DAP probe, it is recommended to verify operation parameters and RCW correctness
before continuing. Failure to program a compatible RCW may result in board being unable to boot. Recovery is
not possible using CSMSIS-DAP and will require use of the external CodeWarrior TAP unit
5. Close the CodeWarrior Flash Programmer window and reset the board to load the new RCW.
6. For the next step, programming U-Boot, the changes done in step 4 from RCW Override need to be undone.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 143 / 162
NXP Semiconductors
Use Cases
NOTE
If the flash device is QSPI, make sure the swapped image of RCW is used.
2. When the CodeWarrior software connects to the board, the CodeWarrior Flash Programmer window appears.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 144 / 162
NXP Semiconductors
Use Cases
3. Select the appropriate flash device, the Program action, the U-Boot file to be programmed, and the Offset.
4. Click Add Action and execute the flash programmer sequence.
5. Close the CodeWarrior Flash Programmer window and power-cycle the board.
6. Open a serial console to check the U-Boot prompt.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 145 / 162
NXP Semiconductors
Use Cases
Figure 91.
If Secure debug key is not specified/enabled or an incorrect key is used, a "secure debug violation" error message appears when
a debug session is attempted and unlocking fails. A challenge key providing a hint with respect to what secure debug key is
required is mentioned in the error message, as shown below.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 146 / 162
NXP Semiconductors
Use Cases
Figure 92.
After several failed attempts to unlock the target with a incorrect secure debug key, target is locked until a reset occurs. Note that
debugger will attempt to perform the reset behind the scene but if the operation fails, a manual reset is required before being
able to unlock the target with the provided secure debug key.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 147 / 162
NXP Semiconductors
Chapter 9
Troubleshooting
This chapter provide troubleshooting details.
This section lists:
• Diagnostic Information Export
• Prevent core from entering non-recoverable state due to unmapped memory access
• Board recovery in case of missing/corrupt RCW in IFC memory
• Logging
• Recording
• NXP Licensing
• Connection diagnostics
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 148 / 162
NXP Semiconductors
Troubleshooting
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 149 / 162
NXP Semiconductors
Troubleshooting
7. Enter Contact Name and Contact Email in the contact information textbox. This information is optional though NXP will
not share this information with anyone.
8. Click Restore Defaults to apply default factory settings.
9. Click OK .
• Through an error reporting dialog such as below. Click the Diagnostic Information link in the error dialog.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 150 / 162
NXP Semiconductors
Troubleshooting
2. Select the checkbox under the Source column to select the information that will be exported into the archive file.
NOTE
You must select at least one file for export.
NOTE
You can open the Customize Filters dialog through Customize button in the Diagnostic Information Export Wizard
( General settings for Diagnostic Information)or in the Preferences dialog ( General settings for Diagnostic
Information).
5. Click Preview to view the text that will be sent to NXP from the wizard.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 151 / 162
NXP Semiconductors
Troubleshooting
You can also check if more filters are needed to protect any sensitive information from leakage.
6. Click OK .
7. Click Next in the Diagnostic Information Export Wizard.
The Reproducible Details page appears.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 152 / 162
NXP Semiconductors
Troubleshooting
8. Enter the reproducible steps and any other relevant information in the Details to recreate the issue textbox.
9. Click Add to add additional files to the archive file for diagnosis.
10. Click Finish.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 153 / 162
NXP Semiconductors
Troubleshooting
• Directly from the error message shown by the CodeWarrior software when the connection to the target fails, using the
Diagnose button.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 154 / 162
NXP Semiconductors
Troubleshooting
When a connection is diagnosed, the Connection Diagnostics view appears showing all the tests that are executed.
If the diagnostic is successful, all the tests in the list are preceded with a green icon.
If one of the test fails, its entry appears with a red icon, as shown in the fiure below. When you select the entry, the right pane
displays additional information and also some steps the you can try to address the problem.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 155 / 162
NXP Semiconductors
Troubleshooting
class CustomTests(Test):
def __init__(self):
Test.__init__(self, CustomTests.name)
def body(self):
self.fail_msg = "Message displayed in case test failed"
self.help_msg = """
Displayed only in case the test failed. Meant to inform the user about the steps necessary to address
the issue.
It can be multiline.
"""
try:
INFO("Information message")
except CWException as e:
raise TestError()
After defining the test, you need to add the test to the list of tests to be executed. The lists are suites_hw for hardware tests and
they can be found in the same diag.py file. The position of the test in the list of tests is important because the test will execute
using the connection state from the previous test.
After the tests are added and executed, the Connections Diagnostics window shows the new tests in the list.
9.3 Prevent core from entering non-recoverable state due to unmapped memory access
The Arm core can enter in a non-recoverable state when a speculative access to an unmapped memory happens.
Also this can happen for accesses to memory regions that are marked as valid in the MMU, but the underlying memory interface
is either misconfigured or absent. For example, access to a memory range dedicated to PCIe without a proper initialization for
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 156 / 162
NXP Semiconductors
Troubleshooting
the PCIe controller or access to memory holes as defined in the SoC memory map can cause core to enter in a non-recoverable
state.
If the debugger detects a failed attempt to stop the core in such situation, it samples the value of the External PC Debug register
(EDPCSR) in order to provide the program location where the program has hanged. An error message is displayed informing the
user that the stop attempt has failed and listing the collected PC sample value.
Although the debug session is not reliable from this point onwards and must be terminated, the PC value allows the user to identify
and fix the application problem that has caused the core to enter into the non-recoverable state. The user needs to make sure
that the MMU is configured from the application in such a way that all valid translations point to the actual memory.
NOTE
See the SoC Reference Manual for the list of available hard-coded RCW options.
2. Change the onboard DIP switches to select the above hard-coded RCW option as RCW_SRC.
NOTE
See the board User’s Guide for the switch configuration information.
3. Use CodeWarrior Flash Programmer to burn a valid RCW configuration in the flash memory.
NOTE
See Flash Programmer for Flash Programming instructions.
4. Revert the on board DIP switches to select the flash RCW_SRC again and reset the board.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 157 / 162
NXP Semiconductors
Troubleshooting
NOTE
See the SoC Reference Manual for the list of available hard-coded RCW options.
2. Edit the target initialization script corresponding to the board, for example:
• {CW Install Dir}\CW_ARMv8\Config\boards\<board_name>_init.gdb
• Specify that a safe RCW should be used by changing useSafeRCW from False to True
• useSafeRCW = True
• Also, in the Reset function make sure the desired RCW source is set (according to step 1).
NOTE
The initialization script already contains the value for the hard-coded RCW option that is appropriate for the default
board configuration, but it may need to be changed if the board has been configured for different SYSCLK,
DDRCLK frequencies.
3. Use CodeWarrior Flash Programmer to burn a valid RCW configuration in the flash memory.
NOTE
See Flash Programmer for Flash Programming instructions.
4. Revert the changes performed in the target initialization script in Step 2 and reset the board.
9.5 Logging
GDB logs are used to save output of the GDB commands to a file. There are two types of logs: GDB and GDB RSP server.
• GDB logs - Configured with standard GDB log control commands.
For details about GDB log control commands, refer https://sourceware.org/gdb/onlinedocs/gdb/Logging-Output.html
• GDB RSP server log - Configured with GDB monitor commands. For details about GDB monitor commands, run the
command monitor help log.
The log messages from the GDB RSP server are grouped in different categories, and each category can be associated with
one or more log destinations, such as console, file, and socket.
9.6 Recording
GDB provides the possibility to record all commands typed during a command-line debug session and save these to a file.
To enable this feature from command line GDB:
• (gdb) set history size unlimited – command history size defaults to 256; “unlimited” recommended
• (gdb) set history filename <filename> - the file where to save the recording (default: “.gdb_history”, located in the GDB
executable home directory)
• (gdb) set history save on – all following commands will be recorded;
NOTE
The recorded command history is written to a file only upon exiting GDB.
After ending a debug session and exiting GDB, the “.gdb_history” file can be inspected and eventually edited. Optionally,
when restarting the debug session, all commands from the recording may be replayed as a gdb script:
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 158 / 162
NXP Semiconductors
Troubleshooting
• The NXP Licenses window displays all installed licensed products and their status (“licensed”, “expiring in X days”,
“expired”). It can be opened from Help > NXP Licenses.
There is also a NXP Licenses preference panel which allows the user to customize specific aspects of the license plugins:
• whether the license expiration warning window should be displayed or not
• after how much delay, the expiration warning window should appear
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 159 / 162
NXP Semiconductors
Troubleshooting
NOTE
The NXP License plugin is not responsible for enabling or disabling a feature based on its license status, but only
to monitor that status, and display it to the user. The plugin itself is responsible to enable or disable itself.
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
User's Guide 160 / 162
Index
Index
B
Bareboard Build Properties 20
Build 20
Build Properties 20
D
Diagnostic Information Wizard 148
E
Export Diagnostic Information 150
G
General settings for Diagnostic Information 148
I
I/O support 91
L
Logs 158
P
Properties 20
S
S08 20
CodeWarrior Development Studio for QorIQ LS series - ARM V8 ISA, Targeting Manual, Rev. 11.5.0, 06/2020
NXP Semiconductors 161
How To Reach Us Information in this document is provided solely to enable system and software implementers to
use NXP products. There are no express or implied copyright licenses granted hereunder to
Home Page:
design or fabricate any integrated circuits based on the information in this document. NXP
nxp.com reserves the right to make changes without further notice to any products herein.
Web Support: NXP makes no warranty, representation, or guarantee regarding the suitability of its products for
nxp.com/support any particular purpose, nor does NXP assume any liability arising out of the application or use
of any product or circuit, and specifically disclaims any and all liability, including without limitation
consequential or incidental damages. “Typical” parameters that may be provided in NXP data
sheets and/or specifications can and do vary in different applications, and actual performance
may vary over time. All operating parameters, including “typicals,” must be validated for each
customer application by customer's technical experts. NXP does not convey any license under
its patent rights nor the rights of others. NXP sells products pursuant to standard terms and
conditions of sale, which can be found at the following address: nxp.com/
SalesTermsandConditions.
While NXP has implemented advanced security features, all products may be subject to
unidentified vulnerabilities. Customers are responsible for the design and operation of their
applications and products to reduce the effect of these vulnerabilities on customer’s applications
and products, and NXP accepts no liability for any vulnerability that is discovered. Customers
should implement appropriate design and operating safeguards to minimize the risks associated
with their applications and products.
NXP, the NXP logo, Freescale, the Freescale logo, and QorIQ are trademarks of are trademarks
of NXP B.V. All other product or service names are the property of their respective owners. Arm,
Cortex are trademarks or registered trademarks of Arm Limited (or its subsidiaries) in the US
and/or elsewhere. The related technology may be protected by any or all of patents, copyrights,
designs and trade secrets. All rights reserved.