sdu
Posts: 6
Joined: Mon Dec 02, 2019 3:46 am

.c file with AVR-GCC (terminal) in .s file (Raspberry Pi 3, bate metal programming)

Mon Dec 02, 2019 1:55 pm

Hi,

how can i compile/convert the .c file with avr-gcc in terminal to file.s?

Code: Select all

avr-gcc -g -Os -mmcu=atmega32 -c led.c
avr-gcc -g -mmcu=atmega32 -o led.elf led.o
avr-objcopy -j .text -j .data -O ihex led.elf led.hex
This get the .elf & .hex but i cant use it, cause i need the kernel.img for the Raspberry pi 3 (bate metal programming)

User avatar
mline
Posts: 1422
Joined: Sun Jan 27, 2013 1:47 pm
Location: Austria, Vienna

Re: .c file with AVR-GCC (terminal) in .s file (Raspberry Pi 3, bate metal programming)

Mon Dec 02, 2019 2:05 pm

avr-gcc ist nur für AVR. Mit dem kannst du keine Programme für die Raspberry Pi schreiben
<~~>

sdu
Posts: 6
Joined: Mon Dec 02, 2019 3:46 am

Re: .c file with AVR-GCC (terminal) in .s file (Raspberry Pi 3, bate metal programming)

Mon Dec 02, 2019 2:10 pm

mline wrote:
Mon Dec 02, 2019 2:05 pm
avr-gcc ist nur für AVR. Mit dem kannst du keine Programme für die Raspberry Pi schreiben
Endlich klarheit! :oops:

Danke dir.

Return to “C/C++”