📄 readme.1st
字号:
installation -- /c6xtools/solaris/bin then set LO_PATH to be setenv LO_PATH /c6xtools/solaris-------------------------------------------------------------------------------2.04. Tips on printing from linear assembly-------------------------------------------------------------------------------The following code can be used for printing information within linearassembly. This can be useful for printf style debugging of linearassembly code.=============================<print.inc>============================= .global _print_int .global _print_nl .global _print_line .global _print_lint PRINT_INT .macro tag,value MVKL tag, print_int_private MVKH tag, print_int_private .call _print_int(print_int_private,value); .endmPRINT_NL .macro .call _print_nl() .endmPRINT_LINE .macro .call _print_star() .endm=============================<print.c>=============================#include <stdio.h>#include <stdlib.h>void print_int(char *s,int word){ printf("%s:,%.8x: \t",s,word);}void print_nl(){ putchar('\n');}void print_line(){ printf("-----------------------------------------------------------------\n");}=============================<foo.sa>============================= .dataA_astring .string "A_a", 0B_bstring .string "B_b", 0A_sum .string "A_sum", 0 .text .include "print.inc" .global _foo_foo: .cproc A_a, B_b .reg print_int_private .reg A_c ADD A_a, B_b, A_c PRINT_INT A_astring, A_a PRINT_INT B_bstring, B_b PRINT_NL PRINT_INT A_sum, A_c .return-------------------------------------------------------------------------------2.05. Old code that uses dynamic casts is incompatible with newer RTS libs-------------------------------------------------------------------------------The names of run-time support functions used to implement C++ dynamic castschanged in the run-time support libraries of the 5.1.x version of the code generation tools. Therefore, object and library code that use dynamic castscompiled with code generation tools 5.0.x and prior will not link properly with run-time support libraries from code generation tools version 5.1.x and later. Please re-compile the source code with a 5.1.x or later version of the code generation tools.*******************************************************************************3. Known Issues *******************************************************************************------------------------------------------------------------------------------SDSsq11516------------------------------------------------------------------------------Summary : Long types for bitfields are not supported although they're legal in C++Long bitfield types are not supportd in C++ programs on the C6x.------------------------------------------------------------------------------SDSsq11669------------------------------------------------------------------------------Summary : C++ allows enumerators larger than 'int' but C6x Compiler does notC++ allows enumerators larger than an int. Currently, the C6xcompiler forces all enumerators to ints.------------------------------------------------------------------------------SDSsq11721------------------------------------------------------------------------------Summary : "Extern inline" functions are not supported in C6x C/C++ Compiler"Extern inline" functions are not supported by the C6x C/C++ compiler.The V3.00 compiler/code generator does not create globally accessiblecode for functions which are declared inline. A simple example is:inline int x() { return 1; }int y() {return 2;}When compiled with cl6x -k -c test.c a warning is produced:"test.c", line 1: warning: function "x" was declared but neverreferencedand the resulting assembler file (test.asm) does not contain any codefor x(). See section "Workaround" for a workaround to this problem.Workaround:-----------As a workaround that involves the least amount of code modification, define a macro to be "static inline" and use that macro as the inline modifierfor these functions. In the normal case, these functions will be inlined.To generate callable versions of these functions, also compile the headerfiles containing the inlined functions with this new macro undefined. For example: ---------------------------------------------------------------------- header.h: #ifdef NO_INLINE #define STATIC_INLINE #else #define STATIC_INLINE static inline #endif /* Replace the inline modifier with STATIC_INLINE for all inlined *//* functions which you also want to generate a callable version. */ STATIC_INLINE int x() { return 1; } ---------------------------------------------------------------------- foo.c: /* Inline occurs normally in this file */ #include "header.h" int y() { return x(); } ---------------------------------------------------------------------- body.c: /* Compile this file to generate callable versions of all inline *//* functions which use the STATIC_INLINE macro. */ #define NO_INLINE #include "header.h" ------------------------------------------------------------------------------SDSsq19038------------------------------------------------------------------------------Summary : Global variables are not visible in watch window if using the -h optionIf the user selects the option "Make Global Symbols Static (-h)" under the Linker tab in tbe Build Options window, they will not be able to monitor global variables in the watch window while running that program.If the user attempts to watch a global variable, the watch window will display "Identifier not found."This problem did not exist in CCS 1.20.Workaround:-----------Resolve conflicting global variable names so -h is not required.------------------------------------------------------------------------------SDSsq23983------------------------------------------------------------------------------Summary : STRUCT_ALIGN pragma does not work for array of structThe compiler does not correctly align an array of STRUCT_ALIGNed structures. It does, however, place the structures the correct distance apart.------------------------------------------------------------------------------SDSsq30228------------------------------------------------------------------------------Summary : Linker unexpectedly adds STYP_DATA flag into a text section A zero-length input section's header flags may affect the sectionheader flags of the output section it is contained in.------------------------------------------------------------------------------SDSsq32304------------------------------------------------------------------------------Summary : -o timeout option for load6x doesn't work if there are no CIO functions.The timeout feature(-o xxx option) in load6x (TMS320C6x Standalone Simulator Version 4.20 and also 4.3)doesn't work if there are no CIO functions. In the document spru187k "TMS320C6000 Optimizing Compiler User's Guide" ,the description for the options that control the stand-alone simulator says that -o xxx option will set overall timeout to xxx minutes. The stand-alone simulator aborts if the loaded program is not finished after xxx minutes.Workaround:-----------If the source file contains CIO functions such as printf then the simulator will abort the program after specified minutes and works fine.------------------------------------------------------------------------------SDSsq32879------------------------------------------------------------------------------Summary : STABS variables declared in loop bodies are promoted to function scopeWhen building the following program with STABS debug, you will notice that the variable "j", which is declared in the for loop, appears in _main's function scope (not the loop scope) when you look at the symbol table:#include <stdio.h>int main(){ int i; for (i = 0; i < 10; i++) { int j; j = i * 2; printf("%d\n", j); } return 0;}Workaround:-----------Use DWARF debug.------------------------------------------------------------------------------SDSsq32976------------------------------------------------------------------------------Summary : Relocation value is wrongly calculated by assemblerAssembler incorrectly calculates wrong relocation value 'go - gap' example below -- .sect mysect .global _main_main:gap .equ 0x90000000 .word 0x1234 .word 0x1234 go mvkl (go - gap), a3 mvkh (go - gap), a3And link this object section to address 0x90000000.Workaround:-----------For the particular situation cited in the test case, theuser can define a symbol at link-time associated with the beginningof the section containing the symbol "go" and then refer tothat symbol when computing the section-relative offset of thesymbol.For example, remove the definition of 'gap' from the assembler fileand add a .global directive that allows you to reference a linkerdefined version of 'gap' (described in the linker command file below): .global gap ; add this directive .sect mysect .word 0x1234 .word 0x1234go mvkl (go - gap), a3 mvkh (go - gap), a3Now, in the linker command file, the user will define a symbolthat is associated with the start of the section. This is donewith the operator 'start' in the example below: SECTIONS { mysect: load = 0x90000000, start(gap) {*(mysect)} }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -