
www.ti.com
Program Development (Assembler, C-Compiler, Linker)
11. The example programs given in the KickStart documentation (i.e., Demo, Tutor, etc.) are not
correct. The programs work only in the simulator. However, the programs do not function correctly on
an actual device, because the Watchdog mechanism is active. The programs need to be modified to
disable the Watchdog mechanism. Disable the Watchdog mechanism with this C-statement:
WDTCTL = WDTPW + WDTHOLD;
or with this assembler statement:
mov.w # WDTPW+WDTHOLD,&WDTCTL
12. Access to MPY using an 8-bit operation is flagged as an error. Within the .h files, 16-bit registers
are defined in such a way that 8-bit operations upon them are flagged as an error. This feature is
normally beneficial and can catch register access violations. However, in the case of MPY, it is also
valid to access this register using 8-bit operators. If 8-bit operators are used to access MPY, the
access violation check mechanism can be defeated by using "MPY_" to reference the register.
Similarly, 16-bit operations on 8-bit registers are flagged.
13. Constant definitions (#define) used within the .h files are effectively reserved and include, for
example, C, Z, N, and V. Do not create program variables with these names.
14. The CSTARTUP that is implicitly linked with all C applications does not disable the Watchdog
timer. Use
WDT = WDTPW + WDTHOLD;
to explicitly disable the Watchdog. This statement is best placed
in the __low_level_init() function that gets executed before main().
If the Watchdog timer is not disabled, and the Watchdog triggers and resets the device during
CSTARTUP, the source screen goes blank, as C-SPY is not able to locate the source code for
CSTARTUP. Be aware that CSTARTUP can take a significant amount of time to execute if a large
number of initialized global variables are used.
int __low_level_init(void)
{
/* Insert your low-level initializations here */
WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog timer
/*==================================*/
/* Choose if segment initialization */
/* should be done or not.
*/
/* Return: 0 to omit seg_init
*/
/*
1 to run seg_init
*/
/*==================================*/
return (1);
}
15. Compiler optimization can remove unused variables and/or statements that have no effect and
can effect debugging. Optimization: NONE is supported within Project
→
Options
→
C/C++ Compiler
→
Code
→
Optimizations. Alternatively, variables can be declared volatile.
16. The IAR tutorial assumes a Full or Baseline version of the Workbench. Within a KickStart system,
it is not possible to configure the C compiler to output assembler mnemonics.
17. Existing projects from an IAR 1.x system can be used within the new IAR 2.x/3.x system; refer to
the IAR document migration guide for EW430 x.x. This document is located in <Installation
Root>\Embedded Workbench x.x\430\doc\migration.htm
18. Assembler projects must reference the code segment (RSEG CODE) to use the Linker
→
Processing
→
Fill Unused Code Memory mechanism. No special steps are required to use Linker
→
Processing
→
Fill Unused Code Memory with C projects.
19. Ensure that the proper C runtime library is selected for C-only and mixed C/assembly language
projects (Project
→
General Options
→
Library Configuration
→
Library). For assembly-only projects,
the runtime library must not get linked in, otherwise the build fails and a linker error is output (e.g., that
the RESET vector is allocated twice).
32
Frequently Asked Questions
SLAU138F – June 2004 – Revised March 2007
Содержание MSP-FET430PIF
Страница 2: ...2 SLAU138F June 2004 Revised March 2007 Submit Documentation Feedback ...
Страница 64: ...www ti com Hardware 64 SLAU138F June 2004 Revised March 2007 Submit Documentation Feedback ...
Страница 68: ...www ti com FET Specific Menus 68 SLAU138F June 2004 Revised March 2007 Submit Documentation Feedback ...