-1

我正在尝试在 Linux 上为 ESP32 构建 iotivity-constrained Zephyr 端口,但出现以下错误,

drivers/built-in.o: In function `esp32_uart_init':
/home/toolchains/zephyr/drivers/serial/uart_esp32.c:46:(.text.esp32_uart_init+0x3): dangerous relocation: call8: call target out of range: uartAttach
drivers/built-in.o: In function `esp32_uart_tx':
/home/toolchains/zephyr/drivers/serial/uart_esp32.c:19:(.text.esp32_uart_tx+0x9): dangerous relocation: call8: call target out of range: uart_tx_one_char
collect2: error: ld returned 1 exit status
/home/toolchains/zephyr/Makefile:878: recipe for target 'zephyr_prebuilt.elf' failed
make[2]: *** [zephyr_prebuilt.elf] Error 1
make[2]: Leaving directory '/home/projects/iotivity-constrained/port/zephyr/outdir/esp32'
Makefile:178: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/toolchains/zephyr'
/home/toolchains/zephyr/Makefile.inc:82: recipe for target 'all' failed
make: *** [all] Error 2

我可以分别构建 Zephyr 和 ESP32,但不受 iotivity 限制。我尝试添加 -mlongcalls 但没有成功。

有什么建议么?

4

1 回答 1

1

在 /zephyr/drivers/serial/Makefile 中添加标志 -mlongcalls。

参考文献: IOT-2650

于 2017-09-17T13:42:07.190 回答