mirror of
https://git.rtems.org/rtems-docs/
synced 2025-05-15 03:17:09 +08:00
parent
171bbe096f
commit
2cf3076320
@ -78,17 +78,47 @@ look at the `i.MX RT1050 Processor Reference Manual, Rev. 4, 12/2019` chapter
|
|||||||
FDT
|
FDT
|
||||||
---
|
---
|
||||||
|
|
||||||
The BSP used a FDT based initialization. The FDT is linked into the application.
|
The BSP uses a FDT based initialization. The FDT is linked into the application.
|
||||||
You can find the default FDT used in the BSP in
|
You can find the default FDT used in the BSP in
|
||||||
`bsps/arm/imxrt/dts/imxrt1050-evkb.dts`. To use your own FDT compile it and
|
`bsps/arm/imxrt/dts/imxrt1050-evkb.dts`. The FDT is split up into two parts. The
|
||||||
convert it into a C file with (replace `YOUR.dts` and simmilar with your FDT
|
core part is put into an `dtsi` file and is installed together with normal
|
||||||
source names)::
|
headers into `${PREFIX}/arm-rtems6/imxrt1052/lib/include`. You can use that to
|
||||||
|
create your own device tree based on that. Basically use something like::
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include <imxrt/imxrt1050-pinfunc.h>
|
||||||
|
#include <imxrt/imxrt1050.dtsi>
|
||||||
|
|
||||||
|
&lpuart1 {
|
||||||
|
pinctrl-0 = <&pinctrl_lpuart1>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&chosen {
|
||||||
|
stdout-path = &lpuart1;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* put your further devices here */
|
||||||
|
|
||||||
|
&iomuxc {
|
||||||
|
pinctrl_lpuart1: lpuart1grp {
|
||||||
|
fsl,pins = <
|
||||||
|
IMXRT_PAD_GPIO_AD_B0_12__LPUART1_TX 0x8
|
||||||
|
IMXRT_PAD_GPIO_AD_B0_13__LPUART1_RX 0x13000
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* put your further pinctrl groups here */
|
||||||
|
};
|
||||||
|
|
||||||
|
You can then convert your FDT into a C file with (replace `YOUR.dts` and similar
|
||||||
|
with your FDT source names)::
|
||||||
|
|
||||||
sh> export BSP_DIR="${RTEMS_SRC_DIR}/bsps/arm/imxrt/"
|
|
||||||
sh> arm-rtems6-cpp -P -x assembler-with-cpp \
|
sh> arm-rtems6-cpp -P -x assembler-with-cpp \
|
||||||
-I "${BSP_DIR}/include/" \
|
-I ${PREFIX}/arm-rtems6/imxrt1052/lib/include \
|
||||||
-include "YOUR.dts" /dev/null | \
|
-include "YOUR.dts" /dev/null | \
|
||||||
dtc -@ -O dtb -o "YOUR.dtb" -b 0 -p 1024
|
dtc -@ -O dtb -o "YOUR.dtb" -b 0 -p 1024
|
||||||
sh> rtems-bin2c -C -N imxrt_dtb "YOUR.dtb" "YOUR.c"
|
sh> rtems-bin2c -C -N imxrt_dtb "YOUR.dtb" "YOUR.c"
|
||||||
|
|
||||||
Make sure that your new c file is compiled and linked into the application.
|
Make sure that your new c file is compiled and linked into the application.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user