Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Add nucleo_f412zg target and example #1418

Closed
wants to merge 1 commit into from

Conversation

turbinenreiter
Copy link

This PR adds support for the NUCLEO-F412ZG board.

  • build.sh in the zephyr example now takes BOARD as argument
  • build.sh in the zephyr example now takes ZEPHYR_BASE as argument
  • NUCLEO-F412ZG added to platforms
  • NUCLEO-F412ZG added to c_interop in the zephyr example
  • a separate main.kt for each target

I don't know how useful this PR is and how it relates to the plans for the zephyr targets, but it sure can act as a reference on which changes are needed at the moment to add a board target.
I'd be happy about feedback and also directions on how to go on, so I can make sure my efforts are in line with the projects plans.

@turbinenreiter
Copy link
Author

(And yes, I will clean up the commits.)

@alexander-gorshenev
Copy link
Contributor

So, is it blinking?

@turbinenreiter
Copy link
Author

It is!

https://youtu.be/5QSA2teJM6A

Change main to use nucleo instead of disco library

Add optional build for two different boards

Change main to use nucleo instead of disco library

Add optional build for two different boards
@jwoolston
Copy link
Contributor

@turbinenreiter I know this has sat open for a bit and things have changed. Out of curiosity, to help me debug some of my own issues, if you use the latest kotlin-native/zephyr, does this still work? If not, what version of each were you using?

@turbinenreiter
Copy link
Author

I'm not sure if it works on the latest. I havn't been working on it in the meantime and I don't have the toolchain set up anymore. I used whatever the latest version was in March last year.

@sbogolepov
Copy link
Contributor

sbogolepov commented Feb 20, 2021

Hi. First of all, thank you for the PR!
Unfortunately, I have to close it for the following reasons:

  1. Zephyr target has proven to be a bad extension point for arbitrary targets. For example, it's hard to provide support for these targets in tooling and kotlinx.libraries.
  2. Another major problem is keeping target support up to date with changes in the compiler and runtime. It's already hard with the current set of targets, so we have to be quite conservative when deciding to support a new native target in Kotlin.

As I mentioned here, we have some ideas about a solution for these problems, but it is no easy task to implement them.

@sbogolepov sbogolepov closed this Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants