diff --git a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java index 74ce2c9f02..2cf6f58239 100644 --- a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java @@ -394,7 +394,8 @@ CodeBuilder generateCMakeCode( if (!targetConfig.get(SingleThreadedProperty.INSTANCE) && platformOptions.platform() != Platform.ZEPHYR - && platformOptions.platform() != Platform.FLEXPRET) { + && platformOptions.platform() != Platform.FLEXPRET + && platformOptions.platform() != Platform.RP2040) { // If threaded computation is requested, add the threads option. cMakeCode.pr("# Find threads and link to it"); cMakeCode.pr("find_package(Threads REQUIRED)"); diff --git a/core/src/main/java/org/lflang/target/property/PlatformProperty.java b/core/src/main/java/org/lflang/target/property/PlatformProperty.java index ec9d97e0d7..12399319f7 100644 --- a/core/src/main/java/org/lflang/target/property/PlatformProperty.java +++ b/core/src/main/java/org/lflang/target/property/PlatformProperty.java @@ -115,9 +115,6 @@ protected PlatformOptions fromString(String string, MessageReporter reporter) { public void validate(TargetConfig config, MessageReporter reporter) { var platform = config.get(PlatformProperty.INSTANCE).platform; switch (platform) { - case RP2040: - validateRP2040(config, reporter); - break; case FLEXPRET: validateFlexPRET(config, reporter); break; @@ -129,15 +126,6 @@ public void validate(TargetConfig config, MessageReporter reporter) { } } - private void validateRP2040(TargetConfig config, MessageReporter reporter) { - var singleThreaded = config.get(SingleThreadedProperty.INSTANCE); - if (!singleThreaded) { - reporter - .at(config.lookup(this), Literals.KEY_VALUE_PAIR__VALUE) - .error("Platform " + Platform.RP2040 + " does not support threading."); - } - } - private void validateFlexPRET(TargetConfig config, MessageReporter reporter) { var platform = config.get(PlatformProperty.INSTANCE); var board = platform.board(); diff --git a/core/src/main/java/org/lflang/target/property/type/PlatformType.java b/core/src/main/java/org/lflang/target/property/type/PlatformType.java index 145553bddd..61ec5b0b1d 100644 --- a/core/src/main/java/org/lflang/target/property/type/PlatformType.java +++ b/core/src/main/java/org/lflang/target/property/type/PlatformType.java @@ -14,7 +14,7 @@ public enum Platform { AUTO, ARDUINO, // FIXME: not multithreaded NRF52("Nrf52", false), - RP2040("Rp2040", false), + RP2040("Rp2040", true), LINUX("Linux", true), MAC("Darwin", true), ZEPHYR("Zephyr", true),