Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 12 months ago.
Size of hex files
If I compiling a simple blinky code for my RedBearLab nRF51822 and download it from the Online-Compiler, the *.hex files size is about more than 250kB. Why this need so much space? Or the MBED HDK don't flash the whole file to the target chip?
1 Answer
9 years, 11 months ago.
I guess there are a couple of things to note about the hex files for the nRF51822 parts:
- If you open the .hex file in your favorite text editor you will notice that it is text and not binary. Each byte of your program's image is represented by 2 hex digits. This means that your actual binary is at maximum half the size of your .hex, so 125kB in your case. The actual binary size is even smaller since there is additional overhead per line of hex data.
- Unless you are using the Firmware Over The Air method of updating your device, the SoftDevice is always merged into the final hex image. So even if your program was just a few kB on its own, the SoftDevice will add an additional 84 or so kB to the final image.
I hope that helps,
Adam
that makes sense. do you happen to know how one would convert this hex to the format required by the OTA DFU loader for NRF?
posted by 20 Dec 2014I haven't used the FOTA feature but you can check out the following links:
https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5169/
http://developer.mbed.org/platforms/Nordic-nRF51822-FOTA/