EmbDev.net

Forum: ARM programming with GCC/GNU tools Assembly to Machine code


Author: Nick Carter (nickx)
Posted on:

Rate this post
0 useful
not useful
izzit posible to assembler ARM assembly code to machine code only?
because i m using gcc and it producing elf format. pls help

Author: Mh Tay (lpc2103)
Posted on:

Rate this post
0 useful
not useful
Nick Carter wrote:
> izzit posible to assembler ARM assembly code to machine code only?
> because i m using gcc and it producing elf format. pls help

Install the WinARM package. Default makefile of the WinARM examples
generate the .bin file. Those are the machine codes. (I do not think
I edited the makefile)

One thing I still do not know/understand is:
- I've been working on LPC21xx.  I usually convert the .bin file
  to .h file and compile with my windows VC++ custom loader
  program.  VC++ program then downloaded the ARM code onto the
  LPC21xx without any problem as the LPC21xx codes always start
  at address=0
- Now I'm working on the AT91Sam7x.  The lwip demo program also
  generates a .bin file of about 100K+ bytes.  I use Samba to
  burn the .bin file onto the Sam7x-EK and it works fine.  Samba
  powers up with a default flash programming location of 0x100000

New Questions:
- This binary file generated for both LPC21xx and AT91Sam7x
  should be pure machine codes, right?
- There should be no load information inside the .bin file, right?
- User must "offset" the .bin file to the target flash address
  "manually", right?
- I can take that AT91SAM7X .bin file, convert to .h file,
  compile with my VC++ program and download to my own
  custom AT91SAM loader, right? What I need to do is move
  it to target 0x100000 (1MByte for AT91Sam7x)
- Linker, when generating .bin file, took the Code offset
  location from atmel-rom.ld linker script file, right?

Regards

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.