With K/N having been merged into the Kotlin code b...
# embedded-kotlin
n
With K/N having been merged into the Kotlin code base a while back where are the K/N parts located? I am making an attempt to port Kotlin to the RP2040 uC (will be an unofficial Kotlin target called rp2040, IF the porting is successful). Unofficially there was a uC type target (relied on a real time OS; can't remember what it is called) that was part of the Kotlin code base, does it still exist and if so where is it located in the Kotlin code base?
❤️ 2
Having a Porting Kotlin for Dummies type book would be very useful. 😆
Which key files (incl a desc for each one) in the Kotlin code base are important for porting?
Some key things in the Kotlin Std lib might cause porting issues: • Concurrency primitives in the kotlin.native.concurrent package (most uC's don't use a real time OS) • The FileFailedToInitializeException class (uC's don't support the concept of files) • Exception classes
What is the general process for porting Kotlin to a new target?
How is the LLVM toolchain built/setup for a K/N target?
Is there a standard way to test if porting works for a Kotlin target?
Are there any backwards compatibility guarantees with Kotlin's Porting system?
What documentation is available for porting Kotlin to a new target?
Are there any key things to watch out for with porting Kotlin to a new target?
Will there be any major changes to the Porting system in Kotlin 2.0?
When porting Kotlin to a new target is it better to use Kotlin 2.0 rather than 1.8?
d
The OS was Zephyr OS, @napperley, maybe that'll help locate the old code.
n
In the Kotlin code base the NativeDefinitions.bnf file doesn't exist, is there a equivalent file?
After making some changes to the forked Kotlin code base, and running the dist Gradle task an error appears about a missing tool chain dependency:
Copy code
Could not determine the dependencies of task ':kotlin-stdlib:compileMainJdk7Kotlin'.
> Unable to download toolchain matching the requirements ({languageVersion=7, vendor=any, implementation=vendor-specific}) from '<https://api.foojay.io/disco/v3.0/ids/45dfb704e8dcceab434285501d74cd33/redirect>'.
   > Provisioned toolchain '/home/napperley/.gradle/jdks/zing20/zing20.09.1.0-1-jdk7.0.272-linux_x64' could not be probed.
The error has been resolved after installing JDK 7. It turns out that there is a separate Gradle task for building the K/N compiler (known as konan).
Do note that the Issue Tracker has been enabled on the Kotlin fork. Some help would be appreciated with selecting a Family name to replace the old one: https://github.com/napperley/kotlin/issues/1