mirror of
https://git.rtems.org/rtems-docs/
synced 2025-07-25 20:59:42 +08:00
parent
e551cc7435
commit
f028448e5f
@ -27,7 +27,7 @@ image. Use the following commands:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
arm-rtems5-objcopy -O binary app.exe app.bin
|
arm-rtems@rtems-ver-major@-objcopy -O binary app.exe app.bin
|
||||||
gzip -9 -f -c app.bin > app.bin.gz
|
gzip -9 -f -c app.bin > app.bin.gz
|
||||||
mkimage -A arm -O linux -T kernel -a 0x00300000 -e 0x00300000 -n RTEMS -d app.bin.gz app.img
|
mkimage -A arm -O linux -T kernel -a 0x00300000 -e 0x00300000 -n RTEMS -d app.bin.gz app.img
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ To boot via uboot, the ELF must be converted to a U-Boot image like below:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
arm-rtems5-objcopy hello.exe -O binary app.bin
|
arm-rtems@rtems-ver-major@-objcopy hello.exe -O binary app.bin
|
||||||
gzip -9 app.bin
|
gzip -9 app.bin
|
||||||
mkimage -A arm -O linux -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d app.bin.gz rtems-app.img
|
mkimage -A arm -O linux -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d app.bin.gz rtems-app.img
|
||||||
|
|
||||||
@ -77,7 +77,8 @@ overlay has to be provided. The overlay must add an additional attribute
|
|||||||
|
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
.. code-block::
|
.. code-block:: none
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -109,7 +110,7 @@ For registering with a custom path, the ``bsp_register_spi()`` can be used.
|
|||||||
|
|
||||||
The function prototype is given below:
|
The function prototype is given below:
|
||||||
|
|
||||||
.. code-block:: C
|
.. code-block:: c
|
||||||
|
|
||||||
rtems_status_code bsp_register_spi(
|
rtems_status_code bsp_register_spi(
|
||||||
const char *bus_path,
|
const char *bus_path,
|
||||||
@ -153,7 +154,7 @@ The modification is:
|
|||||||
|
|
||||||
The resulting wiring is:
|
The resulting wiring is:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block:: none
|
||||||
|
|
||||||
1 === /--=== 2
|
1 === /--=== 2
|
||||||
3 === | === 4
|
3 === | === 4
|
||||||
@ -198,7 +199,7 @@ Cortex M only debuggers (like the Segger J-Link Edu Mini) won't work.
|
|||||||
If the debugger offers a gdb server (like OpenOCD or Segger J-Link) the
|
If the debugger offers a gdb server (like OpenOCD or Segger J-Link) the
|
||||||
following gdb start script can be used:
|
following gdb start script can be used:
|
||||||
|
|
||||||
.. code-block::
|
.. code-block:: none
|
||||||
|
|
||||||
define reset
|
define reset
|
||||||
echo -- Reset target and wait for U-Boot to start kernel.\n
|
echo -- Reset target and wait for U-Boot to start kernel.\n
|
||||||
|
@ -15,7 +15,9 @@ U-Boot or barebox.
|
|||||||
Build Configuration Options
|
Build Configuration Options
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The following options are available at the configure command line.
|
The following options can be used in the BSP section of the waf
|
||||||
|
configuration INI file. The waf defaults can be used to inspect the
|
||||||
|
values.
|
||||||
|
|
||||||
``BSP_PRESS_KEY_FOR_RESET``
|
``BSP_PRESS_KEY_FOR_RESET``
|
||||||
If defined to a non-zero value, then print a message and wait until pressed
|
If defined to a non-zero value, then print a message and wait until pressed
|
||||||
@ -73,7 +75,7 @@ image. Use the following commands:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
arm-rtems5-objcopy -O binary app.exe app.bin
|
arm-rtems@rtems-ver-major@-objcopy -O binary app.exe app.bin
|
||||||
gzip -9 -f -c app.bin > app.bin.gz
|
gzip -9 -f -c app.bin > app.bin.gz
|
||||||
mkimage -A arm -O linux -T kernel -a 0x80200000 -e 0x80200000 -n RTEMS -d app.bin.gz app.img
|
mkimage -A arm -O linux -T kernel -a 0x80200000 -e 0x80200000 -n RTEMS -d app.bin.gz app.img
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ For programming the HyperFlash in case 1, you can use the on board debugger
|
|||||||
integrated into the IMXRT1050-EVKB. You can generate a flash image out of a
|
integrated into the IMXRT1050-EVKB. You can generate a flash image out of a
|
||||||
compiled RTEMS application with for example::
|
compiled RTEMS application with for example::
|
||||||
|
|
||||||
arm-rtems6-objcopy -O binary build/arm/imxrt1052/testsuites/samples/hello.exe hello.bin
|
arm-rtems@rtems-ver-major@-objcopy -O binary build/arm/imxrt1052/testsuites/samples/hello.exe hello.bin
|
||||||
|
|
||||||
Then just copy the generated binary to the mass storage provided by the
|
Then just copy the generated binary to the mass storage provided by the
|
||||||
debugger. Wait a bit till the mass storage vanishes and re-appears. After that,
|
debugger. Wait a bit till the mass storage vanishes and re-appears. After that,
|
||||||
@ -91,25 +91,26 @@ 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`. The FDT is split up into two parts. The
|
`bsps/arm/imxrt/dts/imxrt1050-evkb.dts`. The FDT is split up into two parts. The
|
||||||
core part is put into an `dtsi` file and is installed together with normal
|
core part is put into an `dtsi` file and is installed together with normal
|
||||||
headers into `${PREFIX}/arm-rtems6/imxrt1052/lib/include`. You can use that to
|
headers into `${PREFIX}/arm-rtems@rtems-ver-major@/imxrt1052/lib/include`. You
|
||||||
create your own device tree based on that. Basically use something like::
|
can use that to create your own device tree based on that. Basically use
|
||||||
|
something like::
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
#include <imxrt/imxrt1050-pinfunc.h>
|
#include <imxrt/imxrt1050-pinfunc.h>
|
||||||
#include <imxrt/imxrt1050.dtsi>
|
#include <imxrt/imxrt1050.dtsi>
|
||||||
|
|
||||||
&lpuart1 {
|
&lpuart1 {
|
||||||
pinctrl-0 = <&pinctrl_lpuart1>;
|
pinctrl-0 = <&pinctrl_lpuart1>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&chosen {
|
&chosen {
|
||||||
stdout-path = &lpuart1;
|
stdout-path = &lpuart1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* put your further devices here */
|
/* put your further devices here */
|
||||||
|
|
||||||
&iomuxc {
|
&iomuxc {
|
||||||
pinctrl_lpuart1: lpuart1grp {
|
pinctrl_lpuart1: lpuart1grp {
|
||||||
fsl,pins = <
|
fsl,pins = <
|
||||||
@ -117,17 +118,19 @@ create your own device tree based on that. Basically use something like::
|
|||||||
IMXRT_PAD_GPIO_AD_B0_13__LPUART1_RX 0x13000
|
IMXRT_PAD_GPIO_AD_B0_13__LPUART1_RX 0x13000
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* put your further pinctrl groups here */
|
/* put your further pinctrl groups here */
|
||||||
};
|
};
|
||||||
|
|
||||||
You can then convert your FDT into a C file with (replace `YOUR.dts` and similar
|
You can then convert your FDT into a C file with (replace `YOUR.dts` and similar
|
||||||
with your FDT source names)::
|
with your FDT source names):
|
||||||
|
|
||||||
sh> arm-rtems6-cpp -P -x assembler-with-cpp \
|
.. code-block:: none
|
||||||
-I ${PREFIX}/arm-rtems6/imxrt1052/lib/include \
|
|
||||||
-include "YOUR.dts" /dev/null | \
|
sh> arm-rtems@rtems-ver-major@-cpp -P -x assembler-with-cpp \
|
||||||
dtc -O dtb -o "YOUR.dtb" -b 0 -p 64
|
-I ${PREFIX}/arm-rtems@rtems-ver-major@/imxrt1052/lib/include \
|
||||||
|
-include "YOUR.dts" /dev/null | \
|
||||||
|
dtc -O dtb -o "YOUR.dtb" -b 0 -p 64
|
||||||
sh> rtems-bin2c -A 8 -C -N imxrt_dtb "YOUR.dtb" "YOUR.c"
|
sh> rtems-bin2c -A 8 -C -N imxrt_dtb "YOUR.dtb" "YOUR.c"
|
||||||
|
|
||||||
You'll get a C file which defines the `imxrt_dtb` array. Make sure that your new
|
You'll get a C file which defines the `imxrt_dtb` array. Make sure that your new
|
||||||
@ -145,7 +148,7 @@ can overwrite the following constant:
|
|||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
#include "fsl_clock_config.h"
|
#include "fsl_clock_config.h"
|
||||||
|
|
||||||
const clock_arm_pll_config_t armPllConfig_BOARD_BootClockRUN = {
|
const clock_arm_pll_config_t armPllConfig_BOARD_BootClockRUN = {
|
||||||
.loopDivider = 100,
|
.loopDivider = 100,
|
||||||
.src = 0,
|
.src = 0,
|
||||||
|
@ -12,7 +12,7 @@ The default bootloader on the Raspberry Pi which is used to boot Raspbian
|
|||||||
or other OS can be also used to boot RTEMS. U-boot can also be used.
|
or other OS can be also used to boot RTEMS. U-boot can also be used.
|
||||||
|
|
||||||
Setup SD card
|
Setup SD card
|
||||||
----------------
|
-------------
|
||||||
|
|
||||||
The Raspberry Pis have an unconventional booting mechanism. The GPU
|
The Raspberry Pis have an unconventional booting mechanism. The GPU
|
||||||
boots first, initializes itself, runs the bootloader and starts the CPU.
|
boots first, initializes itself, runs the bootloader and starts the CPU.
|
||||||
@ -20,13 +20,13 @@ The bootloader looks for a kernel image, by default the kernel images must
|
|||||||
have a name of the form ``kernel*.img`` but this can be changed by adding
|
have a name of the form ``kernel*.img`` but this can be changed by adding
|
||||||
`kernel=<img_name>` to ``config.txt``.
|
`kernel=<img_name>` to ``config.txt``.
|
||||||
|
|
||||||
You must provide the required firmware files on the SD card for the GPU to proceed,
|
You must provide the required firmware files on the SD card for the GPU to
|
||||||
and thereby to boot RTEMS.
|
proceed, and thereby to boot RTEMS. The BSP currently boots up with an older
|
||||||
The BSP currently boots up with an older version of the official firmware. These files
|
version of the official firmware. These files can be downloaded from `the
|
||||||
can be downloaded from
|
Raspberry Pi Firmware Repository
|
||||||
`the Raspberry Pi Firmware Repository <https://github.com/raspberrypi/firmware/tree/1.20200601/boot>`_.
|
<https://github.com/raspberrypi/firmware/tree/1.20200601/boot>`_. You can
|
||||||
You can remove the ``kernel*.img`` files if you want to, but don't touch
|
remove the ``kernel*.img`` files if you want to, but don't touch the other
|
||||||
the other files.
|
files.
|
||||||
|
|
||||||
Copy these files in to a SD card with FAT filesystem.
|
Copy these files in to a SD card with FAT filesystem.
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ To create the kernel image:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
$ arm-rtems5-objcopy -Obinary hello.exe kernel.img
|
$ xsarm-rtems@rtems-ver-major@-objcopy -Obinary hello.exe kernel.img
|
||||||
|
|
||||||
Copy the kernel image to the SD card.
|
Copy the kernel image to the SD card.
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ Make sure you have these lines below, in your ``config.txt``.
|
|||||||
kernel=kernel.img
|
kernel=kernel.img
|
||||||
|
|
||||||
SPI Driver
|
SPI Driver
|
||||||
------------
|
----------
|
||||||
|
|
||||||
SPI drivers are registered by the ``rpi_spi_init(bool bidirectional_mode)`` function.
|
SPI drivers are registered by the ``rpi_spi_init(bool bidirectional_mode)`` function.
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ SPI drivers are registered by the ``rpi_spi_init(bool bidirectional_mode)`` func
|
|||||||
}
|
}
|
||||||
|
|
||||||
I2C Driver
|
I2C Driver
|
||||||
------------
|
----------
|
||||||
|
|
||||||
I2C drivers are registered by the ``rpi_setup_i2c_bus()`` function.
|
I2C drivers are registered by the ``rpi_setup_i2c_bus()`` function.
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ In a new terminal, run GDB using
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
$ arm-rtems5-gdb hello.exe
|
$ arm-rtems@rtems-ver-major@-gdb hello.exe
|
||||||
|
|
||||||
This will open GDB and will load the symbol table from hello.exe. Issue the
|
This will open GDB and will load the symbol table from hello.exe. Issue the
|
||||||
following commands in the GDB prompt.
|
following commands in the GDB prompt.
|
||||||
|
@ -42,13 +42,13 @@ The ``ticker.exe`` file can be found in the BSP build tree at:
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
arm-rtems5/c/xen_virtual/testsuites/samples/ticker.exe
|
arm-rtems@rtems-ver-major@/c/xen_virtual/testsuites/samples/ticker.exe
|
||||||
|
|
||||||
The ``ticker.exe`` elf file must be translated to a binary format.
|
The ``ticker.exe`` elf file must be translated to a binary format.
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
arm-rtems5-objcopy -O binary ticker.exe ticker.bin
|
arm-rtems@rtems-ver-major@-objcopy -O binary ticker.exe ticker.bin
|
||||||
|
|
||||||
Then place the ``ticker.bin`` file on the dom0 filesystem.
|
Then place the ``ticker.bin`` file on the dom0 filesystem.
|
||||||
|
|
||||||
|
@ -6,25 +6,27 @@
|
|||||||
arm (ARM)
|
arm (ARM)
|
||||||
*********
|
*********
|
||||||
|
|
||||||
.. include:: arm/altera-cyclone-v.rst
|
.. toctree::
|
||||||
.. include:: arm/atsam.rst
|
|
||||||
.. include:: arm/beagle.rst
|
arm/altera-cyclone-v.rst
|
||||||
.. include:: arm/csb336.rst
|
arm/atsam.rst
|
||||||
.. include:: arm/csb337.rst
|
arm/beagle.rst
|
||||||
.. include:: arm/edb7312.rst
|
arm/csb336.rst
|
||||||
.. include:: arm/gumstix.rst
|
arm/csb337.rst
|
||||||
.. include:: arm/imx.rst
|
arm/edb7312.rst
|
||||||
.. include:: arm/imxrt.rst
|
arm/gumstix.rst
|
||||||
.. include:: arm/lm3s69xx.rst
|
arm/imx.rst
|
||||||
.. include:: arm/lpc176x.rst
|
arm/imxrt.rst
|
||||||
.. include:: arm/lpc24xx.rst
|
arm/lm3s69xx.rst
|
||||||
.. include:: arm/raspberrypi.rst
|
arm/lpc176x.rst
|
||||||
.. include:: arm/realview-pbx-a9.rst
|
arm/lpc24xx.rst
|
||||||
.. include:: arm/rtl22xx.rst
|
arm/raspberrypi.rst
|
||||||
.. include:: arm/smdk2410.rst
|
arm/realview-pbx-a9.rst
|
||||||
.. include:: arm/stm32f4.rst
|
arm/rtl22xx.rst
|
||||||
.. include:: arm/stm32h7.rst
|
arm/smdk2410.rst
|
||||||
.. include:: arm/tms570.rst
|
arm/stm32f4.rst
|
||||||
.. include:: arm/xen.rst
|
arm/stm32h7.rst
|
||||||
.. include:: arm/xilinx-zynq.rst
|
arm/tms570.rst
|
||||||
.. include:: arm/xilinx-zynqmp.rst
|
arm/xen.rst
|
||||||
|
arm/xilinx-zynq.rst
|
||||||
|
arm/xilinx-zynqmp.rst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user