hi, GeeF
Yes, you’re right. I unlock the “use memory layout from dialog” and change the sct file as followed:
LR_IROM1 0x00027000 0x000D9000 { ; load region size_region
ER_IROM1 0x00027000 0x000D9000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
DECA 0x20002AE8 0x400 {
.ANY (.dw_drivers)
}
RW_IRAM1 0x20002EE8 0x0003D118 { ; RW data
.ANY (+RW +ZI)
}
}
Additionally, in main.c file, i add these sentences:
typedef struct dwt_driver_s DWT_DRIVER;
extern uint32_t Image$$DECA$$Base;
extern uint32_t Image$$DECA$$Limit;
DWT_DRIVER *__dw_drivers_start = (DWT_DRIVER *)&Image$$DECA$$Base;
DWT_DRIVER *__dw_drivers_end = (DWT_DRIVER *)&Image$$DECA$$Limit;
then, after adding libdwt_uwb_driver-m4-sfp-6.0.7.a into the project as a library file, the project compile and run successfully. However, i faced the same issue mentioned here https://forum.qorvo.com/t/using-nucleo-f401re-with-dwm3000-v1-4-api-v6-00-7-14-hardfault-when-try-readdevid/13671. The read_id example successfully dwt_probe() but hardfault at next dwt_readdevid(). I also take a look at the SPI line, and DECA0312 is transfered but no more.
The PCB Board is ok, as it can run all the example supplied by qrovo using SES platform. So i doubt there’s still having problem in the linker scripts. For example, in the .map file, nothing is stored in the .dw_drivers section: