cancel
Showing results for 
Search instead for 
Did you mean: 

Is KEIL compiled .lib file compatible with GCC objdump?

Vu.Andy
Associate III
Posted on November 12, 2016 at 23:21

After I compiled the .lib library file using KEIL tool, then using

rm-none-eabi-objdump to parse the .lib or any of the intermediate .o files, GCC objdump reports that

''File format not recognized''.

I was wondering if KEIL is compatible with GCC tools.  Or do I need to compile the .lib file with a certain option to produce GCC compatible object files?

6 REPLIES 6
Posted on November 13, 2016 at 01:37

They both use the ELF format, but the differences are nuanced, and can import chain specific library/helper functions. I wouldn't try to intermix them. I would build specific Keil, IAR and GNU/GCC libraries.

Keil has FromELF which is similar to objdump

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vu.Andy
Associate III
Posted on November 14, 2016 at 18:20

Clive1, thanks for the response.

What I am trying to do now is using KEIL but specifying the toolchain to : arm-none-eabi-gcc.

The problem now is the toolchain is having problem understanding the Include structure.  When I compile, there are error messages:

Build target 'Target 1'

compiling stm32f0xx_hal.c...

Error: arm-none-eabi-gcc: error: CreateProcess: No such file or directory

compiling I2CISLApp.c...

Error: arm-none-eabi-gcc: error: CreateProcess: No such file or directory

compiling stm32f0xx_hal_gpio.c...

Error: arm-none-eabi-gcc: error: CreateProcess: No such file or directory

For some reason, the gcc is having trouble finding the files.  Or is it something else? 

Thanks.

Posted on November 14, 2016 at 18:45

Error: arm-none-eabi-gcc: error: CreateProcess: No such file or directory

 

 

For some reason, the gcc is having trouble finding the files.  Or is it something else?  

 

Something else. Not finding the gcc executable you are specifying.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vu.Andy
Associate III
Posted on November 16, 2016 at 00:10

Thanks for your help.

I was able to compile, link and generate the .hex file.  So far I can download the .hex to the chip using ST-Link utility.

But when I use KEIL to download the binary, there is an error message:

Load ''C:\\Working\\STMMicro\\ProgramExamples\\Nucleo_F07_Examples\\STM32Cube_FW_F0_V1.6.0\\Projects\\STM32F072RB-Nucleo\\Examples\\GPIO\\GPIO_IOToggleGCC\\MDK-ARM\\Project.elf''

No Algorithm found for: 08000000H - 080024B3H

Erase skipped!

Error: Flash Download failed  -  ''Cortex-M0''

Flash Load finished at 14:13:37

Do you happen to know why?  Also, how would I go about debugging the program given GCC was used to compile the program?

Thanks.

Vu.Andy
Associate III
Posted on November 16, 2016 at 02:19

Thanks for your help I was able to get it to work, although the word ''algorithm'' is a bit misleading though. 

I went into Debug->Setting(next to STLink)->Flash Download(Tab) and then under the ''program algorithm'' selection, I then select the RAM block for download.

Actually my other question is the program I work so far is rather small, but for a large scale program, can this method be reliably done?  That is using GCC to compile and debug which is not really native to KEIL tool?  Do you happen to know any customer who is using KEIL with GCC to develop commercial programs?

Thanks.

Posted on November 16, 2016 at 18:51

Customers have wide and varied needs, I tend to be adaptive in the tools and methods I use to solve problems. I've also had to write tools to address specific requirements.

I've had occasion to use GNU/GCC compilers, and Keil debuggers, and other occasions where no source is available. Use what you are most comfortable with, and understand how it works.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..