Skip to content

Commit fa165da

Browse files
RobinKastbergjhedberg
authored andcommitted
iar: ltorg directive not supported
Currently this directive is not supported in EWARM 9.70.1, it will be in future versions, but we want Zephyr 4.2 to work with IAR EWARM 9.70.1. Signed-off-by: Robin Kastberg <[email protected]>
1 parent 076994f commit fa165da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm/core/cortex_m/thread.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,9 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
569569
/* We don’t intend to return, so there is no need to link. */
570570
"bx r4\n"
571571
/* Force a literal pool placement for the addresses referenced above */
572+
#ifndef __IAR_SYSTEMS_ICC__
572573
".ltorg\n"
574+
#endif
573575
:
574576
: "r"(_main), "r"(stack_ptr)
575577
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
@@ -637,7 +639,9 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(k_thread_entry_t main_
637639
"blx r0\n"
638640
"loop: b loop\n\t" /* while (true); */
639641
/* Force a literal pool placement for the addresses referenced above */
642+
#ifndef __IAR_SYSTEMS_ICC__
640643
".ltorg\n"
644+
#endif
641645
:
642646
: [_p1] "r"(p1), [_p2] "r"(p2), [_p3] "r"(p3), [_psp] "r"(psp),
643647
[_main_entry] "r"(main_entry)

0 commit comments

Comments
 (0)