Skip to content

Add a demo for using LVGL, DRAM, LLVM Toolchain, ELF on an STM32F746G discovery board #104

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

kubamracek
Copy link
Collaborator

@kubamracek kubamracek commented Apr 10, 2025

See:

TODOs:

  • Add a README.md
  • Comment and explain the linker script and the way the relocation works
  • Sink down the ELF section section symbol start/end extraction from the Makefile into elf2hex.py
  • Add an entry with photo to the top-level README
  • Add a CI preset
  • Fix lint issues
  • Add a SDL-based simulator

@kubamracek kubamracek requested a review from rauhul as a code owner April 10, 2025 05:23
@kubamracek
Copy link
Collaborator Author

Phew, the CI finally passes

@@ -42,5 +46,12 @@ jobs:
- name: Build ${{ matrix.example }}
working-directory: ${{ matrix.example }}
run: |
export STM_BOARD=STM32F746G_DISCOVERY
./build-elf.sh
if [[ "${{ matrix.example }}" == "stm32-blink" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should make this part of matrix. instead of manually switching

@@ -0,0 +1,71 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the format file at the repo root?

@@ -0,0 +1 @@
main-snapshot-2025-03-28
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to the repo root? It would be nice to have all examples on the same version. We should later update the GitHub actions to reference this file.

##
## This source file is part of the Swift open source project
##
## Copyright (c) 2023 Apple Inc. and the Swift project authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date

build:
@echo "checking dependencies..."

# TODO: Check that we have swiftly and recent Swift main toolchain
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm?

}
},
{
"identity" : "swiftsdl2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this avoidable?

1. Connect the STM32F746G-DISCO board via the ST-LINK USB port to your Mac.
2. Install a recent nightly "main" Swift toolchain. This is best done using `swiftly`, for example with:
```console
$ swiftly install main-snapshot-2025-04-12
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should tell people to install swiftly and instead rely on the .swift-version in this repo. This allows users to download the repo and not have to worry about manually selecting a compatible toolchain. Thats our/ci's responsibility.

#include <string.h>
#include <stdint.h>

int getentropy(char *buffer, size_t length) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add a disclaimer to this implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants