Closed nandogalliard closed 1 year ago
Hi @nandogalliard
Thanks for getting in touch. The zephyr-mpfs
branch of this repository is targeting the v2.7 Zephyr code base. it looks like you have the Zephyr SDK version 0.16.0 -- Using toolchain: zephyr 0.16.0 (/home/user/.local/zephyr-sdk-0.16.0)
which is not compatible.
The branch zephyr-mpfs-v3.3.99
of this repository should work for you, since it pulls the Zephyr code base from upstream. The instructions are slightly different for the above branch, I would suggest following the README from the start in a clean directory.
Describe the bug
When building the application synchronizaion with
west build -p -b mpfs_icicle ../mpfs-applications/synchronization -G "Eclipse CDT4 - Unix Makefiles"
out of the folder repo/zephyr/ it stopes with the error message:ABI is incompatible with that of the selected emulation: target emulation 'elf32-littleriscv' does not match 'elf64-littleriscv'
Full Build Message
```shell west build -p -b mpfs_icicle ../mpfs-applications/synchronization -G "Eclipse CDT4 - Unix Makefiles" -- west build: making build dir /home/user/w_user/Polarfire_Zephyr_App/zephyr/build pristine -- west build: generating a build system Including boilerplate (Zephyr base): /home/user/w_user/Polarfire_Zephyr_App/zephyr/cmake/app/boilerplate.cmake -- Application: /home/user/w_user/Polarfire_Zephyr_App/mpfs-applications/synchronization -- Zephyr version: 2.7.99 (/home/user/w_user/Polarfire_Zephyr_App/zephyr), build: 2021.09-13-g55b71174b6a5 -- Found Python3: /home/user/zephyrproject/.zeph/bin/python3 (found suitable exact version "3.8.10") found components: Interpreter -- Found west (found suitable version "1.0.0", minimum required is "0.7.1") -- Board: mpfs_icicle -- Cache files will be written to: /home/user/.cache/zephyr -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK -- Using toolchain: zephyr 0.16.0 (/home/user/.local/zephyr-sdk-0.16.0) -- Found dtc: /home/user/.local/zephyr-sdk-0.16.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") -- Found BOARD.dts: /home/user/w_user/Polarfire_Zephyr_App/zephyr/boards/riscv/mpfs_icicle/mpfs_icicle.dts -- Generated zephyr.dts: /home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/zephyr.dts -- Generated devicetree_unfixed.h: /home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/include/generated/devicetree_unfixed.h -- Generated device_extern.h: /home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/include/generated/device_extern.h -- Including generated dts.cmake file: /home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/dts.cmake Parsing /home/user/w_user/Polarfire_Zephyr_App/zephyr/Kconfig Loaded configuration '/home/user/w_user/Polarfire_Zephyr_App/zephyr/boards/riscv/mpfs_icicle/mpfs_icicle_defconfig' Merged configuration '/home/user/w_user/Polarfire_Zephyr_App/mpfs-applications/synchronization/prj.conf' Configuration saved to '/home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/.config' Kconfig header saved to '/home/user/w_user/Polarfire_Zephyr_App/zephyr/build/zephyr/include/generated/autoconf.h' -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- The ASM compiler identification is GNU -- Found assembler: /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc Eclipse CDT4 generator amendment mode: C and CXX includes, defines in .cproject without __cplusplus with project includes and defines -- Configuring done (3.3s) -- Generating done (0.1s) -- Build files have been written to: /home/user/w_user/Polarfire_Zephyr_App/zephyr/build -- west build: building application [ 1%] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json [ 3%] Built target parse_syscalls_target [ 4%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h [ 4%] Built target kobj_types_h_target [ 4%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h [ 4%] Built target syscall_list_h_target [ 5%] Generating include/generated/driver-validation.h [ 5%] Built target driver_validation_h_target [ 5%] Building C object zephyr/CMakeFiles/offsets.dir/arch/riscv/core/offsets/offsets.c.obj [ 5%] Built target offsets [ 6%] Generating include/generated/offsets.h [ 6%] Built target offsets_h [ 6%] Built target zephyr_generated_headers [ 6%] Building C object CMakeFiles/app.dir/src/main.c.obj [ 7%] Linking C static library app/libapp.a [ 7%] Built target app [ 8%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/base64.c.obj [ 9%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj [ 10%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj [ 11%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj [ 11%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj [ 12%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj [ 13%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj [ 14%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj [ 15%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj [ 15%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj [ 16%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj [ 17%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj [ 18%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj [ 18%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj [ 19%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj [ 20%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj [ 21%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj [ 22%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj [ 22%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj [ 23%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj [ 24%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj [ 25%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj [ 26%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj [ 26%] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj [ 27%] Building C object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/common/idle.c.obj [ 28%] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/common/soc_irq.S.obj [ 29%] Building C object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/common/soc_common_irq.c.obj [ 29%] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/common/vector.S.obj [ 30%] Building C object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c.obj In file included from /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c:9: /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:102: warning: "MCONTROL_SELECT" redefined 102 | #define MCONTROL_SELECT (1U<<19) | In file included from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/arch.h:30, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/cpu.h:25, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/kernel_includes.h:33, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/kernel.h:17, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/init.h:11, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c:7: /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:75: note: this is the location of the previous definition 75 | #define MCONTROL_SELECT (1<<19) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:103: warning: "MCONTROL_TIMING" redefined 103 | #define MCONTROL_TIMING (1U<<18) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:76: note: this is the location of the previous definition 76 | #define MCONTROL_TIMING (1<<18) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:104: warning: "MCONTROL_ACTION" redefined 104 | #define MCONTROL_ACTION (0x3fU<<12) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:77: note: this is the location of the previous definition 77 | #define MCONTROL_ACTION (0x3f<<12) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:105: warning: "MCONTROL_CHAIN" redefined 105 | #define MCONTROL_CHAIN (1U<<11) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:78: note: this is the location of the previous definition 78 | #define MCONTROL_CHAIN (1<<11) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:106: warning: "MCONTROL_MATCH" redefined 106 | #define MCONTROL_MATCH (0xfU<<7) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:79: note: this is the location of the previous definition 79 | #define MCONTROL_MATCH (0xf<<7) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:107: warning: "MCONTROL_M" redefined 107 | #define MCONTROL_M (1U<<6) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:80: note: this is the location of the previous definition 80 | #define MCONTROL_M (1<<6) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:108: warning: "MCONTROL_H" redefined 108 | #define MCONTROL_H (1U<<5) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:81: note: this is the location of the previous definition 81 | #define MCONTROL_H (1<<5) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:109: warning: "MCONTROL_S" redefined 109 | #define MCONTROL_S (1U<<4) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:82: note: this is the location of the previous definition 82 | #define MCONTROL_S (1<<4) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:110: warning: "MCONTROL_U" redefined 110 | #define MCONTROL_U (1U<<3) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:83: note: this is the location of the previous definition 83 | #define MCONTROL_U (1<<3) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:111: warning: "MCONTROL_EXECUTE" redefined 111 | #define MCONTROL_EXECUTE (1U<<2) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:84: note: this is the location of the previous definition 84 | #define MCONTROL_EXECUTE (1<<2) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:112: warning: "MCONTROL_STORE" redefined 112 | #define MCONTROL_STORE (1U<<1) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:85: note: this is the location of the previous definition 85 | #define MCONTROL_STORE (1<<1) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:113: warning: "MCONTROL_LOAD" redefined 113 | #define MCONTROL_LOAD (1U<<0) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:86: note: this is the location of the previous definition 86 | #define MCONTROL_LOAD (1<<0) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:131: warning: "MIP_SSIP" redefined 131 | #define MIP_SSIP (1U << IRQ_S_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:104: note: this is the location of the previous definition 104 | #define MIP_SSIP (1 << IRQ_S_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:132: warning: "MIP_HSIP" redefined 132 | #define MIP_HSIP (1U << IRQ_H_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:105: note: this is the location of the previous definition 105 | #define MIP_HSIP (1 << IRQ_H_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:133: warning: "MIP_MSIP" redefined 133 | #define MIP_MSIP (1U << IRQ_M_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:106: note: this is the location of the previous definition 106 | #define MIP_MSIP (1 << IRQ_M_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:134: warning: "MIP_STIP" redefined 134 | #define MIP_STIP (1U << IRQ_S_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:107: note: this is the location of the previous definition 107 | #define MIP_STIP (1 << IRQ_S_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:135: warning: "MIP_HTIP" redefined 135 | #define MIP_HTIP (1U << IRQ_H_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:108: note: this is the location of the previous definition 108 | #define MIP_HTIP (1 << IRQ_H_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:136: warning: "MIP_MTIP" redefined 136 | #define MIP_MTIP (1U << IRQ_M_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:109: note: this is the location of the previous definition 109 | #define MIP_MTIP (1 << IRQ_M_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:137: warning: "MIP_SEIP" redefined 137 | #define MIP_SEIP (1U << IRQ_S_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:110: note: this is the location of the previous definition 110 | #define MIP_SEIP (1 << IRQ_S_EXT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:138: warning: "MIP_HEIP" redefined 138 | #define MIP_HEIP (1U << IRQ_H_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:111: note: this is the location of the previous definition 111 | #define MIP_HEIP (1 << IRQ_H_EXT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:139: warning: "MIP_MEIP" redefined 139 | #define MIP_MEIP (1U << IRQ_M_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:112: note: this is the location of the previous definition 112 | #define MIP_MEIP (1 << IRQ_M_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c: In function 'pre_mpfs_init': /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c:33:1: warning: no return statement in function returning non-void [-Wreturn-type] 33 | } | ^ /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c: In function 'mpfs_init': /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys.c:38:19: warning: unused variable 'i' [-Wunused-variable] 38 | int int_num, i; | ^ [ 31%] Building C object zephyr/CMakeFiles/zephyr.dir/soc/riscv/riscv-privilege/mpfs/mpfs_sys1.c.obj In file included from /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys1.c:9: /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:102: warning: "MCONTROL_SELECT" redefined 102 | #define MCONTROL_SELECT (1U<<19) | In file included from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/arch.h:30, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/cpu.h:25, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/kernel_includes.h:33, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/kernel.h:17, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/init.h:11, from /home/user/w_user/Polarfire_Zephyr_App/zephyr/soc/riscv/riscv-privilege/mpfs/mpfs_sys1.c:7: /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:75: note: this is the location of the previous definition 75 | #define MCONTROL_SELECT (1<<19) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:103: warning: "MCONTROL_TIMING" redefined 103 | #define MCONTROL_TIMING (1U<<18) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:76: note: this is the location of the previous definition 76 | #define MCONTROL_TIMING (1<<18) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:104: warning: "MCONTROL_ACTION" redefined 104 | #define MCONTROL_ACTION (0x3fU<<12) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:77: note: this is the location of the previous definition 77 | #define MCONTROL_ACTION (0x3f<<12) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:105: warning: "MCONTROL_CHAIN" redefined 105 | #define MCONTROL_CHAIN (1U<<11) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:78: note: this is the location of the previous definition 78 | #define MCONTROL_CHAIN (1<<11) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:106: warning: "MCONTROL_MATCH" redefined 106 | #define MCONTROL_MATCH (0xfU<<7) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:79: note: this is the location of the previous definition 79 | #define MCONTROL_MATCH (0xf<<7) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:107: warning: "MCONTROL_M" redefined 107 | #define MCONTROL_M (1U<<6) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:80: note: this is the location of the previous definition 80 | #define MCONTROL_M (1<<6) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:108: warning: "MCONTROL_H" redefined 108 | #define MCONTROL_H (1U<<5) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:81: note: this is the location of the previous definition 81 | #define MCONTROL_H (1<<5) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:109: warning: "MCONTROL_S" redefined 109 | #define MCONTROL_S (1U<<4) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:82: note: this is the location of the previous definition 82 | #define MCONTROL_S (1<<4) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:110: warning: "MCONTROL_U" redefined 110 | #define MCONTROL_U (1U<<3) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:83: note: this is the location of the previous definition 83 | #define MCONTROL_U (1<<3) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:111: warning: "MCONTROL_EXECUTE" redefined 111 | #define MCONTROL_EXECUTE (1U<<2) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:84: note: this is the location of the previous definition 84 | #define MCONTROL_EXECUTE (1<<2) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:112: warning: "MCONTROL_STORE" redefined 112 | #define MCONTROL_STORE (1U<<1) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:85: note: this is the location of the previous definition 85 | #define MCONTROL_STORE (1<<1) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:113: warning: "MCONTROL_LOAD" redefined 113 | #define MCONTROL_LOAD (1U<<0) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:86: note: this is the location of the previous definition 86 | #define MCONTROL_LOAD (1<<0) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:131: warning: "MIP_SSIP" redefined 131 | #define MIP_SSIP (1U << IRQ_S_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:104: note: this is the location of the previous definition 104 | #define MIP_SSIP (1 << IRQ_S_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:132: warning: "MIP_HSIP" redefined 132 | #define MIP_HSIP (1U << IRQ_H_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:105: note: this is the location of the previous definition 105 | #define MIP_HSIP (1 << IRQ_H_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:133: warning: "MIP_MSIP" redefined 133 | #define MIP_MSIP (1U << IRQ_M_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:106: note: this is the location of the previous definition 106 | #define MIP_MSIP (1 << IRQ_M_SOFT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:134: warning: "MIP_STIP" redefined 134 | #define MIP_STIP (1U << IRQ_S_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:107: note: this is the location of the previous definition 107 | #define MIP_STIP (1 << IRQ_S_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:135: warning: "MIP_HTIP" redefined 135 | #define MIP_HTIP (1U << IRQ_H_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:108: note: this is the location of the previous definition 108 | #define MIP_HTIP (1 << IRQ_H_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:136: warning: "MIP_MTIP" redefined 136 | #define MIP_MTIP (1U << IRQ_M_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:109: note: this is the location of the previous definition 109 | #define MIP_MTIP (1 << IRQ_M_TIMER) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:137: warning: "MIP_SEIP" redefined 137 | #define MIP_SEIP (1U << IRQ_S_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:110: note: this is the location of the previous definition 110 | #define MIP_SEIP (1 << IRQ_S_EXT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:138: warning: "MIP_HEIP" redefined 138 | #define MIP_HEIP (1U << IRQ_H_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:111: note: this is the location of the previous definition 111 | #define MIP_HEIP (1 << IRQ_H_EXT) | /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/encoding.h:139: warning: "MIP_MEIP" redefined 139 | #define MIP_MEIP (1U << IRQ_M_EXT) | /home/user/w_user/Polarfire_Zephyr_App/zephyr/include/arch/riscv/csr.h:112: note: this is the location of the previous definition 112 | #define MIP_MEIP (1 << IRQ_M_EXT) | [ 32%] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj [ 34%] Building C object zephyr/CMakeFiles/zephyr.dir/home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/drivers/mss/mss_gpio/mss_gpio.c.obj /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/drivers/mss/mss_gpio/mss_gpio.c: In function 'MSS_GPIO_set_output': /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/drivers/mss/mss_gpio/mss_gpio.c:213:14: warning: unused variable 'gpio_setting' [-Wunused-variable] 213 | uint32_t gpio_setting; | ^~~~~~~~~~~~ /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/drivers/mss/mss_gpio/mss_gpio.c: In function 'MSS_GPIO_drive_inout': /home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/drivers/mss/mss_gpio/mss_gpio.c:248:14: warning: unused variable 'outputs_state' [-Wunused-variable] 248 | uint32_t outputs_state; | ^~~~~~~~~~~~~ [ 34%] Building C object zephyr/CMakeFiles/zephyr.dir/home/user/w_user/Polarfire_Zephyr_App/modules/hal/microchip/mpfs/mpfs_hal/common/mss_plic.c.obj [ 35%] Linking C static library libzephyr.a [ 35%] Built target zephyr [ 36%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj [ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj [ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj [ 38%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj [ 39%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj [ 40%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj [ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj [ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj [ 42%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj [ 43%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj [ 44%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj [ 45%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj [ 45%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj [ 46%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj [ 47%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj [ 48%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj [ 49%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj [ 49%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj [ 50%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj [ 51%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj [ 52%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj [ 52%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj [ 53%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/smp.c.obj [ 54%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj [ 55%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj [ 56%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj [ 56%] Linking C static library libkernel.a [ 56%] Built target kernel [ 57%] Generating linker_zephyr_prebuilt.cmd [ 57%] Built target linker_zephyr_prebuilt_script_target [ 57%] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj [ 58%] Linking C static library libisr_tables.a [ 58%] Built target isr_tables [ 59%] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj [ 60%] Linking C static library libarch__common.a [ 60%] Built target arch__common [ 60%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/cpu_idle.c.obj [ 61%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/fatal.c.obj [ 62%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/irq_manage.c.obj [ 63%] Building ASM object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/isr.S.obj [ 64%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/prep_c.c.obj [ 64%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/reboot.c.obj [ 65%] Building ASM object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/reset.S.obj [ 67%] Building ASM object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/swap.S.obj [ 68%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/thread.c.obj [ 69%] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/arch__riscv__core.dir/riscv_smp.c.obj [ 69%] Linking C static library libarch__riscv__core.a [ 69%] Built target arch__riscv__core [ 70%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj [ 71%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj [ 72%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj [ 72%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj [ 73%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj [ 74%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj [ 75%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj [ 75%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj [ 76%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj [ 77%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj [ 78%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj [ 79%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj [ 79%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj [ 80%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj [ 81%] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj [ 82%] Linking C static library liblib__libc__minimal.a [ 82%] Built target lib__libc__minimal [ 83%] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj [ 83%] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj [ 84%] Linking C static library liblib__posix.a [ 84%] Built target lib__posix [ 85%] Building C object zephyr/drivers/interrupt_controller/CMakeFiles/drivers__interrupt_controller.dir/intc_plic.c.obj [ 86%] Linking C static library libdrivers__interrupt_controller.a [ 86%] Built target drivers__interrupt_controller [ 86%] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj [ 87%] Linking C static library libdrivers__console.a [ 87%] Built target drivers__console [ 88%] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_ns16550.c.obj [ 88%] Linking C static library libdrivers__serial.a [ 88%] Built target drivers__serial [ 89%] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj [ 90%] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/riscv_machine_timer.c.obj [ 91%] Linking C static library libdrivers__timer.a [ 91%] Built target drivers__timer [ 92%] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj [ 93%] Linking C executable zephyr_prebuilt.elf /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_clzdi2.o): ABI is incompatible with that of the selected emulation: target emulation `elf32-littleriscv' does not match `elf64-littleriscv' /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: failed to merge target specific data of file /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_clzdi2.o) /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_ctzdi2.o): ABI is incompatible with that of the selected emulation: target emulation `elf32-littleriscv' does not match `elf64-littleriscv' /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: failed to merge target specific data of file /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_ctzdi2.o) /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_clz.o): ABI is incompatible with that of the selected emulation: target emulation `elf32-littleriscv' does not match `elf64-littleriscv' /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: failed to merge target specific data of file /home/user/.local/zephyr-sdk-0.16.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/libgcc.a(_clz.o) collect2: error: ld returned 1 exit status make[2]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:112: zephyr/zephyr_prebuilt.elf] Error 1 make[1]: *** [CMakeFiles/Makefile2:2525: zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 FATAL ERROR: command exited with status 2: /usr/bin/cmake --build /home/user/w_user/Polarfire_Zephyr_App/zephyr/build ```
To Reproduce
Follow the Zephyr OS installation guide for Ubuntu with virtual environment. Use the Zephyr SDK installation location of
$HOME/.local
. Stop at chapter Build the Blinky Sample.Follow build instructions for this repository up until "to build this zephyr application, use the command:"
The previously mentioned error should appear when starting the west build.
Similar Issues
Zephyr Issue for RISC
gcc -mabi=ilp32 -march=rv32imac --print-gcc-file-name
appears as a solution but couldn't get it to work myself.RISCV compiler: Set mabi and march via Kconfig options
Expected behavior
Completed west build of example application synchronization on board mpfs_icicle.
Desktop