cancel
Showing results for 
Search instead for 
Did you mean: 

STM32mp157-dk2 - wathcdog and device tree

RafalBil
Visitor

Hi

I have recently been working on the board model mentioned in the title. At the moment I have a problem with two things:

1. when trying to debug the kernel drivers, the kernel is inactive for a period of time which causes the watchdog to run. This behavior makes it impossible to debug the drivers. Is there any convenient solution to disable the watchdog?

At this point I have disabled support for watchdog in both the uboot and kernel, but this has caused the board to reset itself no matter what I do (there is information on the wiki about the possibility of disabling it from the build root level). Looking through the information available on the Internet, I found out that you could directly modify the memory, but this option does not suit me. Another piece of advice is in the course from bootlin:

 

```
However, it turns out that this pre-defined configuration enables the STM32 watchdog, and since our Linux user-space does not have a watchdog daemon to tick the watchdog regularly, it would reset constantly. Using a small additional snippet of U-Boot configuration, stored in the file board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config, we disable the watchdog.
```

 

but here I can't find the file uboot-fragment.config. Is there any example of the use of this file? The 3rd option supposedly is to change the device tree file and hence my 2nd question

2 I understand the typical compilation of the dtb file. However, the files from this board in the code have .h files for example this one https://github.com/bootlin/buildroot-external-st/blob/st/2023.02.10/board/stmicroelectronics/stm32mp1/linux-dts/stm32mp157c-dk2-mx.dts.

I know that you can generate files of this type using the tools provided. However, I am still learning and would like to do it currently at the make level. I understand that in this case the file needs to be reprocessed with a cpp compiler. However, my make is not working and I am not sure why. My makefile looks like this

 

```
SRCARCH = arm

DTC = dtc
DTCFLAGS = -b 0
dtc_cpp_flags = -x assembler-with-cpp -nostdinc ``.
-I arch \n-.
-undef -D__DTS__

DTCHINCLUDES = - <path to h files>.

DTSIINC = <path to dtsi> files

%.dtb: %.dts
cpp -nostdinc -I include -I arch -I ${DTSIINC} I- ${DTCHINCLUDES} -undef -x assembler-with-cpp stm32mp157f-dk2-mx.dts stm32mp157f-dk2-mx.dts.preprocessed

all: stm32mp157f-dk2-mx.dtb

```

 

Is there any example makefile for dtc files for this board? If not, could you please direct me how to compile the file using the makefile? And what to change to disable watchdog support

Thanks in advance for your help
Rafal

 

 

 

0 REPLIES 0