2

Th nm source.o gives unknown symbols:

F:\STM32CubeIDE\LMS\ANC_fxlms_v1\Debug\Core\Src>nm FX_LMS.o
00000000 b $d
00000298 t $d
00000000 b $d
000000b4 t $d
00000000 b $d
00000544 t $d
00000024 t $d
00000000 b $d
000002b0 t $d
00000000 d $d
000001f8 t $d
00000000 b $d
00000178 t $d
00000000 b $d
00000000 b $d
00000000 b $d
000000f0 t $d
00000000 b $d
00000058 t $d
00000000 b $d
00000000 b $d
00000000 b $d
00000000 b $d
00000000 b $d
00000050 t $d
00000000 b $d
000005ec t $d
00000000 b $d
00000664 t $d
00000000 b $d
00000000 b $d
0000003c t $d
00000000 t $t
.
.
.
00000000 t $t
00000000 t $t
         U ADC_DMAError
         U ADC_Enable
00000001 T ADC_Start_DMA_double
0000010c d aecho.0
.
.
.

I want to know the meaning of the $d and $t symbol. What is that? What is a reference that explain those? This is the compiled C source from eclipse (STM32cubeIDE on Windows 10 64-bit).

The maybe important build commands copied from eclipse console:

21:04:01 **** Incremental Build of configuration Debug for project ANC_fxlms_v1 ****
make -j8 all 
arm-none-eabi-gcc "../Core/Src/FX_LMS.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DARM_MATH_CM7 -DUSE_HAL_DRIVER -DSTM32H743xx -c -I../Core/Inc -I"F:/STM32CubeIDE/LMS/ANC_fxlms_v1/Core/Inc/drv" -I"F:/STM32CubeIDE/LMS/ANC_fxlms_v1/Drivers/CMSIS/DSP/Include" -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/FX_LMS.d" -MT"Core/Src/FX_LMS.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/FX_LMS.o"

and here is the source:

mohammadsdtmnd
  • 330
  • 1
  • 11
  • Your question would be better if you posted the output as text instead of as an image. Also, it would help if you could include both the original source code and the compile command(s) used to create the object file. With the image of the output, you're likely to get some downvotes. – Andrew Henle Jan 01 '23 at 17:24
  • @AndrewHenle Thx for helping. The source code is about 500 line and the site doesn not allow me to append that in text codes appended. – mohammadsdtmnd Jan 01 '23 at 17:46
  • 3
    You probably don't need 500 lines of code to create something that has similar output, but smaller. – Andrew Henle Jan 01 '23 at 18:05
  • You might want to look into the assembly intermediate representation of your code. These could be symbols automatically generated by the compiler, for example for local references or sections. – the busybee Jan 01 '23 at 21:12
  • Does `arm-none-eabi-nm` give the same output? – KamilCuk Jan 02 '23 at 22:53
  • @KamilCuk Oh! what is that? I've installed that using msys2. Now there is no doller signed unknown symbol. You can answer the question to accept. – mohammadsdtmnd Jan 03 '23 at 05:54

1 Answers1

1

You compiled the file for ARM architecture.

nm is for your local architecture. So most probably x86-64-pc-linux-gnu-nm or something like that.

arm-none-eabi-nm is for ARM architecture.

The endianess or some other quirks in the exact specification of ELF file may differ between architectures, which is most probably why you are seeing such artifacts.

KamilCuk
  • 120,984
  • 8
  • 59
  • 111