5.1 Building the Firmware
Perform the following steps in Atmel Studio 7 to build the firmware for EndDevice_Demo.
- Open Atmel Studio and select
File > New > Example Project
.Figure 5-1. Opening an Example Project in Atmel Studio - In the New Example Project from ASF or the Extensions window:
- Enter
lorawan
keyword in the search box, which lists all the LoRaWAN EndDevice Demo Applications for SAM R34 Xplained Pro board or WLR089 Xplained Pro board. - Select the respective example application of the SAM R34 by expanding the “Atmel - Atmel Corp.” in the All Projects tab. This selection automatically populates the Project Name, Location, Solution, Solution Name and Device.
- Click OK.
Figure 5-2. Searching for LoRaWAN Example Project - Enter
- Select the
Accept the License Agreement
check box, then click Finish. - The Atmel Studio generates the project files for the selected application example that can be used in the SAM R34 Xplained Pro board or WLR089 Xplained Pro board.
- MLS supports multiple regional bands;
all the regions are enabled in the project by default. To disable certain regions,
perform the following steps:
- Go to
Project > Properties
or press <Alt + F7>. - From the left-hand pane, select Toolchain.
- In the right-hand pane, go to
ARM/GNU C Compiler > Symbols
. - The regional band macros are
listed in the
Defined Symbols
pane.- AS_BAND = 1
- AU_BAND = 1
- EU_BAND = 1
- IND_BAND = 1
- JPN_BAND = 1
- KR_BAND = 1
- NA_BAND = 1
Figure 5-3. Modifying Regional Configuration/Band - Runtime support for the
regional bands are enabled when the macro for the corresponding regional
band is set to
1
, and is disabled when the macro is set to0
. For example, the following are the macro values to enable only the North American region (NA_BAND).- AS_BAND = 0
- AU_BAND = 0
- EU_BAND = 0
- IND_BAND = 0
- JPN_BAND = 0
- KR_BAND = 0
- NA_BAND = 1
Note: The above mentioned select bands are from specific releases, provided as an example. Ensure the required band is supported before defining any band. The release notes contain the list of supported regional bands.
- Go to
- Go to
Build > Build Solution
to build the firmware.Figure 5-4. Building the Firmware - After successful compilation and
linking, the firmware is displayed in the Output Files section of Solution
Explorer.
Figure 5-5. Build Output - In the file system, Output files are
saved in Documents\Atmel
Studio\7.0\APPS_ENDDEVICE_DEMO1\APPS_ENDDEVICE_DEMO1/[BuildConfiguration].
Based on the build configuration, the BuildConfiguration directory can be either
Debug or Release.
Figure 5-6. Executable File Location