Hardware Reference
In-Depth Information
data
The amount of space used by initialized data, which are variables that have a specific
value assigned to them at startup (for example, int16_t i = 1023 , which is ini‐
tialized to a specific value). Everything in this section will be stored in flash and
then copied to SRAM, which is usually a precious resource on most small micro‐
controllers.
bss
The amount of space used by uninitialized data, which are variables that don't have
a value assigned to them (for example, int16_t i , which has no value assigned to
it). Everything in this section will be allocated in SRAM.
dec
The size of all data combined, including both flash and SRAM data.
The last two lines are the output from a helpful tool called arm-none-eabi-objcopy ,
which converts the .out file into other file formats that third-party tools might find easier
to work with, including Intel Hex, which is a common file format when working with
embedded systems.
Writing to the nRF51822
To write your program code to the non-volatile memory on the development board in
the nRF51822-EK, you can use Nordic's nRFGo Studio utility, which is available on the
same MyPages section of Nordic's website where you downloaded the SDK and Soft‐
Device (in “nR51822 GNU Codebase Structure” on page 150 ).
nRFGoStudio is currently a Windows-only tool, but Roland King has
created an OS X alternative called rknrfgo . This unoffical applica‐
tion implements a subset of the functionality provided by nRFGo
Studio, allowing you to program the flash memory on the nRF51822
using an easy-to-use GUI.
You can also program the flash memory on the nRF51822 directly
from the command-line on Windows, OS X, or Linux using Seg‐
ger's J-Link drivers and the associated tools. Documentation and ex‐
amples of how to work with the J-Link are available on Segger's web‐
site .
If this is the first time that you are using your development board, you will need to write
the SoftDevice .hex file to flash first. This writes Nordic's BLE stack to the lower half of
flash memory on the device. To do this, find the .hex file for your SoftDevice (which
was downloaded from Nordic's website as part of the SoftDevice package) and select it
in the Program SoftDevice tab of nRFGoStudio, as shown in Figure 10-6 .
Search WWH ::




Custom Search