diff --git a/README.md b/README.md index d520e09..fc66a3c 100644 --- a/README.md +++ b/README.md @@ -53,17 +53,22 @@ this work with the Eclipse IDE. Other IDEs or the command line can be used as we long as OpenOCD integration is given. Debug otuput can be read directly from the USB connection to the board. -## Prerequisite +## Prerequisites + +See [Prerequisites](#prereq) for detailed instructions on how to set them up. 1. [RTEMS BSP](https://docs.rtems.org/branches/master/user/bsps/bsps-arm.html#id25) `arm/stm32h7` installed (`arm-rtems6`) -1. [MinGW64](https://www.msys2.org/) or [Ninja Build](https://ninja-build.org/) installed on Windows. +2. [RTEMS LwIP support](https://github.com/rmspacefish/rtems-lwip) installed for networking. + It is recommended to generate a build folder first because this will generate the required + `lwipopts.h` file. +3. [MinGW64](https://www.msys2.org/) or [Ninja Build](https://ninja-build.org/) installed on Windows. Not required on Linux. -3. Recommended for application code development: +4. Recommended for application code development: [Eclipse for C/C++](https://www.eclipse.org/downloads/packages/) installed with the Eclipse MCU plugin -4. [OpenOCD](https://xpack.github.io/openocd/) installed for Eclipse debugging -5. STM32 USB drivers installed +5. [OpenOCD](https://xpack.github.io/openocd/) installed for Eclipse debugging +6. STM32 USB drivers installed # Building the software with CMake @@ -128,7 +133,9 @@ related steps. The debug output is also sent via the connected USB port and a blink pattern (1 second interval) can be used to verify the software is running properly. -# Setting up the prerequisites +# Setting up the prerequisites + +## Setting up RTEMS Building a software for RTEMS generally requires building a cross-compiler toolchain for the target architecture first and then building a board or chip specific BSP. @@ -149,11 +156,38 @@ from the RTEMS sources because it contains important fixes for the relatively ne You can also download the pre-compiled toolchains from [here](https://drive.google.com/drive/folders/15pO3FCUwceghrnYjmNlgC6K1Z8D_6iu2?usp=sharing) -## Windows +## Installing LwIP for RTEMS + +If you have not installed lwIP for RTEMS yet, you need to do it once. +Installing it requires two variables: + +- `LWIP_OPTS_PATH`: Path to the `lwiptops.h`. This path will usually be the build folder after + CMake build generation, for example `build-Debug` for a Debug build +- `RTEMS_PREFIX`: RTEMS prefix. The lwIP support will be installed there, and the prefix should + be the same location used when installing the RTEMS BSP +- `RTEMS_BSP`: RTEMS BSP being used + +You can install the lwIP support like this + +```sh +export RTEMS_PREFIX= +cd build-Debug +export LWIP_OPTS_PATH=$(pwd) +./waf configure --prefix=$RTEMS_PREFIX --lwip-opts=$LWIP_OPTS_PATH --rtems-bsp=arm/nucleo-h743zi +./waf +./waf install +``` + +This will install the required headers and `liblwip.a` at the specified prefix so you can +use them when building RTEMS applications. + +## Installing the USB drivers for the STM32 + +### Windows You can install the [STM32 USB drivers](https://www.st.com/en/development-tools/stsw-link009.html) -## Linux +### Linux You can install the STM32 USB drivers on Ubuntu with the following command