Summary:
If I add these two lines to my prj.conf the system will no longer build. Any ideas on what I’m doing wrong? Any help would be appreciated.
CONFIG_HAVE_CUSTOM_LINKER_SCRIPT=y
CONFIG_CUSTOM_LINKER_SCRIPT="linker.cmd"
Details:
Without those two lines I can build the supplied cli sample from the nordic SDK and build it fine. It runs fine too. With a now populated cli/build directory if I then do the following commands:
$ cd cli
$ cp build/zephyr/linker.cmd linker.cmd
$ rm build/zephyr/linker.cmd
… and then add the two lines to my prj.conf files you would think I’d get the same exact build as before since all I did is relocate the same linker.cmd and add the reference in prj.conf. But in fact the build will fail the link step. Any ideas on what I’m doing wrong? Any help would be appreciated.
Misc:
nrf sample project = cli
board: nrf52840-DK
SDK: nrf v2.4.1
Machine: MacBook Pro with Ventura 13.4.1
Error Transcript:
[381/386] Generating linker.cmd
[382/386] Generating isr_tables.c, isrList.bin
FAILED: zephyr/isr_tables.c zephyr/isrList.bin
cd /Users/Kranz/puzl/nrf/nordic_puzl_thread/build/zephyr && /opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-objcopy --input-target=elf32-littlearm --output-target=binary --only-section=.intList /Users/Kranz/puzl/nrf/nordic_puzl_thread/build/zephyr/zephyr_pre1.elf isrList.bin && /opt/nordic/ncs/toolchains/4ef6631da0/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v2.4.1/zephyr/scripts/build/gen_isr_tables.py --output-source isr_tables.c --kernel /Users/Kranz/puzl/nrf/nordic_puzl_thread/build/zephyr/zephyr_pre1.elf --intlist isrList.bin --sw-isr-table --vector-table
Traceback (most recent call last):
File "/opt/nordic/ncs/v2.4.1/zephyr/scripts/build/gen_isr_tables.py", line 359, in <module>
main()
File "/opt/nordic/ncs/v2.4.1/zephyr/scripts/build/gen_isr_tables.py", line 261, in main
intlist = read_intlist(args.intlist, syms)
File "/opt/nordic/ncs/v2.4.1/zephyr/scripts/build/gen_isr_tables.py", line 82, in read_intlist
header = struct.unpack_from(intlist_header_fmt, intdata, 0)
struct.error: unpack_from requires a buffer of at least 8 bytes for unpacking 8 bytes at offset 0 (actual buffer size is 0)
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/4ef6631da0/bin/cmake --build /Users/Kranz/puzl/nrf/nordic_puzl_thread/build
Thanks in advance,
Steve K, PuzL Labs, LLC