-
Notifications
You must be signed in to change notification settings - Fork 14
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
Working with F prime with Ardunio #38
Comments
You would need to add a new toolchain for the board. Add a file like ####
# portentaH7.cmake:
#
# Toolchain file setup for building F prime for the Portenta H7 hardware platform. This must, by definition, include the
# Arduino framework in order to ensure that basic functions of the Portenta H7 hardware platform are available. This
# toolchain will build the core Portenta H7 Arduino libraries, and include the headers as part of the target include headers.
####
set(CMAKE_CXX_STANDARD 14)
add_compile_options(-std=c++14)
set(CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_SYSTEM_PROCESSOR "arm")
set(CMAKE_CROSSCOMPILING 1)
set(FPRIME_PLATFORM "ArduinoFw")
set(FPRIME_USE_BAREMETAL_SCHEDULER ON)
set(ARDUINO_BUILD_PROPERTIES)
# Prevent test program compiling
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(ARDUINO_FQBN "arduino:mbed_portenta:envie_m7")
add_compile_options(-D_BOARD_PORTENTA_H7)
# Run the base arduino setup which should detect settings!
include("${CMAKE_CURRENT_LIST_DIR}/support/arduino-support.cmake") There needs to be a few things that need to be modified with the drivers and other stuff to support this board, but this would get you started. P.S. I ran into an interesting error with the def identify_line(
stage: Stage,
stages: Dict[Stage, List[str]],
match: Callable[[str], bool],
single: bool = True,
) -> str:
"""Identify a line based on the given stage and criteria.
Args:
- stage: The current stage to identify lines for.
- stages: A dictionary mapping stages to lists of lines.
- match: A function that checks if a line matches a certain condition.
- single: If True (default), raises an exception if multiple matching lines are found.
Returns:
- The identified line (str).
Raises:
- MissingStageException: If no lines are found for the given stage.
- MultipleInvocationException: If multiple matching lines are found when 'single' is True.
"""
stage_lines = stages.get(stage, [])
matching_lines = [line for line in stage_lines if match(line)]
if not matching_lines:
return stage_lines[0]
# raise MissingStageException(stage)
if single and len(matching_lines) > 1:
print('\n'.join(matching_lines))
raise MultipleInvocationException
return matching_lines[0] And then I managed to get to a 100% build, but ended with this error:
I currently don't have much time to test right now, but hopefully these pointers can get you started in debugging. |
I am working with an Arduino Portenta with an M4 and M7 chip inside of it and was wondering if it was possible to use F prime with it all ive seen on the readme and online seem to give me no clear answer on how to do it.
The text was updated successfully, but these errors were encountered: