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.
Hi,
I am trying to use rts2800_fpu32_fast_supplement.lib from C2000Ware 5.0 in my project to speed up logf() calculation, but am getting "error: creating output section "FPUmathTables" without a SECTIONS specification".
Unfortunately, I do not find any 280049 cmd files with FPUmathTables.
There are cmd files for 28001x, 28002x, 28003x.
So my question is:
Does the 280049 have the FPUmathTables for logf() in ROM?
If yes: Where are they located?
If no: Do I have to add them in Flash and possibly copy to RAM? Where is this described?
Are there any linker command files that I can use as reference?
Thanks in advance,
Stephan
Hello Stephan,
Where is this described?
Are there any linker command files that I can use as reference?
You can refer to the FPUfastRTS examples located in C2000Ware_5_00_00_00\libraries\math\FPUfastRTS\c28\examples. I tested this out, as long as you adjust the names of the memory sections appropriately in the command linker file, there are no errors.
Does the 280049 have the FPUmathTables for logf() in ROM?
If yes: Where are they located?
I will forward this question to a boot ROM expert.
Best regards,
Omer Amir
Hi Stephan,
Sorry for the delay in my response.
So, a few questions:
1. can you try adding this to the CMD file under SECTIONS{}: "FPUmathTables : > FLASH_BANK0_SEC4" ?
2. When I tried building without the CMD edit, I could still see the tables in the map file. Can you please check your map file?
3. The logf() is part of the math.h library and will be placed in your standard code space as per the linker CMD file. Are you looking for something other than this?
-Kedar
Hi Kedar,
let me try to explain:
We are using logf() in a time critical environment, so we do not want to use the default logf() from the rts2800_fpu32.lib which takes approx. 420 cycles.
This is the reason for using rts2800_fpu32_fast_supplement.lib that is supposed to take only 51 cycles.
We are building via dedicated makefile (gnu make), not via CCS.
Regarding your questions:
1. When using rts2800_fpu32_fast_supplement.lib and adding FPUmathTables to the cmd file (FLASH), the project is built.
We get something like
.text 0 00082c20 00006c2a
000880d0 00000038 rts2800_fpu32_fast_supplement.lib : log_f32.obj (.text)
FPUmathTables
* 0 0008becc 0000018e
0008becc 000000d0 rts2800_fpu32_fast_supplement.lib : logtable_f32.obj (FPUmathTables)
0008bf9c 000000be : exptable_f32.obj (FPUmathTables)
So everything is fine, but it takes 72 instead of the expected 51 cycles.
2. When using rts2800_fpu32_fast_supplement.lib without adding FPUmathTables to the cmd file, we get
"error: creating output section "FPUmathTables" without a SECTIONS specification",
no outfile is generated.
3. When using the default logf() from the rts2800_fpu32.lib, we get something like
000854bc 0000012a rts2800_fpu32.lib : e_logf.obj (.text)
without errors, but with an execution time of 420 cycles.
For many other controllers, I find cmd files with
MEMORY
{
PAGE 0 :
FPUTABLES : origin = 0x3FD860, length = 0x0006A0
...
}
SECTIONS
{
FPUmathTables : load = FPUTABLES, PAGE = 0
...
}
So my question was if the 28004x also has FPUTABLES in ROM and if so where.
Best regards,
Stephan
I found an example here:
\\\C2000Ware_5_00_00_00\libraries\math\FPUfastRTS\c28\examples\log_f32
Can you see if this works for you? This is from the C2KWare.
-Kedar
Hmm, I see cmd files for
f280013x
f280015x
f2838x
f28003x
f28002x
but none for f28004x....
Hi Stephan.
I will check this with the internal teams. But to unblock your case, you just need to add the corresponding lines under MEMORY{} and SECTIONS{} in your selected CMD file and link the FPUfastRTS library in your linker options.
-Kedar
Hi Kedar,
that's what I already did, and it's working with FPUmathTables in Flash (taking more cycles than expected).
For the remaining question
"Does the 280049 have the FPUmathTables for logf() in ROM? If yes: Where are they located?",
I will wait for your internal teams check result.
Best regards,
Stephan
Hi Stephan,
Sorry for the delay. The logf() is not part of the BootROM. The BootROM contains tables related to math libraries that the library here uses : C2000Ware_5_00_00_00\libraries\boot_rom\f28004x\revB\rom_symbol_libs\ROM_API
-Kedar