Lines Matching +full:xtensa +full:- +full:build +full:- +full:all
1 # SPDX-License-Identifier: BSD-3-Clause
3 # platform-specific values
52 ${PROJECT_SOURCE_DIR}/src/arch/xtensa/include
53 ${PROJECT_SOURCE_DIR}/src/arch/xtensa/xtos
71 set(stdlib_flag "-nostdlib")
77 # pretend to be xtensa compiler to go trough the same paths for AST
78 target_compile_definitions(sof_options INTERFACE -D__XTENSA__=1)
83 find_program(XCC_PATH NAMES "xt-xcc" PATHS ENV PATH NO_DEFAULT_PATH)
85 target_include_directories(sof_options INTERFACE ${XCC_DIR}/../xtensa-elf/include)
89 # but xtensa is always 32 bit, what may cause mismatch in definitions,
91 set(XTENSA_C_ASM_FLAGS -m32)
94 set(XTENSA_C_ASM_FLAGS -mlongcalls)
95 set(XTENSA_C_FLAGS -mtext-section-literals)
98 # linker flags - GCC >= 10.x uses libc
100 …_libraries(sof_options INTERFACE ${stdlib_flag} -lgcc -lc -Wl,--no-check-sections -ucall_user_star…
102 …nk_libraries(sof_options INTERFACE ${stdlib_flag} -lgcc -Wl,--no-check-sections -ucall_user_start …
106 target_compile_options(sof_options INTERFACE ${stdlib_flag} -fno-inline-functions ${XTENSA_C_ASM_FL…
113 # 1) CMAKE_<LANG>_FLAGS - works, but is global, we prefer target_* functions
114 # 2) set_source_files_properties - need to be done for each source file, it's
121 # No space between -imacros and its argument to avoid CMake
122 # de-duplication "feature"
125 -${optimization_flag} -g
126 -Wall -Werror
127 -Wl,-EL
128 -Wmissing-prototypes
129 -Wpointer-arith
133 -imacros${CONFIG_H_PATH}
143 ${ROOT_DIR}/arch/include/xtensa/config/core-isa*)
146 ${PROJECT_SOURCE_DIR}/src/platform/${platform_folder}/include/arch/xtensa/config/core-isa*)
161 list(APPEND iflags "-I${d}")
168 list(APPEND iflags "-I${d}")
175 COMMAND ${CMAKE_C_COMPILER} -E -DLINKER -P ${iflags} -o ${lds_out} -x c ${lds_in}
176 -imacros${CONFIG_H_PATH}
195 target_compile_options(reset PRIVATE -mtext-section-literals)
204 add_local_sources(reset xtos/memctl_default.S xtos/reset-vector.S)
207 xtos/crt1-boards.S
210 exc-dump.S
233 add_local_sources(sof main-entry.S)
238 target_link_libraries(sof_ld_flags INTERFACE "-Wl,-Map=sof.map")
239 target_link_libraries(sof_ld_flags INTERFACE "-T${PROJECT_BINARY_DIR}/${platform_ld_script}")
241 # Copy the linker output from the top-level to this subdirectory
246 COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/sof sof-pre
279 target_link_libraries(bootloader PRIVATE "-T${PROJECT_BINARY_DIR}/${platform_bootldr_ld_script}")
285 COMMAND ${CMAKE_COMMAND} -E copy bootloader bootloader-${fw_name}
286 …COMMAND ${CMAKE_OBJCOPY} -O binary -j .data ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/…
287 …COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-boot-${fw_name}.bin --set-section-flags .module…
288 COMMAND ${CMAKE_OBJCOPY} -O binary bootloader bootloader-${fw_name}.bin
289 COMMAND ${CMAKE_OBJDUMP} -h -D bootloader > bootloader-${fw_name}.lmap
290 COMMAND ${CMAKE_OBJDUMP} -S bootloader > bootloader-${fw_name}.lst
291 COMMAND ${CMAKE_OBJDUMP} -D bootloader > bootloader-${fw_name}.dis
297 set(bootloader_binary_path bootloader-${fw_name})
302 …COMMAND ${CMAKE_OBJCOPY} -O binary -j .data ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/…
303 …COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-${fw_name}.bin --set-section-flags .module=load…
312 # Do nothing / pass-through
314 COMMAND ${CMAKE_COMMAND} -E copy sof-pre sof-${fw_name}
322 target_link_libraries(rom PRIVATE "-T${PROJECT_BINARY_DIR}/${platform_rom_ld_script}")
327 target_compile_definitions(rom PRIVATE -DCONFIG_VM_ROM)
330 xtos/crt1-boards-rom.S
332 xtos/reset-vector.S
337 COMMAND ${CMAKE_COMMAND} -E copy rom rom-${fw_name}
338 COMMAND ${CMAKE_OBJCOPY} -O binary rom rom-${fw_name}.bin
339 COMMAND ${CMAKE_OBJDUMP} -h -D rom > rom-${fw_name}.lmap
340 COMMAND ${CMAKE_OBJDUMP} -S rom > rom-${fw_name}.lst
341 COMMAND ${CMAKE_OBJDUMP} -D rom > rom-${fw_name}.dis
352 # so they are not needed for scan-build
358 COMMAND ${CMAKE_OBJDUMP} -S sof-${fw_name} > sof-${fw_name}.lst
359 COMMAND ${CMAKE_OBJDUMP} -h sof-${fw_name} > sof-${fw_name}.lmap
360 COMMAND ${CMAKE_OBJDUMP} -D sof-${fw_name} > sof-${fw_name}.dis
375 BINARY_DIR "${PROJECT_BINARY_DIR}/smex_ep/build"
383 COMMAND ${PROJECT_BINARY_DIR}/smex_ep/build/smex
384 -l sof-${fw_name}.ldc
385 sof-${fw_name}
397 BINARY_DIR "${PROJECT_BINARY_DIR}/rimage_ep/build"
408 # default value for non-production firmware
416 # what they build in the moment.
422 COMMAND ${MEU_PATH}/meu -ver
428 message(WARNING "${MEU_PATH}/meu -ver"
445 # Passing -s ${MEU_OFFSET} disables rimage signing and produces
449 COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
450 -o sof-${fw_name}.ri
451 -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml"
452 -s ${MEU_OFFSET}
453 -k ${RIMAGE_PRIVATE_KEY}
454 -i ${RIMAGE_IMR_TYPE}
455 -f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO}
456 -b ${SOF_BUILD}
457 -e
459 sof-${fw_name}
467 -f ${MEU_PATH}/generic_meu_conf.xml
468 -mnver 0.0.0.0
469 -key ${MEU_PRIVATE_KEY}
470 -stp ${MEU_OPENSSL}
480 COMMAND ${MEU_PATH}/meu -w ./ -s sof-${fw_name}
482 -o sof-${fw_name}.ri
491 COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
492 -o sof-${fw_name}.ri
493 -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml"
494 -k ${RIMAGE_PRIVATE_KEY}
495 -i ${RIMAGE_IMR_TYPE}
496 -f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO}
497 -b ${SOF_BUILD}
498 -e
500 sof-${fw_name}
516 set(GLUE_CMD copy /b sof-${fw_name}.ri.xman + sof-${fw_name}.ri sof-${fw_name}.rix)
518 set(GLUE_CMD cat sof-${fw_name}.ri.xman sof-${fw_name}.ri > sof-${fw_name}.rix)
524 COMMAND ${CMAKE_COMMAND} -E remove sof-${fw_name}.ri
525 COMMAND ${CMAKE_COMMAND} -E rename sof-${fw_name}.rix sof-${fw_name}.ri
529 BYPRODUCTS sof-${fw_name}.ri # almost like a proper add_custom_command()
547 # edit-in-place and add_custom_target() messes are all fixed
548 DEPENDS glue_binary_files sof-${fw_name}.ri
549 COMMAND cmake -E copy sof-${fw_name}.ri reproducible.ri
555 DEPENDS glue_binary_files sof-${fw_name}.ri
557 --no_headers --no_modules --no_memory # could use a -q option...
558 --erase_vars reproducible.ri sof-${fw_name}.ri
564 # Top-level 'bin' target collecting all dependencies. Copies final .ri
565 # file from current subdirectory to top level build directory
569 # platforms are already built in different build directories, we will
570 # never support building multiple platforms in the same build directory.
573 bin ALL
575 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.uns ${PROJECT_BINARY_DIR}/sof-${fw_output_name}…
576 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.met ${PROJECT_BINARY_DIR}/sof-${fw_output_name}…
577 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.uns ${PROJECT_BINARY_DIR}/sof.ri.uns
578 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.met ${PROJECT_BINARY_DIR}/sof.ri.met
585 bin ALL
586 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ri
587 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri ${PROJECT_BINARY_DIR}/sof.ri
596 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ldc ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.l…
597 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ldc ${PROJECT_BINARY_DIR}/sof.ldc
606 FILES ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ri
607 ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ldc