[SOLVED] on gcc compiler, i have a source code which has obect file i.e., .o file already generated need to generate executable in .bin format help.
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
on gcc compiler, i have a source code which has obect file i.e., .o file already generated need to generate executable in .bin format help.
i have following error while generating the executables.
/usr/bin/ld: a9gprs.o: Relocations in generic ELF (EM: 40)
a9gprs.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
and i have following content in my obj folder.
a9gprs.o cpu_comp.o gpio.o modbus.o stm32f0xx_exti.o stm32f0xx_misc.o stm32f0xx_spi.o stm32f0xx_wwdg.o uart.o
assert.o cpu.o hooks.o startup_stm32f0xx.o stm32f0xx_flash.o stm32f0xx_pwr.o stm32f0xx_syscfg.o syscalls.o
boot.o delay.o led.o stm32f0xx_dbgmcu.o stm32f0xx_gpio.o stm32f0xx_rcc.o stm32f0xx_tim.o system_stm32f0xx.o
com.o _exit.o main.o stm32f0xx_dma.o stm32f0xx_i2c.o stm32f0xx_rtc.o stm32f0xx_usart.o timer.o
please tell me the command to execute them.
From the message, it appears that you have a faulty .o file and need to check your source code for that item and recompile after fixing things, but that is just a first guess based on the error message. What we KNOW from that message is that the .o file is not correct.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.