Hello everyone how i can make an app on C, i made SHA512 module, it works so slow!
source
maybe possible to make it! please help.
Hello everyone how i can make an app on C, i made SHA512 module, it works so slow!
source
maybe possible to make it! please help.
There is no option to use anything but Monkey C.
It's very, very unlikely that Garmin would provide an SDK to support another language. It's more than enough work to support one.
I'm hoping that the code for the Monkey C cryptography module is implemented in something that isn't Monkey C, like whatever language the firmware uses. Elsewhere, somebody claimed that the firmware is…
There's not much reason to expect the modules are written in Monkey C.
Agreed. I just wouldn't want to assume. It's just my educated guess that the modules are written in the same language…
You’ll never see that.
The point of Monkey C is to provide customization but to sandbox it.
Garmin doesn’t want your programs to compromise the operation of their devices. So, they limit what you can do.
got it, so impossible implement the sha512? or core team can include it into Toybox?
i just made it on MonkeyC but i cannot hash 64 byte in one UI interaction
got it, so impossible implement the sha512? or core team can include it into Toybox?
Oh my bad I misunderstood your OP and didn't realize you implemented SHA512 in Monkey C even though that's literally what you said haha. (I originally thought that's what you meant, but then I glanced at your code and got tripped up by the built-in Cryptography call for SHA256).
i just made it on MonkeyC but i cannot hash 64 byte in one UI interaction
I assume you're getting a watchdog timeout? Or maybe the UI is just too slow?
If it's a watchdog timeout, you can try breaking the algorithm into multiple pieces to avoid the timeout. You might also want to display a progress bar while the algorithm is running.
or core team can include it into Toybox?
Don’t expect Garmin to add this (or much of anything). Unless it’s going to be useful to many developers.
Keep in mind there are memory constraints and the CPUs are slow. Garmin can’t add everything people ask for.
Monkey C development is a case of learning how to work within the limited system provided.
i understand garmin is using 32byte CPU, but anyway it should be enough for calc sha512. I everytime call VM for run next step cal sha512, it takes a lot of time. I know devices which has much weaker CPU but it calc sha512 very faster.
Are you getting a watchdog timeout (something asked earlier)?
However fast you think it should be, it’s actually slow.
It’s extremely unlikely that Garmin is going to do anything to change that.
I know devices which has much weaker CPU but it calc sha512 very faster.
You could try using the new Garmin optimization options or optimizing by hand. Perhaps manually inlining some of your function calls will speed up your code, although I'm not sure if the overhead for function calls is a huge bottleneck here or not.
Hello, nice idea, but where i can find information about this option?
i calc it via UI update you can see in the source
Thanks guys for your support!
Thanks guys for your support!
No worries!
Hello, nice idea, but where i can find information about this option?
It's only available in a beta SDK for now:
https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/optimal-monkey-c
Some discussion here:
https://forums.garmin.com/developer/connect-iq/f/discussion/297806/code-optimization
It does seem like currently, most or all of the optimizations are for size, so you may not actually get any speed increase. Based on the available command line options for optimization, it may be that speed optimizations are coming in the future.