Skip to content

Commit

Permalink
Remove fprime-arm-linux (#21)
Browse files Browse the repository at this point in the history
* remove fprime-arm-linux, update docs to reflect changes

* cleanup

---------

Co-authored-by: Justine West <[email protected]>
  • Loading branch information
jwest115 and Justine West authored Jul 17, 2023
1 parent 39f6f91 commit b1d3107
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[submodule "fprime"]
path = fprime
url = http://github.com/nasa/fprime.git
branch = devel
[submodule "fprime-arm-linux"]
path = fprime-arm-linux
url = https://github.com/fprime-community/fprime-arm-linux.git
branch = devel
3 changes: 1 addition & 2 deletions LedBlinker/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
[fprime]
project_root: ../
framework_path: ../fprime
install_directory: ./build-artifacts
library_locations: ../fprime-arm-linux
install_directory: ./build-artifacts
23 changes: 3 additions & 20 deletions docs/running-on-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@

In order to run on hardware, the deployment needs to be built for the given hardware target (a process called cross-compiling). Then the executable needs to be uploaded to the hardware, and the executable needs to be run connecting back to the host running the F´ GDS. This section will walk the user through cross-compiling, uploading, and running on hardware.

## Acquiring Cross-Compilers

In the [environment setup](./prerequisites.md) for this tutorial the Arm Linux cross-compilers were installed. However, the F´ CMake system still needs the appropriate integration files to build. These files are called "CMake Toolchain". There is an F´ package that provides cross-compiler integration for standard ARM Linux cross-compilers (i.e. those provided as binary downloads from ARM).

To install the F´ ARM package, add it as a submodule via `git`:
```shell
# In `led-blinker`
git submodule add https://github.com/fprime-community/fprime-arm-linux.git
git submodule update --init --recursive
```

Next add the package to the `LedBlinker` deployment's `settings.ini` file. In `led-blinker/LedBlinker/settings.ini` add the following to the `[fprime]` section of the file:
## Cross-Compiling for Embedded Arm Linux

```
[fprime]
...
library_locations: ../fprime-arm-linux
```
In the [environment setup](./prerequisites.md) for this tutorial, the ARM Linux cross-compilers were installed. In this section, we will use these compilers to cross-compile for ARM Linux by utilizing integration files called "CMake Toolchain". F´ provides cross-compiler integration for standard ARM Linux cross-compilers (i.e. those provided as binary downloads from ARM).

> Now is a good time to ensure that the ARM toolchains were installed properly. To test run the following command:
> Now is a good time to ensure that the ARM toolchains were installed properly. To test, run the following command:
> ```shell
> # For in-person workhops and 64-bit ARM hardware
> /opt/toolchains/bin/aarch64-none-linux-gnu-gcc -v
Expand All @@ -34,8 +19,6 @@ library_locations: ../fprime-arm-linux
>
> macOS users must run these commands from within the Docker container described in [Appendix I](./appendix-1.md). Ensure this [script](https://github.com/fprime-community/fprime-workshop-led-blinker/main/bin/macos-docker) was downloaded to `led-blinker/bin/macos-docker` and run it in the terminal.
## Cross-Compiling for Embedded Arm Linux
Now cross-compiling is as easy as building the deployment for a specific platform. For users running on 64-bit arm the platform is called `aarch64-linux`, and for users on 32-bit linux use `arm-hf-linux`. This package expects the environment variable `ARM_TOOLS_PATH` to point to the installation directory of the ARM cross-compilers.
> Users need to generate for each platform they wish to run on. We previously generated for our host machine.
Expand Down
2 changes: 1 addition & 1 deletion fprime
Submodule fprime updated 157 files
1 change: 0 additions & 1 deletion fprime-arm-linux
Submodule fprime-arm-linux deleted from b8979f

0 comments on commit b1d3107

Please sign in to comment.