Hello,
I previously posted that I had issues working with communicating with the L6470 stepper driver from ST Micro using the nRF52832.
I have since done something with that project to break it and decided to create a new project.
Attached is my new code. I tried to build this with SDK 2.5.0.
What is strange is that it looks like it builds successfully as it shows the memory usage and then shows an error after that.
Building spi_l6470
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build c:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470"
[1/1] Linking C executable zephyr\zephyr.elf
FAILED: zephyr/zephyr.elf zephyr/zephyr.map zephyr/zephyr.hex zephyr/zephyr.bin zephyr/zephyr.stat
cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj -o zephyr\zephyr.elf -fuse-ld=bfd -T zephyr/linker.cmd -Wl,-Map=C:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build/zephyr/zephyr_final.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/picolibc/liblib__libc__picolibc.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/soc/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/soc/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/spi/libdrivers__spi.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/segger/libmodules__segger.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -L"c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m/nofp" -LC:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build/zephyr -lgcc -Wl,--print-memory-usage zephyr/arch/common/libisr_tables.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie -DPICOLIBC_INTEGER_PRINTF_SCANF --specs=picolibc.specs -lc -lgcc && cmd.exe /C "cd /D C:\code\009-Nordic-projects\nrfconnect\spi_L6470_ncs_2_5_0\spi_l6470\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E copy zephyr_final.map zephyr.map && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objcopy.exe --gap-fill 0xff --output-target=ihex --remove-section=.comment --remove-section=COMMON --remove-section=.eh_frame zephyr.elf zephyr.hex && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objcopy.exe --gap-fill 0xff --output-target=binary --remove-section=.comment --remove-section=COMMON --remove-section=.eh_frame zephyr.elf zephyr.bin && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-readelf.exe -e zephyr.elf > zephyr.stat && C:\ncs\toolchains\c57af46cb7\opt\bin\python.exe C:/ncs/v2.5.0/zephyr/scripts/build/check_init_priorities.py --build-dir C:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build/zephyr/.. --edt-pickle C:/code/009-Nordic-projects/nrfconnect/spi_L6470_ncs_2_5_0/spi_l6470/build/zephyr/edt.pickle""
Memory region Used Size Region Size %age Used
FLASH: 28976 B 512 KB 5.53%
RAM: 5900 B 64 KB 9.00%
IDT_LIST: 0 GB 2 KB 0.00%
ERROR: /soc/spi@40004000/l6470@0 POST_KERNEL 0 108 < /soc/spi@40004000 POST_KERNEL 70 107
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\code\009-Nordic-projects\nrfconnect\spi_L6470_ncs_2_5_0\spi_l6470\build'
* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
If anyone can assist with debugging that would be much appreciated.
Thanks.
I am trying to use SPI1 to communicate with the L6470.