Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,44 @@ Now select the project in the project explorer:
```
Project Explorer -> embedded_rtps_stm32
```
After selecting the process, right click the hammer button in the navigation bar.
After selecting the project, prepare the config file

```
cd rtps/include/rtps
cp config_stm.h config.h
```
If you are using CMSIS v2, you have to edit the task priorities in `config.h` as follows.

```config.h
l63 const uint8_t SPDP_WRITER_PRIO = 24;
l72 const int THREAD_POOL_WRITER_PRIO = 24;
l73 const int THREAD_POOL_READER_PRIO = 24;
```

Then, right click the hammer button in the navigation bar.
This opens the menu to select the build configuration:
- debug: The debug configuration compiles the code with debug symbols and lowers optimization for debugging.
- release: This configuration disables debug symbols and increases optimizations to maximum.

The selected configuration is then compiled by STM32CubeIDE.

#### Code generation using CubeMX
You also can use the CubeMX code generating feature in CubeIDE to configure the project.
After code generation, you have to do the following steps:

* delete auto-generated `Src/main.c` (**not** `main.cpp`)
* edit `Middlewares/Third_Party/LwIP/system/arc/cc.h l41` as follows
```
//#define LWIP_PROVIDE_ERRNO
#define LWIP_ERRNO_INCLUDE <sys/errno.h>
```
* edit `Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_eth.c l1877` as follows
```
macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_ENABLE;
```
Note that when you change the STM's IP address, you also have to change the IP address configure in `rtps/include/rtps/config.h l37`


#### Flashing the STM32F767ZI
The STM32 should now be connected to the Linux/macOS computer using a micro-USB cable. The cable should be plugged into a USB socket on your computer and into the __debugger__ side of the STM32 Nucleo board.

Expand Down
10 changes: 6 additions & 4 deletions stm32/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
Expand Down Expand Up @@ -41,7 +42,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/embedded_rtps_stm32/rtps/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/embedded_rtps_stm32/rtps/thirdparty/Micro-CDR/include}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1644057191" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1644057191" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="EMBEDDEDRTPS_CONFIG_STM32NF767ZI=1"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.2092753602" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
Expand All @@ -58,7 +59,7 @@
<listOptionValue builtIn="false" value="../Drivers/STM32F7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/netif/ppp"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F7xx/Include"/>
Expand Down Expand Up @@ -98,7 +99,7 @@
<listOptionValue builtIn="false" value="../Drivers/STM32F7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/netif/ppp"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F7xx/Include"/>
Expand Down Expand Up @@ -182,6 +183,7 @@
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
Expand Down Expand Up @@ -214,7 +216,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/embedded_rtps_stm32/rtps/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/embedded_rtps_stm32/rtps/thirdparty/Micro-CDR/include}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1984219413" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1984219413" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="EMBEDDEDRTPS_CONFIG_STM32NF767ZI=1"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1979875715" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
Expand Down
19 changes: 12 additions & 7 deletions stm32/.mxproject

Large diffs are not rendered by default.

Loading