cancel
Showing results for 
Search instead for 
Did you mean: 

STM Studio and elf file from GNU ARM eabi 4.8

tichytomas
Associate II
Posted on November 01, 2014 at 12:03

Hi all,

I have issue with importing variables in to STM Studio 3.3. Import shows me only few variables (usually only uint8_t type), rest variables of different types (uint16_t, uint32_t ..) are not in list. Elf file compiled by ARM GNU eabi 4.8 2014q2 from Coocox IDE same as map file shows address of all variables. I can read them to stm studio, but I have to fill variable address and size manually and after some modification in program I have to do it again.

So I think that there is some noncompatibility between elf file and import method.

Does anyone knows what to do to produce compatible elf file with stm studio?

Elf file decoded header (part of it - variables are there)

[  172] 08000919 00000002 FUNC    WEAK         1 TIM6_DAC_IRQHandler

[  173] 08000129 00000018 FUNC    GLOBAL       1 RCC_APB1PeriphClockCmd

[  174] 08000571 00000164 FUNC    GLOBAL       1 PrepniStringy

[  175] 200000aa 00000002 OBJECT  GLOBAL       3 VCSNapeti

[  176] 080000f9 00000018 FUNC    GLOBAL       1 RCC_AHBPeriphClockCmd

[  177] 08000919 00000002 FUNC    WEAK         1 EXTI2_3_IRQHandler

[  178] 08000919 00000002 FUNC    WEAK         1 I2C2_IRQHandler

[  179] 08000a05 00000014 FUNC    GLOBAL       1 DMA_GetFlagStatus

[  180] 08000919 00000002 FUNC    WEAK         1 TIM17_IRQHandler

[  181] 08000919 00000002 FUNC    WEAK         1 RTC_IRQHandler

[  182] 200000c0 00000000 NOTYPE  GLOBAL       3 _ebss

[  183] 08000c79 0000007c FUNC    GLOBAL       1 TIM_OC1Init

[  184] 080008cd 00000034 FUNC    WEAK         1 Reset_Handler

[  185] 080004b9 00000060 FUNC    GLOBAL       1 DMA_Config

[  186] 20000094 00000004 OBJECT  GLOBAL       3 Timer

[  187] 20000098 00000001 OBJECT  GLOBAL       3 Latch

[  188] 20000000 00000002 OBJECT  GLOBAL       2 LastVDIM

[  189] 08000e90 00000038 OBJECT  GLOBAL       1 CurrentTableMax

Part of map file (part of it - again variables are listed there):

 *(.bss*)

 .bss           0x20000088        0x4 ..\obj\hw_config.o

                0x20000088                SystemTimer

 .bss           0x2000008c       0x10 ..\obj\main.o

                0x2000008c                VstupniNapeti

                0x20000090                StavLEDStringu

                0x20000094                Timer

                0x20000098                Latch

 *(COMMON)

 COMMON         0x2000009c       0x24 ..\obj\main.o

                0x2000009c                VrefInt

                0x2000009e                PredchoziNapeti1

                0x200000a0                krk

                0x200000a4                Timer200ms

                0x200000a8                PredchoziNapeti1a

                0x200000aa                VCSNapeti

                0x200000ac                PredchoziNapeti2a

                0x200000ae                VCSResistor

                0x200000b0                PredchoziNapeti2

                0x200000b2                VDIM

                0x200000b4                ADCDataValues

 

Imported result in STM studio (complete - so except few variables everything is missing :( )

stm32f0xx_rcc.c (C:\Tomas\ARMC\LinearLedDriver\1\stm32_lib\src) APBAHBPrescTable[0] 0x0 unsigned 8-bit

hw_config.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) Tlacitka[0].Stav 0x0 unsigned 8-bit

hw_config.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) Tlacitka[0].Zmena 0x1 unsigned 8-bit

hw_config.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) Tlacitka[0].PredStav 0x4 unsigned 8-bit

main.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) Latch 0x20000098 unsigned 8-bit

main.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) StavLEDStringu 0x20000090 unsigned 8-bit

main.c (C:\Tomas\ARMC\LinearLedDriver\1\Source\src) krk 0x200000a0 unsigned 8-bit

system_stm32f0xx_temp.c (C:\Tomas\ARMC\LinearLedDriver\1\cmsis_boot) AHBPrescTable[0] 0x20000074 unsigned 8-bit

#stm32 #stm-studio #gnu
4 REPLIES 4
S C
ST Employee
Posted on November 04, 2014 at 17:16

Hello,

The STMStudio was not validated with such elf file, so most probably the file is badly parsed. May you please post a little example (elf file only) for us to investigate ? Thank you !

Meanwhile, if your linker provides such kind of functionality, you might try to change the format for debugging information, just in case they are better parsed by the STMStudio v3.3.

Best regards
tichytomas
Associate II
Posted on November 05, 2014 at 14:52

Hi SC,

I tried to modify format of elf file, but I was not successful. I attached some sample elf file.

Thanks for your interest,

Regards,

Tomáš

S C
ST Employee
Posted on November 05, 2014 at 16:33

Hello,

Thank you for the elf file, it effectively shows a syntax not managed by STMStudio v3.3 and not faced with other supported compilers. Please find in attachment a beta version of a v3.4 fixing this (zip file with 2 jar files to extract in ''Program Files''\STMicroelectronics\STMStudio).

Note that this version has not been validated, however modifications are localized.

I hope this will help

Best regards

________________

Attachments :

STMStudioV3.4Beta.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzTJ&d=%2Fa%2F0X0000000bMJ%2FdF7VBk4GO21jpMA_YyJhkVjAxAwUEfWM7NvMooCCZrE&asPdf=false
tichytomas
Associate II
Posted on November 05, 2014 at 16:47

Hi SC,

thank you for your great support. Modified files work well.

Best Regards,

Tomáš