2022-11-14 11:42 PM
Custom PCB, STM32MP157C chip. Linux 5.7.10. Buildroot build. No issues - Linux boots to console prompt without trouble, no errors.
I can view device registers and all memory regions using Segger Jlink via SWD in both SPL and UBoot. Once Linux starts - I can only view memory from 0xC0000000 to 0xCFFFFFFF, i.e. the DRAM. Any attempt to read internal RAM or device registers via SWD fails with "cannot read memory". JLink connected to CPU 0 (A7). If connected to M4 all I get is 0x23000000 regardless of what address I try to read (but the M4 is still in reset so that may be the reason).
I am not certain if SWD read goes through A7 virtual memory mapping or not - but anybody know what needs to change so I can access internal RAM space and device registers from SWD once Linux is running ?
2022-11-23 08:47 AM
Hi @info
not sure, but I think you face multiple hurdles:
I'm not expert, but Linux debugging with JTAG/SWD is usually used only for driver development. Most Linux cases uses SW debugging.
See https://wiki.st.com/stm32mpu/wiki/Debugging_the_Linux_kernel_using_the_GDB
and https://wiki.st.com/stm32mpu/wiki/Linux_tracing,_monitoring_and_debugging
Regards.