-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gec] fix compilation of secure telemetry module gec_dl #2646
Conversation
also add the support of RNG to ChibiOS arch |
OK, I got it working in NPS! Please make sure you are following the instructions on the wiki. TLDR;The main trick I had to try was to stop and redo the secure link process, after all the other processes started. Also, it takes a few seconds to get the key exchange to finish (not sure what is the holdup. If that doesn't help, reset the Simulator and then the secure link. More infoAfter fetching my commit, please do I am using Minion RP 3 airframe with these changes (you probably just need to change telemetry to
I tested with both Pprzlink 1 and pprzlink 2 You will see the following:
|
The rust warnings are annoying, but apparently they don't affect the functionality. |
@podhrmic I removed the mutex as I think it is not relevant here and makes conflict with uart mutex lock/unlock sequence. |
another question: is the hacl-c lib reentrant or not ? If no, I guess that explains the usage of the mutex...
we should move one of the lock or unlock |
@gautierhattenberger I think changing the mutex sequence to:
makes more sense. Not sure about re-entrancy, but I suspect hacl-c is not reentrant. About the resources - is there an easy way to measure stack usage and/or increase stack size? |
I have recently integrated a shell module and I just repaired the free_stack function, I will try that |
I don't see any huge array in https://github.com/paparazzi/hacl-c - but it is quite possible that all the intermediate computations take some stack space. |
see https://github.com/paparazzi/hacl-c/blob/master/Hacl_SHA2_512.c#L316 |
I guess that would do if the stack is small enough ( 169*64/8=~1kB buffer) |
thread stack should have around 2 Kb free both AP and FBW in case of fixedwing
@gautierhattenberger Did you have to increase the stack size as well? |
Yes, it needs at least 2kB free, so AP (FW) and Main (Rotorcraft) are usually fine, but FBW needs to be increased when using this module. I don't want to have this hard-coded, so I guess it should be specified in the documentation. |
Are you concerned about older boards with smaller memory? I am assuming that would be the downside of having a larger default stack size. |
Basically, yes, I'd rather not change default settings. If more people are using this and it becomes a problem, we can reconsider this and adjust default stack size. |
It compiles, but I'm not 100% sure of the modifications since it is not working, unless it is only a configuration error.