Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:03:56+00:00 2026-06-15T08:03:56+00:00

Normal ARM cross-compilation for ARM microncontrollers generally consists of three or four steps: Use

  • 0

“Normal” ARM cross-compilation for ARM microncontrollers generally consists of three or four steps:

  1. Use an assembler to assemble the startup code (if it is assembly) into an object file
  2. Use a compiler to compile any source code into object files
  3. Use a linker to link the object files into an .elf file
  4. Use objcopy to convert the .elf file into a .hex file
  5. Flash the .hex file

It is step #4 that I am unsure about. In the documentation for OpenOCD’s flash write_image command, it states:

The file [type] can be specified explicitly as bin (binary), ihex (Intel hex), elf (ELF file), s19 (Motorola s19). mem, or builder.

It is clear that OpenOCD supports elf files, but I don’t know what this actually means. Is this only supported on some targets? Must the JTAG/SWD adapter provide some sort of objcopy-like functionality for this to work? Is it simply a holdover from the days when OpenOCD did not yet support elf files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:03:57+00:00Added an answer on June 15, 2026 at 8:03 am

    file formats that include address and data like elf, ihex, srec are good to use, I use elf primarily. .bin file doesnt carry the address so you 1) have to specify the starting address 2) objcopy pads gaps between defined areas which can create problems as well as take more loading time, etc.

    Using a .bin leaves room for human error on the address. Unfortunately I have had situations where a combination of .elf and openocd will load a the wrong address or at least print the wrong address when loading.

    I use .elf files wherever possible. .hex or .srec if the utility does not support elf but supports ihex or srec. And .bin for example when using x/y/zmodem loaders.

    I would assume that openocd is layered, that there is a front end that reads the files and by the time it gets to the backend, the jtag or whatever the backend doesnt know what kind of file the data originated from. I dont know for a fact but assume…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read that 'Normal' ARM instructions are fixed length - 32 bits. And
I need to write simple routine in iphone arm assembly (under xcode 4) (normal
In normal CSS, the below code is working :root #element { color:pink \0/IE9; }
On normal JVMs you can use META-INF/MANIFEST.MF to declare application properties, in J2ME you
All, I'm trying to modify a Makefile to use a embedded cross compiler instead
normal way: for x in myList: myFunc(x) you must use a variable x use
Normal proxies (ex: 72.41.132.22:3128 ) work well with cURL, however when I use SOCKS
For normal source code projects, when you ask Visual Studio to build the project
For normal html-tables I use $('table.alt tr:even').addClass('bg'); for striping the table. But obviously that
One normal procedure to implement debugging is the use of #ifdef DEBUG ...debugging tests...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.