Skip to content

Add Arduino Portenta H7 platformio setup instructions #848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,31 @@ pio run --target upload # Flash the firmware
```

An example of a micro-ROS application using PlatformIO is available [here](https://github.com/husarion/micro_ros_stm32_template).

#### Arduino Portenta H7

The `platformio.ini` file for this board must contain:
```
[env:portenta_h7_m7]
platform = ststm32
board = portenta_h7_m7
framework = arduino
extra_scripts = fix_linker.py
lib_deps =
https://github.com/micro-ROS/micro_ros_arduino
build_flags =
-L ./.pio/libdeps/portenta_h7_m7/micro_ros_arduino/src/cortex-m7/fpv5-d16-softfp/
-D TARGET_PORTENTA_H7_M7
```
And create a `fix_linker.py` file with these contents:
```
Import("env")
env["_LIBFLAGS"] = ('-Wl,--start-group -Wl,--whole-archive '
'${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, '
'LIBSUFFIXES, __env__)} -Wl,--no-whole-archive -lstdc++ '
'-lsupc++ -lm -lc -lgcc -lnosys -lmicroros -Wl,--end-group')
```

## How to build the precompiled library

```bash
Expand Down