Home
CrossWorks for MSP430 Reference Manual
CrossWorks for MSP430
Introduction
Release notes
Previous
Up
Next
CrossWorks for MSP430 Reference Manual
CrossWorks for MSP430
Introduction
What is CrossWorks?
What we don't tell you
Activating your product
Text conventions
Additional resources
Highlights
Release notes
CrossStudio Tutorial
Activating CrossWorks
Managing support packages
Creating a project
Managing files in a project
Setting project options
Building projects
Exploring projects
Using the debugger
Low-level debugging
Debugging externally built applications
CrossStudio User Guide
CrossStudio standard layout
Menu bar
Title bar
Status bar
Editing workspace
Docking windows
Dashboard
CrossStudio help and assistance
Creating and managing projects
Solutions and projects
Creating a project
Adding existing files to a project
Adding new files to a project
Removing a file, folder, project, or project link
Building your application
Creating variants using configurations
Project properties
Configurations and property values
Project macros
Dependencies and build order
Linking and section placement
Using source control
Source control capabilities
Configuring source-control providers
Connecting to the source-control system
File source-control status
Source-control operations
Adding files to source control
Updating files
Committing files
Reverting files
Locking files
Unlocking files
Removing files from source control
Showing differences between files
Source-control properties
Subversion provider
CVS provider
Package management
Exploring your application
Project explorer
Source navigator window
References window
Symbol browser window
Stack usage window
Memory usage window
Bookmarks window
Code Outline Window
Analyzing Source Code
Editing your code
Basic editing
Moving the insertion point
Adding text
Deleting text
Using the clipboard
Undo and redo
Drag and drop
Searching
Advanced editing
Indenting source code
Commenting out sections of code
Adjusting letter case
Using bookmarks
Find and Replace window
Clipboard Ring window
Mouse-click accelerators
Regular expressions
Debugging windows
Locals window
Globals window
Watch window
Register window
Memory window
Breakpoints window
Call Stack window
Threads window
Execution Profile window
Execution Trace window
Debug file search editor
Debug Terminal window
Debug Immediate window
Breakpoint expressions
Debug expressions
Utility windows
Output window
Properties window
Targets window
Terminal emulator window
Script Console window
Downloads window
Latest News window
Command-line options
-D (Define macro)
-noclang (Disable Clang support)
-noload (Disable loading of last project)
-packagesdir (Specify packages directory)
-permit-multiple-studio-instances (Permit multiple studio instances)
-rootuserdir (Set the root user data directory)
-save-settings-off (Disable saving of environment settings)
-set-setting (Set environment setting)
-templatesfile (Set project templates path)
Uninstalling CrossWorks for MSP430
Target interfaces
CrossConnect Target Interface
MSP430 DLL Target Interface
MSP430 Core Simulator Target Interface
C Compiler User Guide
Command line options
-ansi (Warn about potential ANSI problems)
-D (Define macro symbol)
-g (Generate debugging information)
-I (Define user include directories)
-J (Define system include directories)
-m (Set MSP430 code memory size)
-mcpux (Enable MSP430X processor)
-mmpy (Enable hardware multiplier)
-msd (Treat double as float)
-o (Set output file name)
-O (Optimize code generation)
-Or (Optimize register allocation)
-Rc (Set default code section name)
-Rd (Set default initialized data section name)
-Ri (Set default ISR section name)
-Rk (Set default read-only section name)
-Rv (Set default vector section name)
-Rz (Set default zeroed section name)
-V (Version information)
-w (Suppress warnings)
-we (Treat warnings as errors)
Preprocessor predefined symbols
Pragmas
#pragma codeseg
#pragma dataseg
#pragma constseg
#pragma zeroedseg
#pragma vectorseg
#pragma isrseg
#pragma vector
Section control
Section overrides
Absolute data object placement
Type-based enumerations
Special functions
Interrupt functions
Monitor functions
Top-level functions
External naming convention
Data representation
Register use
Assembler User Guide
Command-line syntax
-D (Define macro symbol)
-g (Generate debugging information)
-I (Define user include directories)
-J (Define system include directories)
-o (Set output file name)
-Rc (Set default code section name)
-Rd (Set default initialized data section name)
-Ri (Set default ISR section name)
-Rk (Set default read-only section name)
-Rv (Set default vector section name)
-Rz (Set default zeroed section name)
-V (Version information)
-w (Suppress warnings)
-we (Treat warnings as errors)
Source format
Types
Built-in types
Array types
Pointer types
Structure types
Compilation units and libraries
Directive reference
ALIGN
BREAK
BSS
CODE
CONST
DATA
DB
DC.B
DC.W
DC.L
DL
DS.B
DSECT
DS.L
DS.W
DV
DW
ELSE
END
ENDIF
EQU
EVEN
EXPORT
FILL
IF
IMPORT
INCLUDE
INCLUDEBIN
INIT
ISR
KEEP
PSECT
RMB
RML
RMW
RODATA
ROOT
RSEG
SET
TEXT
USECT
VECTORS
ZDATA
Expressions
Labels
Operators
!
$
+
-
*
/
%
^
&
&&
==
!=
<
<=
<<
>
>=
>>
|
||
ASHR
DEFINED
ENDOF
EQ
GE
GT
HBYTE
HIGH
HWORD
LAND
LBYTE
LE
LNOT
LOR
LT
LHALF
LOW
LWORD
NE
OR
SHL
SHR
SIZEOF
STARTOF
THIS
UHALF
XOR
Macros
Linker User Guide
Command line syntax
Command line options
-D (Define linker symbol)
-F (Set output format)
-g (Propagate debugging information)
-K (Keep linker symbol)
-l- (Do not link standard libraries)
-l (Link library)
-L (Set library directory path)
-M (Display linkage map)
-m (Generate for 64K part)
-m (Generate for 1M part)
-mcpux (Enable MSP430X processor)
-o (Set output file name)
-Obl (Enable block locality optimization)
-Ocm (Enable code motion optimization)
-Oxc (Enable code factoring optimization)
-Oxcp (Set code factoring passes)
-Oxcx (Enable extreme code factoring optimization)
-Oph (Enable peephole optimization)
-Oxj (Cross jumping optimization)
-Osf (Enable subroutine flattening optimizations)
-Ojc (Enable jump chaining optimization)
-Ojt (Enable jump threading optimization)
-Ojt (Enable tail merge optimization)
-Oz (Optimize Sections)
-R (Rename sections)
-T (Locate sections)
-we (Treat warnings as errors)
-w (Suppress warnings)
-v (Verbose execution)
-V (Display version)
C Library User Guide
Floating point
Single and double precision
Multithreading
Thread safety in the CrossWorks library
Implementing mutual exclusion in the C library
Input and output
Customizing putchar
Locales
Unicode, ISO 10646, and wide characters
Multi-byte characters
The standard C and POSIX locales
Additional locales in source form
Installing a locale
Setting a locale directly
Complete API reference
<assert.h>
__assert
assert
<cruntime.h>
__float32_add
__float32_add_1
__float32_add_asgn
__float32_div
__float32_div_asgn
__float32_eq
__float32_eq_0
__float32_lt
__float32_lt_0
__float32_mul
__float32_mul_asgn
__float32_neg
__float32_sqr
__float32_sub
__float32_sub_asgn
__float32_to_float64
__float32_to_int16
__float32_to_int32
__float32_to_int64
__float32_to_uint16
__float32_to_uint32
__float32_to_uint64
__float64_add
__float64_add_1
__float64_add_asgn
__float64_div
__float64_div_asgn
__float64_eq
__float64_eq_0
__float64_lt
__float64_lt_0
__float64_mul
__float64_mul_asgn
__float64_neg
__float64_sqr
__float64_sub
__float64_sub_asgn
__float64_to_float32
__int16_asr
__int16_asr_asgn
__int16_div
__int16_div_asgn
__int16_lsl
__int16_lsl_asgn
__int16_lsr
__int16_lsr_asgn
__int16_mod
__int16_mod_asgn
__int16_mul
__int16_mul_8x8
__int16_mul_asgn
__int16_to_float32
__int16_to_float64
__int32_asr
__int32_asr_asgn
__int32_div
__int32_div_asgn
__int32_lsl
__int32_lsl_asgn
__int32_lsr
__int32_lsr_asgn
__int32_mod
__int32_mod_asgn
__int32_mul
__int32_mul_16x16
__int32_mul_asgn
__int32_to_float32
__int32_to_float64
__int64_asr
__int64_asr_asgn
__int64_div
__int64_div_asgn
__int64_lsl
__int64_lsl_asgn
__int64_lsr
__int64_lsr_asgn
__int64_mod
__int64_mod_asgn
__int64_mul
__int64_mul_32x32
__int64_mul_asgn
__int64_to_float32
__int64_to_float64
__uint16_div
__uint16_div_asgn
__uint16_mod
__uint16_mod_asgn
__uint16_mul_8x8
__uint16_to_float32
__uint16_to_float64
__uint32_div
__uint32_div_asgn
__uint32_mod
__uint32_mod_asgn
__uint32_mul_16x16
__uint32_to_float32
__uint32_to_float64
__uint64_div
__uint64_div_asgn
__uint64_mod
__uint64_mod_asgn
__uint64_mul_32x32
__uint64_to_float32
__uint64_to_float64
<ctype.h>
isalnum
isalnum_l
isalpha
isalpha_l
isblank
isblank_l
iscntrl
iscntrl_l
isdigit
isdigit_l
isgraph
isgraph_l
islower
islower_l
isprint
isprint_l
ispunct
ispunct_l
isspace
isspace_l
isupper
isupper_l
isxdigit
isxdigit_l
tolower
tolower_l
toupper
toupper_l
<debugio.h>
debug_abort
debug_break
debug_clearerr
debug_enabled
debug_evaluate
debug_exit
debug_fclose
debug_feof
debug_ferror
debug_fflush
debug_fgetc
debug_fgetpos
debug_fgets
debug_filesize
debug_fopen
debug_fprintf
debug_fprintf_c
debug_fputc
debug_fputs
debug_fread
debug_freopen
debug_fscanf
debug_fscanf_c
debug_fseek
debug_fsetpos
debug_ftell
debug_fwrite
debug_getargs
debug_getch
debug_getchar
debug_getd
debug_getenv
debug_getf
debug_geti
debug_getl
debug_getll
debug_gets
debug_getu
debug_getul
debug_getull
debug_kbhit
debug_loadsymbols
debug_perror
debug_printf
debug_printf_c
debug_putchar
debug_puts
debug_remove
debug_rename
debug_rewind
debug_runtime_error
debug_scanf
debug_scanf_c
debug_system
debug_time
debug_tmpfile
debug_tmpnam
debug_ungetc
debug_unloadsymbols
debug_vfprintf
debug_vfscanf
debug_vprintf
debug_vscanf
<errno.h>
EDOM
EILSEQ
EINVAL
ENOMEM
ERANGE
errno
<float.h>
DBL_DIG
DBL_EPSILON
DBL_MANT_DIG
DBL_MAX
DBL_MAX_10_EXP
DBL_MAX_EXP
DBL_MIN
DBL_MIN_10_EXP
DBL_MIN_EXP
DECIMAL_DIG
FLT_DIG
FLT_EPSILON
FLT_EVAL_METHOD
FLT_MANT_DIG
FLT_MAX
FLT_MAX_10_EXP
FLT_MAX_EXP
FLT_MIN
FLT_MIN_10_EXP
FLT_MIN_EXP
FLT_RADIX
FLT_ROUNDS
<inmsp.h>
__bcd_add_long
__bcd_add_long_long
__bcd_add_short
__bcd_negate_long
__bcd_negate_long_long
__bcd_negate_short
__bcd_subtract_long
__bcd_subtract_long_long
__bcd_subtract_short
__bic_SR_register
__bic_SR_register_on_exit
__bis_SR_register
__bis_SR_register_on_exit
__bit_count_leading_zeros_char
__bit_count_leading_zeros_long
__bit_count_leading_zeros_long_long
__bit_count_leading_zeros_short
__bit_reverse_char
__bit_reverse_long
__bit_reverse_long_long
__bit_reverse_short
__delay_cycles
__disable_interrupt
__enable_interrupt
__even_in_range
__get_register
__insert_opcode
__low_power_mode_0
__low_power_mode_1
__low_power_mode_2
__low_power_mode_3
__low_power_mode_4
__low_power_mode_off_on_exit
__no_operation
__read_extended_byte
__read_extended_long
__read_extended_word
__set_interrupt
__set_register
__swap_bytes
__swap_long_bytes
__swap_words
__write_extended_byte
__write_extended_long
__write_extended_word
<In430.h>
_BIC_SR
_BIC_SR_IRQ
_BIS_SR
_BIS_SR_IRQ
_DADD16
_DADD32
_DADD64
_DINT
_DNEG16
_DNEG32
_DNEG64
_DSUB16
_DSUB32
_DSUB64
_EINT
_LSWPB
_LSWPW
_NOP
_OPC
_SWPB
<iso646.h>
and
and_eq
bitand
bitor
compl
not
not_eq
or
or_eq
xor
xor_eq
<limits.h>
CHAR_BIT
CHAR_MAX
CHAR_MIN
INT_MAX
INT_MIN
LLONG_MAX
LLONG_MIN
LONG_MAX
LONG_MIN
MB_LEN_MAX
SCHAR_MAX
SCHAR_MIN
SHRT_MAX
SHRT_MIN
UCHAR_MAX
UINT_MAX
ULLONG_MAX
ULONG_MAX
USHRT_MAX
<locale.h>
lconv
localeconv
setlocale
<math.h>
acos
acosf
acosh
acoshf
asin
asinf
asinh
asinhf
atan
atan2
atan2f
atanf
atanh
atanhf
cbrt
cbrtf
ceil
ceilf
copysign
copysignf
cos
cosf
cosh
coshf
erf
erfc
erfcf
erff
exp
exp2
exp2f
expf
expm1
expm1f
fabs
fabsf
fdim
fdimf
floor
floorf
fma
fmaf
fmax
fmaxf
fmin
fminf
fmod
fmodf
fpclassify
frexp
frexpf
hypot
hypotf
ilogb
ilogbf
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
ldexp
ldexpf
lgamma
lgammaf
llrint
llrintf
llround
llroundf
log
log10
log10f
log1p
log1pf
log2
log2f
logb
logbf
logf
lrint
lrintf
lround
lroundf
modf
modff
nearbyint
nearbyintf
nextafter
nextafterf
pow
powf
remainder
remainderf
remquo
remquof
rint
rintf
round
roundf
scalbln
scalblnf
scalbn
scalbnf
signbit
sin
sinf
sinh
sinhf
sqrt
sqrtf
tan
tanf
tanh
tanhf
tgamma
tgammaf
trunc
truncf
<setjmp.h>
longjmp
setjmp
<stdarg.h>
va_arg
va_copy
va_end
va_start
<stddef.h>
NULL
max_align_t
offsetof
ptrdiff_t
size_t
<stdio.h>
getchar
gets
printf
putchar
puts
scanf
snprintf
sprintf
sscanf
vprintf
vscanf
vsnprintf
vsprintf
vsscanf
<stdlib.h>
EXIT_FAILURE
EXIT_SUCCESS
MB_CUR_MAX
RAND_MAX
abs
atexit
atof
atoi
atol
atoll
bsearch
calloc
div
div_t
exit
free
itoa
labs
ldiv
ldiv_t
llabs
lldiv
lldiv_t
lltoa
ltoa
malloc
mblen
mblen_l
mbstowcs
mbstowcs_l
mbtowc
mbtowc_l
qsort
rand
realloc
srand
strtod
strtof
strtol
strtoll
strtoul
strtoull
ulltoa
ultoa
utoa
<string.h>
memccpy
memchr
memcmp
memcpy
memcpy_fast
memmove
mempcpy
memset
strcasecmp
strcasestr
strcat
strchr
strcmp
strcpy
strcspn
strdup
strerror
strlcat
strlcpy
strlen
strncasecmp
strncasestr
strncat
strnchr
strncmp
strncpy
strndup
strnlen
strnstr
strpbrk
strrchr
strsep
strspn
strstr
strtok
strtok_r
<time.h>
__TIME_T_DEFINED
asctime
asctime_r
clock_t
ctime
ctime_r
difftime
gmtime
gmtime_r
localtime
localtime_r
mktime
strftime
tm
<wchar.h>
WCHAR_MAX
WCHAR_MIN
WEOF
btowc
btowc_l
mbrlen
mbrlen_l
mbrtowc
mbrtowc_l
mbsrtowcs
mbsrtowcs_l
msbinit
wchar_t
wcrtomb
wcrtomb_l
wcscat
wcschr
wcscmp
wcscpy
wcscspn
wcsdup
wcslen
wcsncat
wcsnchr
wcsncmp
wcsncpy
wcsnlen
wcsnstr
wcspbrk
wcsrchr
wcsspn
wcsstr
wcstok
wcstok_r
wctob
wctob_l
wint_t
wmemccpy
wmemchr
wmemcmp
wmemcpy
wmemmove
wmempcpy
wmemset
wstrsep
<wctype.h>
iswalnum
iswalnum_l
iswalpha
iswalpha_l
iswblank
iswblank_l
iswcntrl
iswcntrl_l
iswctype
iswctype_l
iswdigit
iswdigit_l
iswgraph
iswgraph_l
iswlower
iswlower_l
iswprint
iswprint_l
iswpunct
iswpunct_l
iswspace
iswspace_l
iswupper
iswupper_l
iswxdigit
iswxdigit_l
towctrans
towctrans_l
towlower
towlower_l
towupper
towupper_l
wctrans
wctrans_l
wctype
<xlocale.h>
duplocale
freelocale
localeconv_l
newlocale
Utilities Reference
Compiler driver
File naming conventions
Command-line options
-allow-multiple-definition (Allow multiple symbol definition)
-ansi (Warn about potential ANSI problems)
-ar (Archive output)
-c (Compile to object code, do not link)
-cpu (Set MSP430 architecture)
-d (Define linker symbol)
-D (Define macro symbol)
-E (Preprocess)
-F (Set output format)
-g (Generate debugging information)
-help (Display help information)
-I (Define user include directories)
-I- (Exclude standard include directories)
-J (Define system include directories)
-K (Keep linker symbol)
-l- (Do not link standard libraries)
-L (Set library directory path)
-memorymap (Memory map file)
-memorymapmacros (Memory map macros)
-mul (Set MSP430 multiplier architecture)
-M (Display linkage map)
-n (Dry run, no execution)
-nostderr (No stderr output)
-O (Optimize output)
-o (Set output file name)
-placement (Section placement file)
-placementmacros (Section placement macros)
-placementsegments (Section placement segments)
-printf (Select printf capability)
-R (Set section name)
-scanf (Select scanf capability)
-sd (Treat double as float)
-U (Undefine macro symbol)
-v (Verbose execution)
-w (Suppress warnings)
-we (Treat warnings as errors)
-W (Pass option to tool)
-x (Specify file types)
Compiler driver
File naming conventions
Command-line options
-ansi (Warn about potential ANSI problems)
-ar (Archive output)
-c (Compile to object code, do not link)
-g (Generate debugging information)
-D (Define macro symbol)
-F (Set output format)
-h (Display help information)
-I (Define user include directories)
-J (Define system include directories)
-K (Keep linker symbol)
-l (Link library)
-L (Set library directory path)
-I- (Exclude standard include directories)
-l- (Do not link standard libraries)
-m (Machine-level options)
-M (Display linkage map)
-n (Dry run, no execution)
-o (Set output file name)
-O (Optimize output)
-R (Set section name)
-s- (Exclude standard startup code)
-v (Verbose execution)
-V (Display version)
-w (Suppress warnings)
-we (Treat warnings as errors)
-Wa (Pass option to assembler)
-Wc (Pass option to compiler)
-Wl (Pass option to linker)
Hex extractor
Command line options
-T (Extract named section)
-F (Set output format)
-o (Set output prefix)
-P (Pad space)
-V (Display version)
Librarian
-c (Create archive)
-r (Add or replace archive member)
-d (Delete archive members)
-t (List archive members)
Command-Line Project Builder
Building with a CrossStudio project file
Building without a CrossStudio project file
Command-line options
-batch (Batch build)
-config (Select build configuration)
-clean (Remove output files)
-D (Define macro)
-echo (Show command lines)
-file (Build a named file)
-packagesdir (Specify packages directory)
-project (Specify project to build)
-property (Set project property)
-rebuild (Always rebuild)
-show (Dry run, don't execute)
-solution (Specify solution to build)
-studiodir (Specify CrossStudio directory)
-template (Specify project template)
-time (Time the build)
-threadnum (Specify number of build threads)
-type (Specify project type)
-verbose (Show build information)
Command-Line Project Download and Debug
Command line debugging
Managing breakpoints
Displaying state
Locating the current context
Controlling execution
Support packages
Command-line options
-break (Stop execution at symbol)
-config (Specify build configuration)
-connection (Specify connection)
-debug (Enter command line debugging)
-eraseall (Erase all flash memory)
-filetype (Specify load file type)
-help (Display help)
-listfiletypes (Display supported load file types)
-listprojectprops (Display all project properties)
-listprops (Display target properties)
-listtargets (Display supported target interfaces)
-loadaddress (Set load address)
-loader (Specify loader configuration)
-nodifferential (Inhibit differential download)
-nodisconnect (Inhibit target disconnection)
-nodownload (Inhibit download)
-noverify (Inhibit verification)
-packagesdir (Specify package directory)
-project (Specify project name)
-quiet (Be silent)
-reset (Reset only)
-script (Execute debug script)
-serve (Run semihosting server)
-setprop (Set target interface property)
-solution (Specify solution file)
-studiodir (Specify Studio directory)
-target (Specify target interface)
-verbose (Display additional status)
Command-Line Scripting
Command-line options
-define (Define global variable)
-help (Show usage)
-load (Load script file)
-define (Verbose output)
CrossScript classes
Example uses
Embed
Header file generator
Using the header generator
Command line options
-regbaseoffsets (Use offsets from peripheral base)
-nobitfields (Inhibit bitfield macros)
Package generator
Appendices
Legal
Copyright, disclaimer, and trademarks
Rowley Associates license statement
Technical
File formats
Memory Map file format
Section Placement file format
Project file format
Project Templates file format
Property Groups file format
Package Description file format
External Tools file format
Debugger Type Interpretation file format
Environment Options
Building Environment Options
Debugging Environment Options
IDE Environment Options
Programming Language Environment Options
Source Control Environment Options
Text Editor Environment Options
Windows Environment Options
Project Options
Code Options
Debug Options
Macros
System Macros
Build Macros
Script classes
BinaryFile
CWSys
Debug
WScript