Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A possible future of resource constrained software development

4,117 views

Published on

by Odin Holmes

Published in: Technology
  • Be the first to comment

  • Be the first to like this

A possible future of resource constrained software development

  1. 1. Your brains are fried, time for a fairy tale A possible future of resource constrained software development Auto-Intern GmbH 1
  2. 2. Once upon a time there was doped silicon Auto-Intern GmbH 2
  3. 3. Auto-Intern GmbH 3
  4. 4. Auto-Intern GmbH 4
  5. 5. Auto-Intern GmbH 5
  6. 6. Auto-Intern GmbH 6
  7. 7. Auto-Intern GmbH 7
  8. 8. Auto-Intern GmbH 8
  9. 9. Auto-Intern GmbH 9
  10. 10. Auto-Intern GmbH 10 while (1) { if (button_a_pushed()) { do_action_a(); } } button_a_pushed() do_action_a()
  11. 11. Auto-Intern GmbH 11 while (1) { if (button_a_pushed()) { do_action_a(); } } button_a_pushed() do_action_a()
  12. 12. Auto-Intern GmbH 12 while (1) { if (button_a_pushed()) { do_action_a(); } if (button_b_pushed()) { do_action_b(); } } button_a_pushed() do_action_a() do_action_b()
  13. 13. Auto-Intern GmbH 13 while (1) { if (button_a_pushed()) { do_action_a(); } if (button_b_pushed()) { do_action_b(); } if (button_c_pushed()) { do_action_c(); } if (button_d_pushed()) { do_action_d(); } } button_a_pushed() do_action_a() do_action_b()
  14. 14. Auto-Intern GmbH 14 while (1) { if (button_a_pushed()) { do_action_a(); } if (button_b_pushed()) { do_action_b(); } if (button_c_pushed()) { do_action_c(); } if (button_d_pushed()) { do_action_d(); } } button_a_pushed() do_action_a() do_action_b() do_action_c()
  15. 15. Auto-Intern GmbH 15 while (1) { if (button_a_pushed()) { do_action_a(); } if (button_b_pushed()) { do_action_b(); } if (button_c_pushed()) { do_action_c(); } if (button_d_pushed()) { do_action_d(); } } do_action_a() + do_action_b() + do_action_c() + do_action_d() < button press frequency
  16. 16. Auto-Intern GmbH 16
  17. 17. Auto-Intern GmbH 17 while (1) { if (uart_received()) { do_uart(); } else if (button_b_pushed()) { do_action_b(); } else if (button_c_pushed()) { do_action_c(); } else if (button_d_pushed()) { do_action_d(); } }
  18. 18. Auto-Intern GmbH 18
  19. 19. Auto-Intern GmbH 19 preemption
  20. 20. Auto-Intern GmbH 20
  21. 21. Auto-Intern GmbH 21
  22. 22. Auto-Intern GmbH 22
  23. 23. Auto-Intern GmbH 23
  24. 24. Auto-Intern GmbH 24
  25. 25. Auto-Intern GmbH 25
  26. 26. Auto-Intern GmbH 26 Navigate the perils of software documentation
  27. 27. Auto-Intern GmbH 27 …and find the magic macro
  28. 28. Auto-Intern GmbH 28
  29. 29. Auto-Intern GmbH 29
  30. 30. Auto-Intern GmbH 30
  31. 31. Auto-Intern GmbH 31 void on_button_a_pressed() { events.push_back(buttons::a); } while (1) { if (events.size() > 0) { switch (events.back()) { case buttons::a: { break; } case buttons::b: { break; } case buttons::c: { break; } case buttons::d: { break; } }; events.pop_back(); } } std::deque<buttons> events; ?
  32. 32. Auto-Intern GmbH 32
  33. 33. Auto-Intern GmbH 33
  34. 34. Auto-Intern GmbH 34
  35. 35. Auto-Intern GmbH 35 void on_button_a_pressed() { events.push_back(buttons::a); } while (1) { if (events.size() > 0) { switch (events.back()) { case buttons::a: { break; } case buttons::b: { break; } case buttons::c: { break; } case buttons::d: { break; } }; events.pop_back(); } }
  36. 36. Auto-Intern GmbH 36
  37. 37. Auto-Intern GmbH 37
  38. 38. Auto-Intern GmbH 38
  39. 39. Auto-Intern GmbH 39
  40. 40. Auto-Intern GmbH 40
  41. 41. Auto-Intern GmbH 41
  42. 42. Auto-Intern GmbH 42 template<class _Other1, class _Other2, class = enable_if_t<is_constructible<_Ty1, _Other1>::value && is_constructible<_Ty2, _Other2>::value>, enable_if_t<is_convertible<_Other1, _Ty1>::value && is_convertible<_Other2, _Ty2>::value, int> = 0> _CONST_FUN pair(_Other1&& _Val1, _Other2&& _Val2) _NOEXCEPT_OP((is_nothrow_constructible<_Ty1, _Other1>::value && is_nothrow_constructible<_Ty2, _Other2>::value)) : first(_STD forward<_Other1>(_Val1)), second(_STD forward<_Other2>(_Val2)) {// construct from moved values } template<class _Other1, class _Other2, class = enable_if_t<is_constructible<_Ty1, _Other1>::value && is_constructible<_Ty2, _Other2>::value>, enable_if_t<!is_convertible<_Other1, _Ty1>::value || !is_convertible<_Other2, _Ty2>::value, int> = 0> _CONST_FUN explicit pair(_Other1&& _Val1, _Other2&& _Val2) _NOEXCEPT_OP((is_nothrow_constructible<_Ty1, _Other1>::value && is_nothrow_constructible<_Ty2, _Other2>::value)) : first(_STD forward<_Other1>(_Val1)), second(_STD forward<_Other2>(_Val2)) {// construct from moved values }
  43. 43. Auto-Intern GmbH 43 void on_button_a_pressed() { events.push_back(buttons::a); } while (1) { if (events.size() > 0) { switch (events.back()) { case buttons::a: { break; } case buttons::b: { break; } case buttons::c: { break; } case buttons::d: { break; } }; events.pop_back(); } }
  44. 44. We need more guarantees • Tool analyzable (statically binding / no recursion) • All memory allocation is a policy • Shared state access is atomic • ISR disabling guarantees • All library code non blocking Auto-Intern GmbH 44
  45. 45. Auto-Intern GmbH 45
  46. 46. Auto-Intern GmbH 46
  47. 47. Auto-Intern GmbH 47
  48. 48. Auto-Intern GmbH 48
  49. 49. Auto-Intern GmbH 49
  50. 50. Auto-Intern GmbH 50

×