Skip to content

Commit 4670cb2

Browse files
RobinKastbergdanieldegrasse
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]> (cherry picked from commit fa165da)
1 parent a55b544 commit 4670cb2

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
@@ -560,7 +560,9 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
560560
/* We don’t intend to return, so there is no need to link. */
561561
"bx r4\n"
562562
/* Force a literal pool placement for the addresses referenced above */
563+
#ifndef __IAR_SYSTEMS_ICC__
563564
".ltorg\n"
565+
#endif
564566
:
565567
: "r"(_main), "r"(stack_ptr)
566568
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
@@ -628,7 +630,9 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(k_thread_entry_t main_
628630
"blx r0\n"
629631
"loop: b loop\n\t" /* while (true); */
630632
/* Force a literal pool placement for the addresses referenced above */
633+
#ifndef __IAR_SYSTEMS_ICC__
631634
".ltorg\n"
635+
#endif
632636
:
633637
: [_p1] "r"(p1), [_p2] "r"(p2), [_p3] "r"(p3), [_psp] "r"(psp),
634638
[_main_entry] "r"(main_entry)

0 commit comments

Comments
 (0)