This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069M: Is there an IQmath library for 'F2806xM Devices?

Part Number: TMS320F28069M
Other Parts Discussed in Thread: C2000WARE, MOTORWARE

I'm trying to use the IQmath library from C2000ware v1.00.06.00 with TMS320F28069M and I'm having trouble. Is this library compatible with the 'F28069M device? If not, is there another version of the library that can be used with that device?

I'm testing with the 28069_IQsampleC example project but I updated the linker command file with the '28069M ROM addresses from the TRM for the IQTables regionss. However, the IQ function calls are still not linking to the correct addresses, causing problems at runtime. After debugging this further I think the library has hardcoded "abs" addresses for certain function symbols. For example see the address of the __IQ24mag function in the screenshot below from the map. I am attaching my linker command file and map file for your reference.

28069_IQmath_lnk2.cmd.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
//###########################################################################
//
// FILE: 28069_IQmath_lnk.cmd
//
// TITLE: Linker Command File For IQmath examples that run out of RAM
//
// NOTE; The example project uses memory protected by the
// Code Security Module (CSM). Make sure the CSM is
// unlocked before you load the project. One quick way
// to do this on an erased device is to open a memory
// window to the CSM password locations. If these locations
// read back 0xFFFF (or non-zero), then the CSM is unlocked:
//
// Device Password locations
// 28027: 0x3F7FF8 - 0x3F7FFF
//
//
//###########################################################################
// $TI Release: C28x IQmath Library v1.60.01.00 $
// $Release Date: Thu Oct 18 15:53:01 CDT 2018 $
// $Copyright: Copyright (C) 2014-2018 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
*/
MEMORY
{
PAGE 0 :
/* IQTABLES, IQTABLES2 and IQTABLES3 are part of the boot ROM.
The boot ROM is available in both program or
data space so this can be defined on page 0 or page 1
*/
IQTABLES : origin = 0x3FDC30, length = 0x000b50
IQTABLES2 : origin = 0x3FE780, length = 0x00008C
IQTABLES3 : origin = 0x3FE80C, length = 0x0000AA
BEGIN : origin = 0x000000, length = 0x000002
RAMM0 : origin = 0x000002, length = 0x0003FE
RAML0 : origin = 0x008000, length = 0x000800
RAML3 : origin = 0x009000, length = 0x001000
RESET : origin = 0x3FFFC0, length = 0x000002
PAGE 1 :
RAML1L2 : origin = 0x008800, length = 0x000800
BOOT_RSVD : origin = 0x000400, length = 0x000080 /* Part of M1, BOOT rom will use this for stack */
RAMM1 : origin = 0x000480, length = 0x000380 /* on-chip RAM block M1 */
}
SECTIONS
{
/* IQmath inclues the assembly routines in the IQmath library
IQmathTables is used by division, IQsin, IQcos, IQatan, IQatan2
this is in boot ROM so we make it NOLOAD. Using
the ROM version saves space at the cost of 1 cycle
per access (boot ROM is 1 wait).
IQmathTablesRam is used by IQasin, IQacos, and IQexp
Noticed these tables are linked seperatly since they are from
two source files within the library.
*/
IQmath : > RAML3, PAGE = 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
28069_IQsampleC2.map.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
******************************************************************************
TMS320C2000 Linker PC v18.1.3
******************************************************************************
>> Linked Tue Dec 18 16:44:00 2018
OUTPUT FILE NAME: <28069_IQsampleC.out>
ENTRY POINT SYMBOL: "code_start" address: 00000000
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
PAGE 0:
BEGIN 00000000 00000002 00000002 00000000 RWIX
RAMM0 00000002 000003fe 0000001f 000003df RWIX
RAML0 00008000 00000800 000002d1 0000052f RWIX
RAML3 00009000 00001000 000001c5 00000e3b RWIX
IQTABLES 003fdc30 00000b50 00000000 00000b50 RWIX
IQTABLES2 003fe780 0000008c 00000000 0000008c RWIX
IQTABLES3 003fe80c 000000aa 00000000 000000aa RWIX
RESET 003fffc0 00000002 00000000 00000002 RWIX
PAGE 1:
BOOT_RSVD 00000400 00000080 00000000 00000080 RWIX
RAMM1 00000480 00000380 00000190 000001f0 RWIX
RAML1L2 00008800 00000800 000003ce 00000432 RWIX
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
IQmath 0 00009000 000001c5
00009000 0000009d IQmath_fpu32.lib : IQ24log.obj (IQmath)
0000909d 00000088 : IQ24atan2PU.obj (IQmath)
00009125 00000052 : IQ24asin.obj (IQmath)
00009177 0000003d : IQ24exp.obj (IQmath)
000091b4 00000011 : IQ24mpyI32int.obj (IQmath)
codestart
* 0 00000000 00000002
00000000 00000002 CodeStartBranch.obj (codestart)
.cinit 0 00000002 0000001f
00000002 0000000e rts2800_fpu32.lib : exit.c.obj (.cinit)
00000010 00000005 IQsampleSmall.obj (.cinit)
00000015 00000005 rts2800_fpu32.lib : _lock.c.obj (.cinit:__lock)
0000001a 00000005 : _lock.c.obj (.cinit:__unlock)
0000001f 00000002 --HOLE-- [fill = 0]
.text 0 00008000 000002d1
00008000 0000012b IQsampleSmall.obj (.text)
0000812b 00000083 rts2800_fpu32.lib : fd_mpy28.asm.obj (.text)
000081ae 00000056 : boot28.asm.obj (.text)
00008204 00000029 : exit.c.obj (.text)
0000822d 00000024 : cpy_tbl.c.obj (.text)
00008251 0000001f : fd_tol28.asm.obj (.text)
00008270 0000001d : memcpy.c.obj (.text)
0000828d 00000019 : args_main.c.obj (.text)
000082a6 00000017 : u_tofd28.asm.obj (.text)
000082bd 00000009 : _lock.c.obj (.text)
000082c6 00000008 CodeStartBranch.obj (.text)
000082ce 00000002 rts2800_fpu32.lib : pre_init.c.obj (.text)
000082d0 00000001 : startup.c.obj (.text)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    I will look into this issue and get back to you by tomorrow.

    Thanks,
    Sira
  • Hi,

    I see the issue you are mentioning. The IQMath tables (and possibly the selected IQMath functions) in the BOOT ROM are located at different locations between the 28069 and 28069M device, yet when the example project is built, I see the locations of the IQMath tables and these selected IQMath functions are identical between the 2 devices.

    I suspect this is occurring because the project links to an IQMath Boot ROM symbol library (2806x_IQmath_BootROMSymbols_fpu32.lib) that tells it where it can find the tables and selected functions. This library is located at

    C:\ti\c2000\C2000Ware_1_00_06_00\libraries\boot_rom\f2806x\v1_1\rom_symbol_libs\IQmath

    I tried to check how this library file is built, and think the corresponding source is present at
    C:\ti\c2000\C2000Ware_1_00_06_00\libraries\boot_rom\f2806x\v1_1\rom_sources

    I launched this project (2806x_boot_rom) in CCS, but building it results in errors (error: cannot find file
    "Flash2806x_API_V100.lib"). However, if you expand the project view and expand "lnk", you will see the file TMS320x2806x_boot_rom_lnk.cmd, which contains the locations of the IQMath tables. I believe this is where the corresponding addresses of the 28069M device will have to be entered, and the library rebuilt in order to generate the necessary effect.

    I will investigate how to build this Boot ROM symbols library.

    IQTABLES : origin = 0x3FDF00, length = 0x000b50
    IQTABLES2 : origin = 0x3FEA50, length = 0x00008C
    IQTABLES3 : origin = 0x3FEADC, length = 0x0000AA

    Thanks,
    Sira
  • Sira,

    Thank you for the quick and helpful reply. Before posting this I tried the E2E search engine and didn't find anything, but afterwards I searched with google and found several similar E2E posts. This post in particular points out that the symbols library from motorware 1-01-00-18 is properly built for 'F28069M. I'll try this and will report back.

    Ruben

  • Ruben,

    Thank you for the update. Please do follow up, and if your issue is resolved, please do click on "Verified Answer" so the issue is closed.

    Thanks,
    Sira
  • This problem is resolved when using the 2806xRevB_IQmath_BootROMSymbols_fpu32.lib from motorware 1-01-00-18. The library is located at this path: C:\TI\motorware\motorware_1_01_00_18\sw\modules\fast\lib\32b\f28x\f2806x

    Thanks