Ошибка Ceedling при попытке скомпилировать / связать с xc16-gcc

Я пытаюсь реализовать разработку на основе тестов для своего процесса встраиваемой системы Microchip, и я пытаюсь сделать это через Ceedling (Unity, CMock и т. Д.). Я пытался следовать этому руководству: https://spin.atomicobject.com/2012/10/22/getting-started-with-tdd-for-microchips-pics/, но у меня возникли некоторые проблемы. Я выполнил все шаги до последнего, но у меня возникают проблемы с правильной привязкой моего кода (по крайней мере, я считаю, что проблема заключается в связывании). Ниже приведен результат, когда я делаю «тест на пробуждение: все».

      Test 'test_gpio_access.c'
-------------------------
Linking test_gpio_access.out...
c:\program files\microchip\xc16\v1.50\bin\bin\..\bin/elf-ld.exe: cannot open map file ./build/release/TestOutput.map: No such file or directory
ERROR: Shell command failed.
> Shell executed command:
'xc16-gcc -mcpu=24HJ128GP202 build/test/out/c/test_gpio_access_runner.o build/test/out/c/test_gpio_access.o build/test/out/c/unity.o build/test/out/c/gpio_access.o build/test/out/c/cmock.o -o "./build/release/TestBuild.out" -Wl,-Tp24HJ128GP202.gld,-Map=./build/release/TestOutput.map,--report-mem'
> And exited with status: [255].

NOTICE: If the linker reports missing symbols, the following may be to blame:
  1. Test lacks #include statements corresponding to needed source files.
  2. Project search paths do not contain source files corresponding to #include statements in the test.
  3. Test does not #include needed mocks.

Учебник, за которым я следую, немного устарел, поэтому, вероятно, мне не хватает чего-то, что изменилось с момента публикации учебника. Любая помощь будет очень признательна!

ОБНОВИТЬ:

Мой файл yaml настроен неправильно, так как у меня был:release_build: FALSE в разделе моего проекта, но раздел: test build: закомментирован. Если я закомментировал:release_build: FALSE, он компилируется и связывается правильно, но я получаю другую ошибку:

      C:\Software\PIC_Demo>ceedling test:all


Test 'test_gpio_access.c'
-------------------------
Linking test_gpio_access.out...
Running test_gpio_access.out...

ERROR: Test executable "test_gpio_access.out" failed.
> Produced no final test result counts in $stdout:
test_gpio_access.c:21:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_A0:PASStest_gpio_access.c:27:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_A1:PASStest_gpio_access.c:33:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_A2:PASStest_gpio_access.c:39:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_A3:PASStest_gpio_access.c:45:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_A4:PASStest_gpio_access.c:53:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_A0:PASStest_gpio_access.c:63:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_A1:PASStest_gpio_access.c:73:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_A2:PASStest_gpio_access.c:83:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_A3:PASStest_gpio_access.c:93:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_A4:PASStest_gpio_access.c:106:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_B0:PASStest_gpio_access.c:112:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_B1:PASStest_gpio_access.c:118:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_B2:PASStest_gpio_access.c:124:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_B3:PASStest_gpio_access.c:130:test_GPIO_SetBit_should_set_corresponding_SFR_bit_for_B4:PASStest_gpio_access.c:138:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_B0:PASStest_gpio_access.c:148:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_B1:PASStest_gpio_access.c:158:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_B2:PASStest_gpio_access.c:168:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_B3:PASStest_gpio_access.c:178:test_GPIO_ClearBit_should_clear_the_corresponding_SFR_bit_for_B4:PASS-----------------------20 Tests 0 Failures 0 Ignored OK
> And exited with status: [0] (count of failed tests).
> This is often a symptom of a bad memory access in source or test code.

1 ответ

Я также использую Ceedling с XC16, и Ceedling не удается создать каталог вbuild. Создание вручнуюreleaseдолжен решить вашу проблему, так как это место назначения для файлов .map.

Другие вопросы по тегам