Skip to content

Commit 7861cef

Browse files
committed
Fix: IAR build for NRF5x produce proper combined intel-hex file.
1 parent f281ecd commit 7861cef

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

hal/targets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@
11241124
"detect_code": ["1070"],
11251125
"post_binary_hook": {
11261126
"function": "MCU_NRF51Code.binary_hook",
1127-
"toolchains": ["ARM_STD", "GCC_ARM"]
1127+
"toolchains": ["ARM_STD", "GCC_ARM", "IAR"]
11281128
},
11291129
"program_cycle_s": 6,
11301130
"features": ["BLE"]
@@ -1743,7 +1743,7 @@
17431743
],
17441744
"post_binary_hook": {
17451745
"function": "MCU_NRF51Code.binary_hook",
1746-
"toolchains": ["ARM_STD", "GCC_ARM"]
1746+
"toolchains": ["ARM_STD", "GCC_ARM", "IAR"]
17471747
},
17481748
"MERGE_BOOTLOADER": false,
17491749
"features": ["BLE"]

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/bootloader_dfu/bootloader_settings.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3636
*
3737
*/
38-
38+
#ifdef NORDIC_BOOTLOADER_SETTINGS // avoid from unwanted commpilation
3939

4040
#include "bootloader_settings.h"
4141
#include <stdint.h>
@@ -88,3 +88,5 @@ void bootloader_util_settings_get(const bootloader_settings_t ** pp_bootloader_s
8888

8989
*pp_bootloader_settings = p_bootloader_settings;
9090
}
91+
92+
#endif // NORDIC_BOOTLOADER

tools/toolchains/iar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def archive(self, objects, lib_path):
198198
@hook_tool
199199
def binary(self, resources, elf, bin):
200200
# Build binary command
201-
cmd = [self.elf2bin, "--ihex", elf, bin]
201+
cmd = [self.elf2bin, "--bin", elf, bin]
202202

203203
# Call cmdline hook
204204
cmd = self.hook.get_cmdline_binary(cmd)

0 commit comments

Comments
 (0)