Other Parts Discussed in Thread: HALCOGEN, UNIFLASH
Hello, I have a simular problem that the one explained in https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/917572/compiler-awr1843-interrupt-vector-table-missing-in-hex-file.
We are trying to migrate to cmake based solution and we have succeed to compile and link our already working application with cmake and armcl using a toolchain file.
When trying to run the application, we found the .intvecs sections is missing.
The compilation cmd line executed for .c files is:
C:\ti\ccs930\ccs\tools\compiler\ti-cgt-arm_18.12.4.LTS\bin\armcl.exe --compile_only --c_file=<A .C FILE> --include_path=<A INCLUDE PATH> ... --include_path=C:\ti\ccs930\ccs\tools\compiler\ti-cgt-arm_18.12.4.LTS\include -mv7R5 --code_state=32 --float_support=VFPv3D16 --define=_VFP_SUPPORT_=1 --define=_TMS570LC43x_ --define=EXTERNAL_SP_INIT --define=SL_REG_INIT_VAL=0u --c99 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=packed --parallel=8 --abi=eabi --preproc_with_compile --preproc_dependency=<A FILE PATH>.obj.d --output_file=<A FILE PATH>.obj
The compilation cmd line executed for .asm files is:
C:\ti\ccs930\ccs\tools\compiler\ti-cgt-arm_18.12.4.LTS\bin\armcl.exe --compile_only --asm_file=<A .ASM FILE> --include_path=<A INCLUDE PATH> ... -mv7R5 --code_state=32 --float_support=VFPv3D16 --define=_VFP_SUPPORT_=1 --define=_TMS570LC43x_ --define=EXTERNAL_SP_INIT --define=SL_REG_INIT_VAL=0u --c99 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=packed --parallel=8 --abi=eabi --preproc_with_compile --preproc_dependency=<A FILE PATH>.asm.obj.d --output_file=<A FILE PATH>.asm.obj
Both seems to properly compile.
The linking cmd line is
cmd.exe /C "cd . && C:\ti\ccs930\ccs\tools\compiler\ti-cgt-arm_18.12.4.LTS\bin\armcl.exe -mv7R5 --code_state=32 --float_support=VFPv3D16 --define=_VFP_SUPPORT_=1 --define=_TMS570LC43x_ --define=EXTERNAL_SP_INIT --define=SL_REG_INIT_VAL=0u --c99 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=packed --parallel=8 --abi=eabi --run_linker --output_file=PCC.out --map_file=<A FILE NAME>.map <OBJECT FILES> <LINKER CMD FILE> <LIBRARIES> C:\ti\ccs930\ccs\tools\compiler\ti-cgt-arm_18.12.4.LTS\lib\libc.a && cd ."
the linker cmd file is:
//*****************************************
// Linker Command File
//*****************************************
// This file contains the linker options to use
// it also configures the ecc, memory and sections
--retain="*(.intvecs)"
--reread_libs
--warn_sections
--ecc=on
--xml_link_info=<A NAME>_linkInfo.xml
--rom_model
--be32
--warn_sections
--rom_model
--stack_size=0x8000
--heap_size=0x8000
//--unused_section_elimination=on
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00000020 length=0x003FFFE0 vfill = 0xffffffff
STACKS (RW) : origin=0x08000000 length=0x0000b800
RAM (RW) : origin=0x0800b800 length=0x00074800
ECC_VEC (R) : origin=0xf0400000 length=0x4 ECC={ input_range=VECTORS }
ECC_FLA0 (R) : origin=0xf0400000 + 0x4 length=0x7FFFC ECC={ input_range=FLASH0 }
}
ECC
{
algo_name : address_mask = 0xfffffff8
hamming_mask = R4
parity_mask = 0x0c
mirroring = F021
}
SECTIONS
{
.intvecs : {} > VECTORS
.text align(32) : {} > FLASH0
.const align(32) : {} > FLASH0
.cinit align(32) : {} > FLASH0
.pinit align(32) : {} > FLASH0
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
}
The intvects are defined in an asm file like this:
.sect ".intvecs"
.arm
;-------------------------------------------------------------------------------
; import reference for interrupt routines
.ref _c_int00
.ref _undef
.ref _svc
.ref _prefetch
.ref _dabort
.ref phantomInterrupt
.def resetEntry
;-------------------------------------------------------------------------------
; interrupt vectors
resetEntry
b _c_int00
b _undef
b _svc
b _prefetch
b _dabort
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]
The map file does not include the intvecs section:
******************************************************************************
TI ARM Linker PC v18.12.4
******************************************************************************
>> Linked Mon Jan 9 16:59:53 2023
OUTPUT FILE NAME: <<A FILE NAME>.out>
ENTRY POINT SYMBOL: "_c_int00" address: 0001c88c
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
VECTORS 00000000 00000020 00000000 00000020 X (ffffffff)
FLASH0 00000020 003fffe0 0002422b 003dbdb5 R X (ffffffff)
STACKS 08000000 0000b800 00000000 0000b800 RW
RAM 0800b800 00074800 0000acec 00069b14 RW
ECC_VEC f0400000 00000004 00000004 00000000 R
ECC_FLA0 f0400004 0007fffc 0007fffc 00000000 R
SEGMENT ALLOCATION MAP
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00000020 00000020 00021814 00021814 r-x
00000020 00000020 00021814 00021814 r-x .text
00021840 00021840 0000294f 0000294f r--
00021840 00021840 0000294f 0000294f r-- .const
000241a0 000241a0 000000c8 000000c8 r--
000241a0 000241a0 000000c8 000000c8 r-- .cinit
0800b800 0800b800 0000acf0 00000000 rw-
0800b800 0800b800 00009734 00000000 rw- .bss
08014f38 08014f38 000015b8 00000000 rw- .data
f0400000 f0400000 00080000 00080000 r--
f0400000 f0400000 00000004 00000004 r-- .ecc0
f0400004 f0400004 0007fffc 0007fffc r-- .ecc1
Defining _intvecs as mentioned in the previous post is not helping me. Any clue would be really appreciated!
Thanks in advance