Lines Matching +full:xtensa +full:- +full:build +full:- +full:all
1 # SPDX-License-Identifier: BSD-3-Clause
3 # platform-specific values
24 set(RIMAGE_MOD_OFFSET_FLAG -x 24)
58 ${PROJECT_SOURCE_DIR}/src/arch/xtensa/include
59 ${PROJECT_SOURCE_DIR}/src/arch/xtensa/xtos
75 set(stdlib_flag "-nostdlib")
81 # pretend to be xtensa compiler to go trough the same paths for AST
82 target_compile_definitions(sof_options INTERFACE -D__XTENSA__=1)
87 find_program(XCC_PATH NAMES "xt-xcc" PATHS ENV PATH NO_DEFAULT_PATH)
89 target_include_directories(sof_options INTERFACE ${XCC_DIR}/../xtensa-elf/include)
93 # but xtensa is always 32 bit, what may cause mismatch in definitions,
95 set(XTENSA_C_ASM_FLAGS -m32)
98 set(XTENSA_C_ASM_FLAGS -mlongcalls)
99 set(XTENSA_C_FLAGS -mtext-section-literals)
102 # linker flags - GCC >= 10.x uses libc
104 …_libraries(sof_options INTERFACE ${stdlib_flag} -lgcc -lc -Wl,--no-check-sections -ucall_user_star…
106 …nk_libraries(sof_options INTERFACE ${stdlib_flag} -lgcc -Wl,--no-check-sections -ucall_user_start …
110 target_compile_options(sof_options INTERFACE ${stdlib_flag} -fno-inline-functions ${XTENSA_C_ASM_FL…
117 # 1) CMAKE_<LANG>_FLAGS - works, but is global, we prefer target_* functions
118 # 2) set_source_files_properties - need to be done for each source file, it's
123 # No space between -imacros and its argument to avoid CMake
124 # de-duplication "feature"
127 -${optimization_flag} -g
128 -Wall -Werror
129 -Wl,-EL
130 -Wmissing-prototypes
131 -Wpointer-arith
134 -imacros${CONFIG_H_PATH}
144 ${ROOT_DIR}/arch/include/xtensa/config/core-isa*)
147 ${PROJECT_SOURCE_DIR}/src/platform/${platform_folder}/include/arch/xtensa/config/core-isa*)
162 list(APPEND iflags "-I${d}")
169 list(APPEND iflags "-I${d}")
176 COMMAND ${CMAKE_C_COMPILER} -E -DLINKER -P ${iflags} -o ${lds_out} -x c ${lds_in}
177 -imacros${CONFIG_H_PATH}
196 target_compile_options(reset PRIVATE -mtext-section-literals)
205 add_local_sources(reset xtos/memctl_default.S xtos/reset-vector.S)
208 xtos/crt1-boards.S
211 exc-dump.S
234 add_local_sources(sof main-entry.S)
239 target_link_libraries(sof_ld_flags INTERFACE "-Wl,-Map=sof.map")
240 target_link_libraries(sof_ld_flags INTERFACE "-T${PROJECT_BINARY_DIR}/${platform_ld_script}")
245 COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/sof sof-${fw_name}
271 target_link_libraries(bootloader PRIVATE "-T${PROJECT_BINARY_DIR}/${platform_bootldr_ld_script}")
277 COMMAND ${CMAKE_COMMAND} -E copy bootloader bootloader-${fw_name}
278 …COMMAND ${CMAKE_OBJCOPY} -O binary ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/boot_modu…
279 …COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-boot-${fw_name}.bin --set-section-flags .module…
280 COMMAND ${CMAKE_OBJCOPY} -O binary bootloader bootloader-${fw_name}.bin
281 COMMAND ${CMAKE_OBJDUMP} -h -D bootloader > bootloader-${fw_name}.lmap
282 COMMAND ${CMAKE_OBJDUMP} -S bootloader > bootloader-${fw_name}.lst
283 COMMAND ${CMAKE_OBJDUMP} -D bootloader > bootloader-${fw_name}.dis
289 set(bootloader_binary_path bootloader-${fw_name})
293 …COMMAND ${CMAKE_OBJCOPY} -O binary ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/base_modu…
294 …COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-${fw_name}.bin --set-section-flags .module=load…
308 target_link_libraries(rom PRIVATE "-T${PROJECT_BINARY_DIR}/${platform_rom_ld_script}")
313 target_compile_definitions(rom PRIVATE -DCONFIG_VM_ROM)
316 xtos/crt1-boards-rom.S
318 xtos/reset-vector.S
323 COMMAND ${CMAKE_COMMAND} -E copy rom rom-${fw_name}
324 COMMAND ${CMAKE_OBJCOPY} -O binary rom rom-${fw_name}.bin
325 COMMAND ${CMAKE_OBJDUMP} -h -D rom > rom-${fw_name}.lmap
326 COMMAND ${CMAKE_OBJDUMP} -S rom > rom-${fw_name}.lst
327 COMMAND ${CMAKE_OBJDUMP} -D rom > rom-${fw_name}.dis
338 # so they are not needed for scan-build
344 COMMAND ${CMAKE_OBJDUMP} -S sof-${fw_name} > sof-${fw_name}.lst
345 COMMAND ${CMAKE_OBJDUMP} -h sof-${fw_name} > sof-${fw_name}.lmap
346 COMMAND ${CMAKE_OBJDUMP} -D sof-${fw_name} > sof-${fw_name}.dis
361 BINARY_DIR "${PROJECT_BINARY_DIR}/smex_ep/build"
369 COMMAND ${PROJECT_BINARY_DIR}/smex_ep/build/smex
370 -l sof-${fw_name}.ldc
371 sof-${fw_name}
383 BINARY_DIR "${PROJECT_BINARY_DIR}/rimage_ep/build"
394 # default value for non-production firmware
402 # what they build in the moment.
408 COMMAND ${MEU_PATH}/meu -ver
414 message(WARNING "${MEU_PATH}/meu -ver"
431 # Passing -s ${MEU_OFFSET} disables rimage signing and produces
435 COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
436 -o sof-${fw_name}.ri
437 -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml"
438 -s ${MEU_OFFSET}
439 -k ${RIMAGE_PRIVATE_KEY}
440 -i ${RIMAGE_IMR_TYPE}
441 -f ${SOF_MAJOR}.${SOF_MINOR}
442 -b ${SOF_BUILD}
443 -e
446 sof-${fw_name}
458 -f ${MEU_PATH}/generic_meu_conf.xml
459 -mnver 0.0.0.0
460 -key ${MEU_PRIVATE_KEY}
461 -stp ${MEU_OPENSSL}
471 COMMAND ${MEU_PATH}/meu -w ./ -s sof-${fw_name}
473 -o sof-${fw_name}.ri
482 COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
483 -o sof-${fw_name}.ri
484 -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml"
485 -k ${RIMAGE_PRIVATE_KEY}
486 -i ${RIMAGE_IMR_TYPE}
487 -f ${SOF_MAJOR}.${SOF_MINOR}
488 -b ${SOF_BUILD}
489 -e
492 sof-${fw_name}
512 set(GLUE_CMD copy /b sof-${fw_name}.ri.xman + sof-${fw_name}.ri sof-${fw_name}.rix)
514 set(GLUE_CMD cat sof-${fw_name}.ri.xman sof-${fw_name}.ri > sof-${fw_name}.rix)
520 COMMAND ${CMAKE_COMMAND} -E remove sof-${fw_name}.ri
521 COMMAND ${CMAKE_COMMAND} -E rename sof-${fw_name}.rix sof-${fw_name}.ri
528 # platforms are already built in different build directories, we will
529 # never support building multiple platforms in the same build directory.
532 bin ALL
534 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.uns ${PROJECT_BINARY_DIR}/sof-${fw_output_name}…
535 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.met ${PROJECT_BINARY_DIR}/sof-${fw_output_name}…
536 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.uns ${PROJECT_BINARY_DIR}/sof.ri.uns
537 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri.met ${PROJECT_BINARY_DIR}/sof.ri.met
544 bin ALL
545 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ri
546 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ri ${PROJECT_BINARY_DIR}/sof.ri
555 …COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ldc ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.l…
556 COMMAND ${CMAKE_COMMAND} -E copy sof-${fw_name}.ldc ${PROJECT_BINARY_DIR}/sof.ldc
565 FILES ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ri
566 ${PROJECT_BINARY_DIR}/sof-${fw_output_name}.ldc