тестовый репозиторий с cmake файлом готов. Путь до компилятора необходимо задавать вручную в cmake файле

This commit is contained in:
Виктор Лобов 2024-01-22 15:37:09 +03:00
parent 9af7b01c40
commit 8ea10442c9
10 changed files with 834 additions and 51 deletions

216
28335_RAM_lnk.cmd Normal file
View File

@ -0,0 +1,216 @@
/*
// TI File $Revision: /main/11 $
// Checkin $Date: April 15, 2009 09:57:28 $
//###########################################################################
//
// FILE: 28335_RAM_lnk.cmd
//
// TITLE: Linker Command File For 28335 examples that run out of RAM
//
// This ONLY includes all SARAM blocks on the 28335 device.
// This does not include flash or OTP.
//
// Keep in mind that L0 and L1 are protected by the code
// security module.
//
// What this means is in most cases you will want to move to
// another memory map file which has more memory defined.
//
//###########################################################################
// $TI Release: 2833x/2823x Header Files V1.32 $
// $Release Date: June 28, 2010 $
// $Copyright:
// Copyright (C) 2009-2023 Texas Instruments Incorporated - http://www.ti.com/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
*/
/* ======================================================
// For Code Composer Studio V2.2 and later
// ---------------------------------------
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
// peripheral structures to the proper locations within
// the memory map.
//
// The header linker files are found in <base>\headers\cmd
//
// For BIOS applications add: DSP2833x_Headers_BIOS.cmd
// For nonBIOS applications add: DSP2833x_Headers_nonBIOS.cmd
========================================================= */
/* ======================================================
// For Code Composer Studio prior to V2.2
// --------------------------------------
// 1) Use one of the following -l statements to include the
// header linker command file in the project. The header linker
// file is required to link the peripheral structures to the proper
// locations within the memory map */
/* Uncomment this line to include file only for non-BIOS applications */
/* -l DSP2833x_Headers_nonBIOS.cmd */
/* Uncomment this line to include file only for BIOS applications */
/* -l DSP2833x_Headers_BIOS.cmd */
/* 2) In your project add the path to <base>\headers\cmd to the
library search path under project->build options, linker tab,
library search path (-i).
/*========================================================= */
/* Define the memory block start/length for the F28335
PAGE 0 will be used to organize program sections
PAGE 1 will be used to organize data sections
Notes:
Memory blocks on F28335 are uniform (ie same
physical memory) in both PAGE 0 and PAGE 1.
That is the same memory region should not be
defined for both PAGE 0 and PAGE 1.
Doing so will result in corruption of program
and/or data.
L0/L1/L2 and L3 memory blocks are mirrored - that is
they can be accessed in high memory or low memory.
For simplicity only one instance is used in this
linker file.
Contiguous SARAM memory blocks can be combined
if required to create a larger memory block.
*/
MEMORY
{
PAGE 0 :
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */
RAMM0 : origin = 0x000050, length = 0x0003B0
RAML0 : origin = 0x008000, length = 0x001000
RAML1 : origin = 0x009000, length = 0x001000
RAML2 : origin = 0x00A000, length = 0x001000
RAML3 : origin = 0x00B000, length = 0x001000
ZONE7A : origin = 0x200000, length = 0x00FC00 /* XINTF zone 7 - program space */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
ADC_CAL : origin = 0x380080, length = 0x000009
RESET : origin = 0x3FFFC0, length = 0x000002
IQTABLES : origin = 0x3FE000, length = 0x000b50
IQTABLES2 : origin = 0x3FEB50, length = 0x00008c
FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0
BOOTROM : origin = 0x3FF27C, length = 0x000D44
PAGE 1 :
/* BOOT_RSVD is used by the boot ROM for stack. */
/* This section is only reserved to keep the BOOT ROM from */
/* corrupting this area during the debug process */
BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML4 : origin = 0x00C000, length = 0x001000
RAML5 : origin = 0x00D000, length = 0x001000
RAML6 : origin = 0x00E000, length = 0x001000
RAML7 : origin = 0x00F000, length = 0x001000
ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 - data space */
}
SECTIONS
{
/* Setup for "boot to SARAM" mode:
The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : > RAML0, PAGE = 0
#else
ramfuncs : > RAML0, PAGE = 0
#endif
#endif
.text : >> RAML1 | RAML2, PAGE = 0
.InitBoot : > RAML1, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0
.stack : > RAMM1, PAGE = 1
.ebss : > RAML4, PAGE = 1
.econst : > RAML5, PAGE = 1
.esysmem : > RAMM1, PAGE = 1
IQmath : > RAML1, PAGE = 0
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
/* Uncomment the section below if calling the IQNexp() or IQexp()
functions from the IQMath.lib library in order to utilize the
relevant IQ Math table in Boot ROM (This saves space and Boot ROM
is 1 wait-state). If this section is not uncommented, IQmathTables2
will be loaded into other memory (SARAM, Flash, etc.) and will take
up space, but 0 wait-state is possible.
*/
/*
IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
{
IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)
}
*/
FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
DMARAML4 : > RAML4, PAGE = 1
DMARAML5 : > RAML5, PAGE = 1
DMARAML6 : > RAML6, PAGE = 1
DMARAML7 : > RAML7, PAGE = 1
ZONE7DATA : > ZONE7B, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */
csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
/* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
.adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/

View File

@ -4,7 +4,6 @@ cmake_minimum_required( VERSION 3.5)
SET (TARGET_NAME test_project)
#message( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )
set(CGT_TOOLCHAIN_DIR /home/lobov/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS)
@ -19,16 +18,9 @@ project(cmake_test C CXX ASM)
SET (FLAGS -v28 -ml -mt --float_support=fpu32 -Ooff --opt_for_speed=5
--fp_mode=relaxed -advice:performance=all --define=_INLINE --define=bmin='0.397824735f' --define=amax='0.960433870f'
--float_operations_allowed=32 --printf_support=minimal
-i="/home/lobov/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib/"
-i="/home/lobov/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include/"
-i="/home/lobov/workspace/f2833x/headers/include"
-i="/home/lobov/workspace/f2833x/common/include"
-i="/home/lobov/libraries/math/IQmath/c28/include"
-i="/home/lobov/libraries/math/FPUfastRTS/c28/include"
-g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet
--preproc_with_compile --preproc_dependency=DSP2833x_usDelay.d_raw
)
)
include_directories( "${PROJECT_BINARY_DIR}")
@ -57,29 +49,17 @@ set_target_properties(${TARGET_NAME}
SUFFIX ".out")
target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDES}
)
#[===[
set (LINK_PARAM -v28 -ml -mt --float_support=fpu32 --define="_DEBUG" --define="LARGE_MODEL"
-g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics
--quiet -z -m"test_project.map" --stack_size=0x200 --warn_sections
-i"/home/lobov/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib"
-i"/home/lobov/ti/ccs1250/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include"
-i"/home/lobov/workspace/f2833x/examples/gpio_toggle" -i"/home/lobov/workspace/f2833x/common/lib"
-i"/home/lobov/libraries/math/IQmath/c28/lib" -i"/home/lobov/libraries/math/FPUfastRTS/c28/lib"
-i"/home/lobov/workspace/C2000Ware_5_00_00_00/libraries/math/IQmath/c28/lib"
-i"/home/lobov/workspace/C2000Ware_5_00_00_00/libraries/math/FPUfastRTS/c28/lib"
--priority --reread_libs --issue_remarks --verbose_diagnostics --xml_link_info="test_project.xml" -
-entry_point=code_start --rom_model -o "test_project.out" -lrts2800_fpu32_fast_supplement.lib
-lrts2800_fpu32.lib
"./build/DSP2833x_ADC_cal.obj"
"/home/lobov/workspace/ccs12.5/cmake_test/build/DSP2833x_SysCtrl.obj"
"/home/lobov/workspace/ccs12.5/cmake_test/build/DSP2833x_CodeStartBranch.obj"
"./DSP2833x_DefaultIsr.o"
"./DSP2833x_GlobalVariableDefs.o"
"./DSP2833x_PieCtrl.o"
"./DSP2833x_PieVect.o"
"./DSP2833x_usDelay.o"
"./Example_2833xGpioToggle.o"
"/home/lobov/workspace/f2833x/common/cmd/28335_RAM_lnk.cmd"
"/home/lobov/workspace/f2833x/headers/cmd/DSP2833x_Headers_nonBIOS.cmd" -lIQmath_fpu32.lib )
#]===]
#add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_CXX_COMPILER} ${LINK_PARAM})
target_link_directories(${TARGET_NAME} PRIVATE
#/home/lobov/workspace/ccs12.5/cmake_test/lib
)
target_link_options(${TARGET_NAME} PRIVATE
-v28 -ml -mt -m${TARGET_NAME}.map -z --stack=0x200 --reread_libs --rom_model --entry_point=code_start
--float_support=fpu32 --diag_suppress=10063
${CMAKE_CURRENT_SOURCE_DIR}/28335_RAM_lnk.cmd
${CMAKE_CURRENT_SOURCE_DIR}/DSP2833x_Headers_nonBIOS.cmd
)
target_link_libraries(${TARGET_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/lib/rts2800_fpu32_fast_supplement.lib
${CMAKE_CURRENT_SOURCE_DIR}/lib/rts2800_fpu32_fast_supplement_coff.lib
${CMAKE_CURRENT_SOURCE_DIR}/lib/rts2800_fpu32.lib
)

View File

@ -0,0 +1,214 @@
/*
// TI File $Revision: /main/8 $
// Checkin $Date: June 2, 2008 11:12:24 $
//###########################################################################
//
// FILE: DSP2833x_Headers_nonBIOS.cmd
//
// TITLE: DSP2833x Peripheral registers linker command file
//
// DESCRIPTION:
//
// This file is for use in Non-BIOS applications.
//
// Linker command file to place the peripheral structures
// used within the DSP2833x headerfiles into the correct memory
// mapped locations.
//
// This version of the file includes the PieVectorTable structure.
// For BIOS applications, please use the DSP2833x_Headers_BIOS.cmd file
// which does not include the PieVectorTable structure.
//
//###########################################################################
// $TI Release: 2833x/2823x Header Files V1.32 $
// $Release Date: June 28, 2010 $
// $Copyright:
// Copyright (C) 2009-2023 Texas Instruments Incorporated - http://www.ti.com/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the
// distribution.
//
// Neither the name of Texas Instruments Incorporated nor the names of
// its contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################
*/
MEMORY
{
PAGE 0: /* Program Memory */
PAGE 1: /* Data Memory */
DEV_EMU : origin = 0x000880, length = 0x000180 /* device emulation registers */
FLASH_REGS : origin = 0x000A80, length = 0x000060 /* FLASH registers */
CSM : origin = 0x000AE0, length = 0x000010 /* code security module registers */
ADC_MIRROR : origin = 0x000B00, length = 0x000010 /* ADC Results register mirror */
XINTF : origin = 0x000B20, length = 0x000020 /* external interface registers */
CPU_TIMER0 : origin = 0x000C00, length = 0x000008 /* CPU Timer0 registers */
CPU_TIMER1 : origin = 0x000C08, length = 0x000008 /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/
CPU_TIMER2 : origin = 0x000C10, length = 0x000008 /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/
PIE_CTRL : origin = 0x000CE0, length = 0x000020 /* PIE control registers */
PIE_VECT : origin = 0x000D00, length = 0x000100 /* PIE Vector Table */
DMA : origin = 0x001000, length = 0x000200 /* DMA registers */
MCBSPA : origin = 0x005000, length = 0x000040 /* McBSP-A registers */
MCBSPB : origin = 0x005040, length = 0x000040 /* McBSP-B registers */
ECANA : origin = 0x006000, length = 0x000040 /* eCAN-A control and status registers */
ECANA_LAM : origin = 0x006040, length = 0x000040 /* eCAN-A local acceptance masks */
ECANA_MOTS : origin = 0x006080, length = 0x000040 /* eCAN-A message object time stamps */
ECANA_MOTO : origin = 0x0060C0, length = 0x000040 /* eCAN-A object time-out registers */
ECANA_MBOX : origin = 0x006100, length = 0x000100 /* eCAN-A mailboxes */
ECANB : origin = 0x006200, length = 0x000040 /* eCAN-B control and status registers */
ECANB_LAM : origin = 0x006240, length = 0x000040 /* eCAN-B local acceptance masks */
ECANB_MOTS : origin = 0x006280, length = 0x000040 /* eCAN-B message object time stamps */
ECANB_MOTO : origin = 0x0062C0, length = 0x000040 /* eCAN-B object time-out registers */
ECANB_MBOX : origin = 0x006300, length = 0x000100 /* eCAN-B mailboxes */
EPWM1 : origin = 0x006800, length = 0x000022 /* Enhanced PWM 1 registers */
EPWM2 : origin = 0x006840, length = 0x000022 /* Enhanced PWM 2 registers */
EPWM3 : origin = 0x006880, length = 0x000022 /* Enhanced PWM 3 registers */
EPWM4 : origin = 0x0068C0, length = 0x000022 /* Enhanced PWM 4 registers */
EPWM5 : origin = 0x006900, length = 0x000022 /* Enhanced PWM 5 registers */
EPWM6 : origin = 0x006940, length = 0x000022 /* Enhanced PWM 6 registers */
ECAP1 : origin = 0x006A00, length = 0x000020 /* Enhanced Capture 1 registers */
ECAP2 : origin = 0x006A20, length = 0x000020 /* Enhanced Capture 2 registers */
ECAP3 : origin = 0x006A40, length = 0x000020 /* Enhanced Capture 3 registers */
ECAP4 : origin = 0x006A60, length = 0x000020 /* Enhanced Capture 4 registers */
ECAP5 : origin = 0x006A80, length = 0x000020 /* Enhanced Capture 5 registers */
ECAP6 : origin = 0x006AA0, length = 0x000020 /* Enhanced Capture 6 registers */
EQEP1 : origin = 0x006B00, length = 0x000040 /* Enhanced QEP 1 registers */
EQEP2 : origin = 0x006B40, length = 0x000040 /* Enhanced QEP 2 registers */
GPIOCTRL : origin = 0x006F80, length = 0x000040 /* GPIO control registers */
GPIODAT : origin = 0x006FC0, length = 0x000020 /* GPIO data registers */
GPIOINT : origin = 0x006FE0, length = 0x000020 /* GPIO interrupt/LPM registers */
SYSTEM : origin = 0x007010, length = 0x000020 /* System control registers */
SPIA : origin = 0x007040, length = 0x000010 /* SPI-A registers */
SCIA : origin = 0x007050, length = 0x000010 /* SCI-A registers */
XINTRUPT : origin = 0x007070, length = 0x000010 /* external interrupt registers */
ADC : origin = 0x007100, length = 0x000020 /* ADC registers */
SCIB : origin = 0x007750, length = 0x000010 /* SCI-B registers */
SCIC : origin = 0x007770, length = 0x000010 /* SCI-C registers */
I2CA : origin = 0x007900, length = 0x000040 /* I2C-A registers */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations. */
PARTID : origin = 0x380090, length = 0x000001 /* Part ID register location */
}
SECTIONS
{
PieVectTableFile : > PIE_VECT, PAGE = 1
/*** Peripheral Frame 0 Register Structures ***/
DevEmuRegsFile : > DEV_EMU, PAGE = 1
FlashRegsFile : > FLASH_REGS, PAGE = 1
CsmRegsFile : > CSM, PAGE = 1
AdcMirrorFile : > ADC_MIRROR, PAGE = 1
XintfRegsFile : > XINTF, PAGE = 1
CpuTimer0RegsFile : > CPU_TIMER0, PAGE = 1
CpuTimer1RegsFile : > CPU_TIMER1, PAGE = 1
CpuTimer2RegsFile : > CPU_TIMER2, PAGE = 1
PieCtrlRegsFile : > PIE_CTRL, PAGE = 1
DmaRegsFile : > DMA, PAGE = 1
/*** Peripheral Frame 3 Register Structures ***/
McbspaRegsFile : > MCBSPA, PAGE = 1
McbspbRegsFile : > MCBSPB, PAGE = 1
/*** Peripheral Frame 1 Register Structures ***/
ECanaRegsFile : > ECANA, PAGE = 1
ECanaLAMRegsFile : > ECANA_LAM PAGE = 1
ECanaMboxesFile : > ECANA_MBOX PAGE = 1
ECanaMOTSRegsFile : > ECANA_MOTS PAGE = 1
ECanaMOTORegsFile : > ECANA_MOTO PAGE = 1
ECanbRegsFile : > ECANB, PAGE = 1
ECanbLAMRegsFile : > ECANB_LAM PAGE = 1
ECanbMboxesFile : > ECANB_MBOX PAGE = 1
ECanbMOTSRegsFile : > ECANB_MOTS PAGE = 1
ECanbMOTORegsFile : > ECANB_MOTO PAGE = 1
EPwm1RegsFile : > EPWM1 PAGE = 1
EPwm2RegsFile : > EPWM2 PAGE = 1
EPwm3RegsFile : > EPWM3 PAGE = 1
EPwm4RegsFile : > EPWM4 PAGE = 1
EPwm5RegsFile : > EPWM5 PAGE = 1
EPwm6RegsFile : > EPWM6 PAGE = 1
ECap1RegsFile : > ECAP1 PAGE = 1
ECap2RegsFile : > ECAP2 PAGE = 1
ECap3RegsFile : > ECAP3 PAGE = 1
ECap4RegsFile : > ECAP4 PAGE = 1
ECap5RegsFile : > ECAP5 PAGE = 1
ECap6RegsFile : > ECAP6 PAGE = 1
EQep1RegsFile : > EQEP1 PAGE = 1
EQep2RegsFile : > EQEP2 PAGE = 1
GpioCtrlRegsFile : > GPIOCTRL PAGE = 1
GpioDataRegsFile : > GPIODAT PAGE = 1
GpioIntRegsFile : > GPIOINT PAGE = 1
/*** Peripheral Frame 2 Register Structures ***/
SysCtrlRegsFile : > SYSTEM, PAGE = 1
SpiaRegsFile : > SPIA, PAGE = 1
SciaRegsFile : > SCIA, PAGE = 1
XIntruptRegsFile : > XINTRUPT, PAGE = 1
AdcRegsFile : > ADC, PAGE = 1
ScibRegsFile : > SCIB, PAGE = 1
ScicRegsFile : > SCIC, PAGE = 1
I2caRegsFile : > I2CA, PAGE = 1
/*** Code Security Module Register Structures ***/
CsmPwlFile : > CSM_PWL, PAGE = 1
/*** Device Part ID Register Structures ***/
PartIdRegsFile : > PARTID, PAGE = 1
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/

373
exit.txt Normal file
View File

@ -0,0 +1,373 @@
TMS320C2000 C/C++ Compiler v22.6.1.LTS
Copyright (c) 1996-2018 Texas Instruments Incorporated
Usage: cl2000 [-options] filename
Use 'cl2000 --help <option>' for more information on a particular option. Use
'cl2000 --help <text>' to search options for information regarding <text>.
Option arguments surrounded by [] declare they are optional. Option arguments
separated by commas specify that the option's argument must be chosen from
those arguments listed.
When shown, option arguments and defaults apply to the usage of both long and
short option forms.
Processor Options:
-v,--silicon_version=28 Processor version (when not specified, compiler
defaults to --silicon_version=28)
-ml,--large_memory_model Option deprecated, set by default
-mt,--unified_memory Unified memory
--cla_support[=cla0,cla1,cla2]
Specify CLA support (argument optional, defaults
to: cla0)
--float_support=fpu32,fpu64,softlib
Specify floating point support
--idiv_support[=none,idiv0] Specify support for enhanced integer divison
(argument optional, defaults to: idiv0)
--isr_save_vcu_regs=on,off Specify VCU register save/restore for interrupts
--tmu_support[=tmu0,tmu1] Specify TMU support (argument optional, defaults
to: tmu0)
--vcu_support[=vcu0,vcu2,vcrc]
Specify VCU support (argument optional, defaults
to: vcu0)
Optimization Options:
-O,--opt_level[=off,0,1,2,3,4]
Optimization level (argument optional, defaults
to: 2)
--opt_for_speed,-mf[=0-5] Speed vs. size trade-offs (argument optional,
defaults to: 4)
--fp_mode=relaxed,strict Floating Point mode (when not specified,
compiler defaults to --fp_mode=strict)
--fp_reassoc=on,off Allow reassociation of FP arithmetic (when not
specified, compiler defaults to
--fp_reassoc=on)
Include Options:
--include_path,-I=dir Add dir to #include search path
--preinclude=filename Specify a preinclude file
Performance Advisor Options:
--advice:performance[=all,none]
Provide advice on optimization techniques
(argument optional, defaults to: all)
Predefined Symbols Options:
--define,-D=NAME[=value] Pre-define NAME
--undefine,-U=NAME Undefine NAME
Control Options:
--compile_only,-c Disable linking (overrides -z)
--help,-h Show help screen
--run_linker,-z[=arguments] Perform link using options following
--skip_assembler,-n Compile only; do not assemble
Advanced Debug Options:
-g,--symdebug:dwarf Full symbolic debug
--symdebug:none Suppress all symbolic debug generation
--symdebug:dwarf_version=3,4 Specify DWARF version
Language Options:
--c11 Compile program in C11 mode.
--c89 Compile program in ANSI C89 mode.
--c99 Compile program in C99 mode.
--c++03 Compile program in C++03 mode.
--relaxed_ansi,-pr Relaxed parsing (non-strict ANSI)
--strict_ansi,-ps Strict ANSI mode (errors)
--exceptions Enable C++ exception handling
--rtti,-rtti Support C++ run-time type information
--cpp_default,-fg Treat C files as C++ files
--extern_c_can_throw Allow extern C functions to propagate exceptions
--float_operations_allowed=all,32,64,none
Floating point precision accepted by compiler
(when not specified, compiler defaults to
--float_operations_allowed=all)
--fp_single_precision_constant
Treat floating-point constants as single
precision
--cla_default Treat C files as CLA files
--pending_instantiations=# Limit pending template instantiations
--printf_support=nofloat,minimal,full
Level of printf/scanf support required (when not
specified, compiler defaults to
--printf_support=full)
--static_template_instantiation
Do static early template instantiation
Parser Preprocessing Options:
--preproc_dependency,-ppd[=filename]
Generate include file dependency information
--preproc_includes,-ppi[=filename]
Generate first-level include file list
--preproc_macros,-ppm[=filename]
Generate list of pre- & user-defined macros
--preproc_only,-ppo Preprocess only
--preproc_with_comment,-ppc Preprocess only; maintain comments
--preproc_with_compile,-ppa Continue compilation after using -pp<X> options.
--preproc_with_line,-ppl Preprocess only; maintain line directives
Diagnostic Options:
--compiler_revision Print compiler revision and exit
--diag_error,-pdse=id Treat diagnostic <id> as error
--diag_remark,-pdsr=id Treat diagnostic <id> as remark
--diag_suppress,-pds=id Suppress diagnostic <id>
--diag_warning,-pdsw=id Treat diagnostic <id> as warning
--diag_wrap[=on,off] Wrap diagnostic messages (argument optional,
defaults to: on)
--display_error_number,-pden Emit diagnostic identifier numbers
--emit_warnings_as_errors,-pdew
Treat warnings as errors
--issue_remarks,-pdr Issue remarks
--no_warnings,-pdw Suppress warnings
--quiet,-q Quiet Mode
--set_error_limit,-pdel=count
Set error limit to <count>
--super_quiet,-qq Super Quiet Mode
--tool_version,-version Print version numbers for each tool
--verbose Display banner and function progress information
--verbose_diagnostics,-pdv Verbose diagnostics
--write_diagnostics_file,-pdf
Output diagnostic to .err file
Runtime Model Options:
--gen_func_subsections,-mo[=on,off]
Place each function in a separate subsection
(argument optional, defaults to: on)
--gen_data_subsections=on,off
Place structs and arrays in separate subsections
--abi=coffabi,eabi Application binary interface (when not
specified, compiler defaults to --abi=coffabi)
--cla_background_task=on,off Specify if a CLA background task is in use (when
not specified, compiler defaults to
--cla_background_task=off)
--cla_signed_compare_workaround=on,off
Workaround for CLA signed integer comparison
(when not specified, compiler defaults to
--cla_signed_compare_workaround=off)
--no_rpt,-mi Don't generate RPT instructions
--protect_volatile,-mv[=nops]
Pipeline protect volatiles by <nops> nops (C27x)
[def: 2]
--ramfunc[=on,off] Run functions from RAM. (argument optional,
defaults to: on)
--rpt_threshold=0-256 Specify max number of repetitions in a RPT
instruction
--silicon_errata_fpu1_workaround=on,off
Workaround CPU-to-FPU register write
Advanced Optimizations Options:
--sat_reassoc=on,off Allow reassociation of sat arithmetic (when not
specified, compiler defaults to
--sat_reassoc=off)
--program_level_compile,-pm Program mode compilation
--call_assumptions,-op=0-3 Specify call assumptions when optimizing
--auto_inline,-oi[=size] Specify threshold for automatic inlining
--disable_inlining Disable inlining
-ms,--opt_for_space Optimize for code size
--aliased_variables,-ma Assume called funcs create hidden aliases (rare)
Entry/Exit Hook Options:
--entry_hook[=hook_function_name]
Insert this call at entry to each function
(argument optional, defaults to: __entry_hook)
--exit_hook[=hook_function_name]
Insert this call at exit from each function
(argument optional, defaults to: __exit_hook)
--entry_parm=name,address,none
Pass caller's name or address to entry hook
--exit_parm=name,address,none
Pass caller's name or address to exit hook
--remove_hooks_when_inlining Remove entry/exit hooks from inlined functions
Feedback and Analysis Options:
--gen_profile_info Generate profile feedback data
--analyze=codecov Generate analysis info from profile data
--analyze_only Only generate analysis
--use_profile_info[=filelist]
Use profile feedback file(s)
Assembler Options:
-k,--keep_asm Keep the generated assembly language (.asm) file
--asm_listing,-al Generate listing file
--c_src_interlist,-ss Generate C source interlisted assembly file
--src_interlist,-s Generate interlisted assembly file
--asm_define,-ad=NAME[=value]
Pre-define assembly symbol NAME
--asm_undefine,-au=NAME Undefine assembly symbol NAME
--absolute_listing,-aa Generate absolute listing file
--asm_cross_reference_listing
Generate cross reference assembly listing file
--asm_dependency,-apd[=filename]
Generate assembly dependency information
--asm_includes,-api Generate first-level assembly include file list
--flash_prefetch_warn Assembler warnings for F281X BF flash prefetch
issue
--preproc_asm,-mx Preprocess assembly source, expand macros.
File Type Specifier Options:
--asm_file,-fa=filename File is an assembly file (default for .asm)
--c_file,-fc=filename File is a C file (default for .c/no ext)
--cpp_file,-fp=filename File is a C++ file (default for .C .cpp .cc)
--obj_file,-fo=filename File is an object file (default for .obj)
Directory Specifier Options:
--abs_directory,-fb=dir Absolute listing directory (default is .obj dir)
--asm_directory,-fs=dir Assembly file directory (default is .)
--list_directory,-ff=dir Listing/xref file directory (default is .obj
dir)
--obj_directory,-fr=dir Object file directory (default is .)
--output_file,-fe=filename Compilation output file name, can override
--obj_directory
--pp_directory=dir Preprocessor file directory (default is .)
--temp_directory,-ft=dir Temporary file directory (default is .)
Default File Extensions Options:
--asm_extension,-ea=.ext Extension for assembly files (default is .asm)
--c_extension,-ec=.ext Extension for C files (default is .c)
--cpp_extension,-ep=.ext Extension for C++ files (default is .cpp)
--listing_extension,-es=.ext Extension for listing files (default is .lst)
--obj_extension,-eo=.ext Extension for object files (default is .obj)
Internal Support Options:
--lfu_default[=none,preserve]
Default behavior of symbols for Live Firmware
Update (argument optional, defaults to:
preserve)
--lfu_reference_elf,-lfu=path
Path to reference ELF executable for Live
Firmware Update
Command Files Options:
--cmd_file,-@=filename Read options from specified file
Supplemental Information Options:
--gen_cross_reference_listing
Output cross reference listing to .crl file
--gen_opt_info,-on=0-2 Generate optimizer information file at level
[0-2]
--gen_preprocessor_listing Output preprocessor listing to .rl file
--section_sizes[=on,off] Output section size summary information.
(argument optional, defaults to: on)
Miscellaneous Options:
--parallel[=parallelism] Allow parallel compilation up to this many
threads (argument optional, defaults to: 0)
The following Linker options can be specified following the -z
option. Linking is only enabled if -z is used and -c is not:
Basic Options:
--emit_references:file=file Specify the output path for section dependence
information
--emit_references:format=TEXT
Specify the format for section reference
information
-m,--map_file=file Link information (map) listed into <file>
-o,--output_file=file Specify output file name
--heap_size,-heap,--heap=size
Heap size for C/C++ dynamic memory allocation
--stack_size,-stack,--stack=size
Set C system stack size
--warn_sections,-w Warn if an unspecified output section is created
File Search Path Options:
-l,--library=file Include library file or command file as input
-i,--search_path=dir Add <dir> to library search path
--end-group End reread library group
--priority,-priority Search libraries in priority order
--reread_libs,-x Reread libraries; resolve backward references
--start-group Begin reread library group; resolve backward
references
--disable_auto_rts Disable automatic RTS selection
Command File Preprocessing Options:
--define=name=value Pre-define preprocessor macro _name_ to _value_
--undefine=name Undefine preprocessor macro _name_
--disable_pp Don't use C preprocessor for command files
Diagnostics Options:
--diag_error=id Treat diagnostic <id> as error
--diag_remark=id Treat diagnostic <id> as remark
--diag_suppress=id Suppress diagnostic <id>
--diag_warning=id Treat diagnostic <id> as warning
--diag_wrap[=on,off] Wrap diagnostic messages (argument optional,
defaults to: on)
--display_error_number Emit diagnostic identifier numbers
--emit_warnings_as_errors,-pdew
Treat warnings as errors
--issue_remarks Issue remarks
--no_demangle Don't demangle symbol names in diagnostics
--no_warnings Suppress warnings
--set_error_limit=count Set error limit to <count>
--verbose_diagnostics Verbose diagnostics
Linker Output Options:
--absolute_exe,-a Produce absolute executable object file
(default)
--ecc:data_error=(address|symbol+offset),[page,]bitmask
Introduce bit errors
--ecc:ecc_error=(address|symbol+offset),[page,]bitmask
Introduce bit errors in ECC memory
--ecc=on,off Control whether ECC generation is on or off
(when not specified, compiler defaults to
--ecc=off)
--mapfile_contents=attribute Display attribute settings in map file
--relocatable,-r Produce a relocatable output module
--run_abs,-abs Produce absolute listing file
--xml_link_info,-xml_link_info=file
Detailed link information data-base into <file>
Symbol Management Options:
--entry_point,-e=symbol Specify program entry point for the output
module
--globalize=pattern Do not localize symbols matching pattern
--hide=pattern Hide symbols matching pattern
--localize=pattern Make the symbols matching pattern local
--make_global,-g=symbol Don't make global symbol static if -h is
specified
--make_static,-h Make all global symbols static
--no_sym_merge,-b No type merging in symbolic debugging
information
--no_symtable,-s Strip symbol table and line number entries
--retain=sym_or_scn_spec Specify symbols/sections to be retained by
linker
--scan_libraries,-scanlibs Scan libraries for duplicate symbol definitions
--symbol_map=refname=defname Specify a symbol map, mapping refname to defname
--undef_sym,-u=sym Add <sym> to symbol table as an unresolved
symbol
--unhide=pattern Exclude symbols matching pattern from hiding
Runtime Environment Options:
--arg_size,--args=size Set C argc/argv memory size
--cinit_compression[=rle,lzss,off]
Compress ELF C style auto initialization data
(argument optional, defaults to: lzss)
--copy_compression[=rle,lzss,off]
Compress ELF sections copied using copy tables
(argument optional, defaults to: lzss)
--fill_value,-f=value Default fill value for holes in output sections
--ram_model,-cr Link using RAM autoinitialization model
--rom_model,-c Link using ROM autoinitialization model
Miscellaneous Options:
--compress_dwarf[=on,off] Aggressively reduce size of the DWARF
information (argument optional, defaults to:
on)
--disable_clink,-j Disable conditional linking and ignore .clink
--linker_help,-help,--help Display usage information
--preferred_order=function Add <function> to preferred placement order list
--unused_section_elimination[=on,off]
Eliminate sections not needed in the executable
(argument optional, defaults to: on)
--zero_init[=on,off] Zero initialize ELF uninitialized sections
(argument optional, defaults to: on)
Post-link optimization Options:
--no_postlink_across_calls,-nf
Disable post-link optimizations across functions
--plink_advice_only Only add comments in plink without modifying the
program
--postlink_exclude,-ex Exclude files from post-link pass
--postlink_opt,-plink Post-link optimizations (only after -z)

BIN
lib/IQmath_fpu32.lib Normal file

Binary file not shown.

BIN
lib/IQmath_fpu32_coff.lib Normal file

Binary file not shown.

BIN
lib/rts2800_fpu32.lib Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +1,15 @@
//#include "DSP28x_Project.h" // Device Headerfile and Examples Include File
#include "DSP28x_Project.h" // Device Headerfile and Examples Include File
#define EXAMPLE1 0 // Use DATA registers to toggle I/O's
#define EXAMPLE1 1 // Use DATA registers to toggle I/O's
#define EXAMPLE2 0 // Use SET/CLEAR registers to toggle I/O's
#define EXAMPLE3 0 // Use TOGGLE registers to toggle I/O's
/*
void delay_loop(void);
void Gpio_select(void);
void Gpio_example1(void);
void Gpio_example2(void);
void Gpio_example3(void);
*/
//
// Main
//
@ -20,25 +20,25 @@ void main(void)
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
//
// InitSysCtrl();
InitSysCtrl();
//
// Step 2. Initialize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
//
// InitGpio(); // Skipped for this example
//InitGpio(); // Skipped for this example
//
// For this example use the following configuration
//
// Gpio_select();
Gpio_select();
//
// Step 3. Clear all interrupts and initialize PIE vector table
// Disable CPU interrupts
//
// DINT;
DINT;
//
// Initialize PIE control registers to their default state.
@ -46,13 +46,13 @@ void main(void)
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
//
// InitPieCtrl();
InitPieCtrl();
//
// Disable CPU interrupts and clear all CPU interrupt flags
//
// IER = 0x0000;
// IFR = 0x0000;
IER = 0x0000;
IFR = 0x0000;
//
// Initialize the PIE vector table with pointers to the shell Interrupt
@ -62,13 +62,13 @@ void main(void)
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
//
// InitPieVectTable();
InitPieVectTable();
//
// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP2833x_InitPeripherals.c
//
// InitPeripherals(); // Not required for this example
//InitPeripherals(); // Not required for this example
//
// Step 5. User specific code:
@ -102,7 +102,7 @@ void
delay_loop()
{
volatile long i;
for (i = 0; i < 1000000; i++)
for (i = 0; i < 10000000; i++)
{
}
@ -111,7 +111,7 @@ delay_loop()
//
// Gpio_example1 -
//
/*
void Gpio_example1(void){
//
// Example 1: Toggle I/Os using DATA registers
@ -200,7 +200,7 @@ void Gpio_select(void) {
GpioCtrlRegs.GPBDIR.all = 0x0000000F; // All outputs
EDIS;
}
*/
//
// End of File
//