Код
.macro WRITE_REG addr, val, reg0, reg1
ldr \reg0, =\addr /* store the address */
ldr \reg1, =\val /* store value */
str \reg1, [\reg0] /* write the value */
.endm
....
WRITE_REG (MM3001_SMC_BASE + MM3001_SMC_SMBWST1R7), 0x0000001F, r0, r1
ldr \reg0, =\addr /* store the address */
ldr \reg1, =\val /* store value */
str \reg1, [\reg0] /* write the value */
.endm
....
WRITE_REG (MM3001_SMC_BASE + MM3001_SMC_SMBWST1R7), 0x0000001F, r0, r1
Тулчейн - ELDK-4.1 (взят с www.denx.de, gcc-4.0.0), ключи сборки (вроде бы ничего криминального):
Код
-fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -fno-builtin -ffreestanding -nostdinc -pipe -mabi=apcs-gnu -march=armv5te -O0 -mbig-endian -ggdb -mtune=arm926ej-s -c -o b1.o b1.S
Вываливается с ошибкой:
Код
Error: constant expression expected -- `ldr r0,=(MM3001_SMC_BASE+MM3001_SMC_SMBWST1R7)'
В чем может быть дело?