Re: 回复:[PATCH 1/1] examples/api: improve determination of LOAD_ADDR
Heinrich Schuchardt
xypron.glpk at gmx.de
Mon Jan 27 12:21:10 CET 2025
On 27.01.25 11:09, 黄利亚 wrote:
> Hello Heinrich
>
> I modified the code for arm32 architecture. You may be using an ARM64
> architecture. Take a look at the architecture used.
>
> version of U-Boot (commit in git):
> d8a7100d658eb201fa0e955667fdff298db31945
>
> 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
> make CROSS_COMPILE=arm-none-eabi- ARCH=arm stm32h750-art-pi_defconfig
> make CROSS_COMPILE=arm-none-eabi- ARCH=arm menuconfig # to add
Hello LiYa,
That additional information helps.
The stm32h uses the ARMv7-M architecture. With that architecture the
compilation problem is reproducible. Could you, please, add this
information to your commit message.
It would be preferable not to use registers that may be needed for
argument passing in future. Please, choose local variable registers R4-R11.
Environment variable ARCH is not used by U-Boot. You can safely remove
it from your command line.
Best regards
Heinrich
> CONFIG_API=y, CONFIG_EXAMPLES=y
> make CROSS_COMPILE=arm-none-eabi- ARCH=arm -j 12
>
> https://developer.arm.com/documentation/den0013/d/Application-Binary-
> Interfaces/Procedure-Call-Standard <https://developer.arm.com/
> documentation/den0013/d/Application-Binary-Interfaces/Procedure-Call-
> Standard>
> lists IP, SP, PC as aliases for registers R12, R13, R15.
> ------------------------------------------------------------
> I have tried using R12, R13, R15 and the error message is as follows:
> examples/api/crt0.S:32: Error: lo register required -- `ldr
> r12,=search_hint'
> examples/api/crt0.S:34: Error: lo register required -- `str R13,[r12]'
> examples/api/crt0.S:40: Error: lo register required -- `ldr
> r12,=syscall_ptr'
> examples/api/crt0.S:41: Error: lo register required -- `ldr r15,[r12]'
>
> As the error message suggests, you need to use a low register (lo
> register), and r12 and similar registers belong to the high register (hi
> register) category.
>
> Best regards
>
> LiYa
More information about the U-Boot
mailing list