Closed Henryforce closed 2 weeks ago
I think that this thread is discussing the same issue and it mentions some workarounds/solutions: https://github.com/apple/swift-embedded-examples/issues/17
Thanks for sharing! I will close this item as it is being tracked in that thread instead.
I am not sure if I should post the issue here or in the embedded Swift repo but in the latest ESP IDF
v5.2.2
with the latest Swift toolchainorg.swift.59202406131a
the call to Int.random(0..<360) in the provided blink example is causing an abort().Logs are as follows:
The logs seem to confirm an issue with the random call with the current setup in my local machine.
My current workaround is to avoid using Int.random and use the native ESP Random Number Generator API by replacing:
for
around line 24 of Main.swift (note that I also included
#include "esp_random.h"
in the BridgingHeader.h file)