summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorLiya Huang <[email protected]>2025-01-28 09:13:16 +0800
committerTom Rini <[email protected]>2025-02-04 11:57:36 -0600
commit5cf9e61f0fa984c86d2ec59c843cd7b4c6220d34 (patch)
tree5ea2c94fc2bb929847f83eaf63affddfd75a0497 /examples
parentadeea8568d605d5132e0b93ef86a4094c84e5d53 (diff)
examples: fix building on arm32
Refer to the commit a3c101a61348 ("examples: fix building on arm64") fix for arm32. crt0.S does not even build with: operating system and architecture: 5.15.0-130-generic x86_64 installed version of gcc and binutils: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.3) GNU ld (GNU Binutils for Ubuntu) 2.34 used defconfig: stm32h750-art-pi_defconfig used commands for building: export CROSS_COMPILE=arm-none-eabi- ARCH=arm make stm32h750-art-pi_defconfig make menuconfig # to add make examples/api/crt0.S: Assembler messages: examples/api/crt0.S:32: Error: lo register required -- `ldr ip,=search_hint' examples/api/crt0.S:33: Error: lo register required -- `str sp,[ip]' examples/api/crt0.S:39: Error: lo register required -- `ldr ip,=syscall_ptr' examples/api/crt0.S:40: Error: lo register required -- `ldr pc,[ip]' make[2]: *** [scripts/Makefile.build:292:examples/api/crt0.o] Error 1 Use valid register names and instructions. Signed-off-by: Liya Huang <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/api/crt0.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/api/crt0.S b/examples/api/crt0.S
index d2a97557817..6899ebf8ac2 100644
--- a/examples/api/crt0.S
+++ b/examples/api/crt0.S
@@ -29,15 +29,17 @@ syscall:
.text
.globl _start
_start:
- ldr ip, =search_hint
- str sp, [ip]
+ ldr r4, =search_hint
+ mov r5, sp
+ str r5, [r4]
b main
.globl syscall
syscall:
- ldr ip, =syscall_ptr
- ldr pc, [ip]
+ ldr r4, =syscall_ptr
+ ldr r4, [r4]
+ bx r4
#elif defined(CONFIG_ARM64)