Ошибка сборки Zephyr при попытке переключить цель платы - PullRequest
0 голосов
/ 19 июня 2020

Я пытаюсь создать образец кода zephyr, который предназначен для платы A для платы B (т.е. сборка была написана для кода A, но мне нужно изменить ее, чтобы она работала с платой B). Я все время сталкиваюсь с этой ошибкой и не знаю, как ее исправить. Я заменил подпапки /board, /soc и /dts соответствующими файлами для моей платы. Я изменил Makefile, чтобы настроить таргетинг на мою плату, и он успешно его находит.

Это ошибка:

cmake -B build -DBOARD=my_project_name ./
-- Using out-of-tree SOC definition
-- Zephyr version: 2.2.0
-- Found PythonInterp: /opt/homebrew/bin/python3.6 (found suitable version "3.6.2", minimum required is "3.6") 
-- git describe failed: fatal: Not a git repository (or any of the parent directories): .git;
   BUILD_VERSION is left undefined
-- Selected BOARD my_project_name
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.6.0")
-- Loading /Users/my_name/file_dir/Firmware/projects/my_project_name/boards/arm/my_project_name/my_project_name.dts as base
Devicetree header saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/include/generated/devicetree_unfixed.h'
Parsing /Users/my_name/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/Kconfig
Loaded configuration '/Users/my_name/file_dir/Firmware/projects/my_project_name/boards/arm/my_project_name/my_project_name_defconfig'
Merged configuration '/Users/my_name/file_dir/Firmware/projects/my_project_name/prj.conf'
Configuration saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/.config'
Kconfig header saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /Users/my_name/file_dir/third-party/toolchains/gcc-arm-none-eabi-8-2018/arm-gcc-macos/bin/arm-none-eabi-gcc
-- Cache files will be written to: /Users/my_name/Library/Caches/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/my_name/file_dir/Firmware/projects/my_project_name/build
make -C build
Scanning dependencies of target driver_validation_h_target
[  1%] Generating include/generated/driver-validation.h
[  1%] Built target driver_validation_h_target
Scanning dependencies of target kobj_types_h_target
[  2%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
[  2%] Built target kobj_types_h_target
Scanning dependencies of target syscall_list_h_target
[  2%] Generating misc/generated/syscalls.json
[  3%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[  5%] Built target syscall_list_h_target
Scanning dependencies of target offsets
[  6%] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
In file included from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/include/aarch32/cortex_m/stack.h:23,
                 from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/include/kernel_arch_data.h:33,
                 from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/core/offsets/offsets_aarch32.c:26,
                 from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/core/offsets/offsets.c:12:
/Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/include/arch/arm/aarch32/cortex_m/cmsis.h:92:2: error: #error "DT_NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value."
 #error "DT_NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value."
  ^~~~~
make[3]: *** [zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj] Error 1
make[2]: *** [zephyr/CMakeFiles/offsets.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [zephyr_project] Error 2

Я уже проверил, что soc.h имеет #include <devicetree.h> . Я не уверен, что еще я могу попробовать сейчас, поэтому любая помощь приветствуется. Спасибо!

1 Ответ

0 голосов
/ 03 июля 2020

Нашел решение: мне пришлось добавить dts_fixup.h в конец моей папки so c.

...