Open kraj opened 3 years ago
I was trying to use clang cross compiler to build it and it showed up two issues
-mexplicit-relocs
ux00boot/ux00boot.c:505:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_VAL), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ ux00boot/ux00boot.c:506:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_EN), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ ux00boot/ux00boot.c:507:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_XOR), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ 3 errors generated. ux00boot/ux00boot.c:505:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_VAL), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ make: *** [Makefile:62: zsbl/ux00boot.o] Error 1 make: *** Waiting for unfinished jobs.... ux00boot/ux00boot.c:506:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_EN), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ ux00boot/ux00boot.c:507:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') inval id) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_XOR), UX00BOOT_ERROR_LED_GPIO_MASK); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ 3 errors generated. make: *** [Makefile:68: fsbl/ux00boot.o] Error 1 fsbl/main.c:129:5: error: second parameter of 'main' (argument array) must be of type 'char **' int main(int id, unsigned long dtb) ^ fsbl/main.c:276:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') invalid) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_VAL), PHY_NRESET); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/u540-c000-bootloader/gitAUTOINC+128f282d17-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/stdatomic.h:138:4 2: note: expanded from macro 'atomic_fetch_or' #define atomic_fetch_or(object, operand) __c11_atomic_fetch_or(object, operand, __ATOMIC_SEQ_CST) ^ ~~~~~~ fsbl/main.c:277:3: error: address argument to atomic operation must be a pointer to _Atomic type ('volatile uint32_t *' (aka 'volatile unsigned int *') invalid) atomic_fetch_or(&GPIO_REG(GPIO_OUTPUT_EN), PHY_NRESET); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was trying to use clang cross compiler to build it and it showed up two issues
-mexplicit-relocs
in Makefile