Re: stm32f7/cortex M7 port and M-7 assembler error


prasanna karthik <prasannakarthik123@...>
 

I found the rootcause for the Issue. CFLAG for cortex M7 "cflags-cortex-m7" in arch/arm/Makefile does not have the "-march" option enabled in 1.5 release.

However there is another compiler Issue for "atomic" operation function, Any thoughts on these?
/opt/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-eabi/arm-poky-eabi-gcc -T linker.cmd @zephyr.lnk -o zephyr_prebuilt.elf
kernel/unified/lib.a(alert.o): In function `_alert_deliver':
/mnt/data/github/zephyr/kernel/unified/alert.c:40: undefined reference to `atomic_dec'
kernel/unified/lib.a(sched.o): In function `_is_preempt':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:83: undefined reference to `atomic_get'
kernel/unified/lib.a(sched.o): In function `k_sched_unlock':
/mnt/data/github/zephyr/kernel/unified/sched.c:109: undefined reference to `atomic_dec'
kernel/unified/lib.a(sem.o): In function `_is_preempt':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:83: undefined reference to `atomic_get'
kernel/unified/lib.a(thread.o): In function `_is_preempt':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:83: undefined reference to `atomic_get'
kernel/unified/lib.a(thread.o): In function `k_sched_lock':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:159: undefined reference to `atomic_inc'
kernel/unified/lib.a(thread.o): In function `_sched_unlock_no_reschedule':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:175: undefined reference to `atomic_dec'
kernel/unified/lib.a(thread.o): In function `k_sched_lock':
/mnt/data/github/zephyr/kernel/unified/include/ksched.h:159: undefined reference to `atomic_inc'
kernel/unified/lib.a(work_q.o): In function `atomic_test_and_clear_bit':
/mnt/data/github/zephyr/include/atomic.h:330: undefined reference to `atomic_and'
collect2: error: ld returned 1 exit status
make[2]: *** [zephyr_prebuilt.elf] Error 1

I tried the CONFIG_ATOMIC_OPERATIONS_BUILTIN setting, still it ends up with same error.
Is this the correct approach ?
Should I disable unified kernel config or ATOMIC_OPERATIONS_C ?

Join devel@lists.zephyrproject.org to automatically receive all group messages.