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.

OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio GUERRA (Farjump)

50 views

Published on

La société Farjump propose une solution simple, innovante et bon marché pour la mise au point des systèmes embarqués utilisés dans l'IoT. La solution est basé sur la mise en place d'agents GDB sur la cible.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio GUERRA (Farjump)

  1. 1. © Le logiciel dévore le monde — Marc Andreessen • s Embedded Software Made Easy The GNU Debugger for the benefit of Embedded Engineering
  2. 2. Embedded Software Made Easy 2 Embedded Software Engineering
  3. 3. Embedded Software Made Easy 3 The State of Embedded Engineering 1. Extra Hardware
  4. 4. Embedded Software Made Easy 3 The State of Embedded Engineering 1. Extra Hardware 2. Task-Specific Setup
  5. 5. Embedded Software Made Easy 3 The State of Embedded Engineering 1. Extra Hardware 3. Manual Setup 2. Task-Specific Setup
  6. 6. Embedded Software Made Easy 3 The State of Embedded Engineering 1. Extra Hardware 3. Manual Setup 2. Task-Specific Setup 4. Task-Specific Tools & Environment
  7. 7. Embedded Software Made Easy Unified Embedded Software Engineering 6 MIPS PowerPC Filter & Select the Hardware 1
  8. 8. Embedded Software Made Easy Unified Embedded Software Engineering 6 MIPS PowerPC Filter & Select the Hardware 1 Lock the Hardware 2
  9. 9. Embedded Software Made Easy Unified Embedded Software Engineering 6 MIPS PowerPC Filter & Select the Hardware 1 Lock the Hardware 2 Interface with the Hardware Ports 3
  10. 10. Embedded Software Made Easy Unified Embedded Software Engineering 6 MIPS PowerPC Filter & Select the Hardware 1 Lock the Hardware 2 Prototype, Program, Debug or Test 4 Interface with the Hardware Ports 3
  11. 11. Embedded Software Made Easy Unified Embedded Software Engineering 6 MIPS PowerPC Filter & Select the Hardware 1 Lock the Hardware 2 Prototype, Program, Debug or Test 4 Interface with the Hardware Ports 3 Unlock the Hardware 5
  12. 12. 7 How much time to blink a LED? https://youtu.be/niSBhjHa22I
  13. 13. Embedded Software Made Easy 8 Alpha Embedded System-Level GDB Server
  14. 14. Embedded Software Made Easy 8 Alpha Embedded System-Level GDB Server
  15. 15. Embedded Software Made Easy 8 GDB Alpha Embedded System-Level GDB Server
  16. 16. Embedded Software Made Easy 8 GDB GDB Protocol Alpha Embedded System-Level GDB Server
  17. 17. Embedded Software Made Easy 9 Alpha Embedded System-Level GDB Server Baremetal Software Hardware
  18. 18. Embedded Software Made Easy 9 Alpha Embedded System-Level GDB Server Software Hardware User Space Kernel Space OS Drivers DriversKernel Services Applications
  19. 19. Embedded Software Made Easy10 Maestro Hardware-as-a-Service Server Integrations Engineers Legacy Tools Hardware Systems USB Ethernet Switch Serial
  20. 20. Embedded Software Made Easy10 Maestro Hardware-as-a-Service Server Integrations Engineers Legacy Tools Hardware Systems USB Ethernet Switch Serial
  21. 21. Embedded Software Made Easy10 Maestro Hardware-as-a-Service Shell Command-Line Interface Server Integrations Engineers Legacy Tools Hardware Systems USB Ethernet Switch Serial
  22. 22. Embedded Software Made Easy10 Maestro Hardware-as-a-Service Shell Command-Line Interface Programming Library {API} Server Integrations Engineers Legacy Tools Hardware Systems USB Ethernet Switch Serial
  23. 23. Embedded Software Made Easy10 Maestro Hardware-as-a-Service Shell Command-Line Interface Programming Library {API} Virtual Interfaces Server Integrations Engineers Legacy Tools Hardware Systems USB Ethernet Switch Serial
  24. 24. Embedded Software Made Easy 11 Maestro Hardware-as-a-Service Hardware Targets Microcontrollers, SoCs, FPGAs, DSPs, development boards, etc.
  25. 25. Embedded Software Made Easy Ports 11 Maestro Hardware-as-a-Service Maestro Server Maestro’s configuration file describing the targets it is connected to. Hardware Targets Microcontrollers, SoCs, FPGAs, DSPs, development boards, etc. Ethernet, Serial, Switch, USB
  26. 26. Embedded Software Made Easy PortsTCP Networking 11 Maestro Clients • CLI: day-to-day target management and access; fast shell scripting. • API: software integration of Maestro features into new or existing software tools. Maestro Hardware-as-a-Service Maestro Server Maestro’s configuration file describing the targets it is connected to. Hardware Targets Microcontrollers, SoCs, FPGAs, DSPs, development boards, etc. Ethernet, Serial, Switch, USB
  27. 27. Embedded Software Made Easy 12 Targets General-Purpose Server running Maestro in server mode General-Purpose HUBs to connect the Targets to the Server: USB HUBs, ethernet switch, relays
  28. 28. Embedded Software Made Easy Targets General-Purpose Server running Maestro in server mode General-Purpose HUBs to connect the Targets to the Server: USB HUBs, ethernet switch, relays
  29. 29. Embedded Software Made Easy 14 Server running Maestro in server mode HUBs to connect the Targets to the Server: USB HUBs, ethernet switch, relays Targets
  30. 30. Embedded Software Made Easy 15 Demo Time !
  31. 31. © 16 Listing Targets
  32. 32. © 16 DEVICE ID NAME DRIVER BOUNDARY d49c1819 KMTronic U8CR relay device 41b5177c USB-Serial Converter serial device 5e57e906 USB-Serial Converter serial port 9b2c4cda USB-Serial Converter serial port a4922b30 USB-Serial Converter serial port bae537e2 USB-Serial Converter serial port 10e84693 USB-Serial Converter serial port $ maestro device list
  33. 33. © 17 Server-side Configuration
  34. 34. © 17 […] "mpc5567evb-1": { "ports": { "ethernet": { "type": "ethernet", "ports": { "ip-1": { "type": "ip", "device": "192.168.255.1", "ports": { "alpha": { "gdb": { "type": "udp", "port": 1234 } } } } } }, "serials": { "alpha": { "type": "serial", "device": "41b5177c", "config": { "bps": 115200 } } }, "switches": { "power": { "type": "relay", "relay": 5, "device": "d49c1819" }, "debug": { "type": "relay", "relay": 6, "device": "d49c1819" } } } } […] $ cat targets.json
  35. 35. © 18 […] "mpc5567evb-1": { […] "scenarios": { "modes": { "power": { "states": { "switches.power": "on" }, "debug": { "states": { "switches.reset": "on", "switches.debug": "on" } } } } } } […] $ cat targets.json
  36. 36. © 19 […] "mpc5567evb-1": { […] "labels": { "arch": "powerpc", "cpu": "e200", "board": "mpc5567evb" } } […] $ cat targets.json
  37. 37. © 20 Selecting Targets
  38. 38. © 20 TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false 24d58d09 qemu-powerpc-e500mc false f52c26de rpi-1 false 9cf2b38a rpi-2 false 03d1ecd9 rpi-3 false fc5e2193 rpi-4 false 7ecb7faa rpi-5 false $ $ maestro target list
  39. 39. © 20 TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false 24d58d09 qemu-powerpc-e500mc false f52c26de rpi-1 false 9cf2b38a rpi-2 false 03d1ecd9 rpi-3 false fc5e2193 rpi-4 false 7ecb7faa rpi-5 false $ $ maestro target list $ maestro target list --label arch=powerpc TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false 24d58d09 qemu-powerpc-e500mc false $
  40. 40. © 20 TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false 24d58d09 qemu-powerpc-e500mc false f52c26de rpi-1 false 9cf2b38a rpi-2 false 03d1ecd9 rpi-3 false fc5e2193 rpi-4 false 7ecb7faa rpi-5 false $ $ maestro target list $ maestro target list --label arch=powerpc TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false 24d58d09 qemu-powerpc-e500mc false $$ maestro target list --label arch=powerpc --label cpu=e200 TARGET ID NAME LOCKED COMMENT c4333646 mpc5567evb-1 false
  41. 41. © 21 Locking a Target
  42. 42. © 21 $ maestro target lock --expiration=12h mpc5567evb-1 mpc5567evb-1 $
  43. 43. © 21 $ maestro target lock --expiration=12h mpc5567evb-1 mpc5567evb-1 $ [ { "id": "c4333646", "name": "mpc5567evb-1", "lock": { "timestamp": "2017-12-18T14:48:40.579543034Z", "expiration": 43200000000000, "user": { "id": "julio" } }, "configuration": { […] } } ] $ maestro target inspect mpc5567evb-1
  44. 44. © 22 Waiting for a Target
  45. 45. © 22 mpc5567evb-1 $ $ maestro target lock --expiration=12h mpc5567evb-1
  46. 46. © 22 mpc5567evb-1 $$ maestro target lock mpc5567evb-1 Couldn’t lock the target mpc5567evb-1 $ $ maestro target lock --expiration=12h mpc5567evb-1
  47. 47. © 22 mpc5567evb-1 $$ maestro target lock mpc5567evb-1 Couldn’t lock the target mpc5567evb-1 $ 12 hours later mpc5567evb-1 $ maestro target lock mpc5567evb-1 --wait=13h $ maestro target lock --expiration=12h mpc5567evb-1
  48. 48. © 23 Managing Target Modes
  49. 49. © 23 MODE STATE . !"" power OFF !"" debug INHERITED $ $ maestro target mode get -r mpc5567evb-1
  50. 50. © 23 MODE STATE . !"" power OFF !"" debug INHERITED $ $ maestro target mode get -r mpc5567evb-1 MODE STATE . !"" power ON !"" debug ON $ $ maestro target mode set -r mpc5567evb-1 debug on
  51. 51. © 23 MODE STATE . !"" power OFF !"" debug INHERITED $ $ maestro target mode get -r mpc5567evb-1 MODE STATE . !"" power ON !"" debug ON $ $ maestro target mode set -r mpc5567evb-1 debug on MODE STATE . !"" power ON !"" debug OFF $ maestro target mode set -r mpc5567evb-1 debug off
  52. 52. © 24 Listing Target Ports
  53. 53. © 24 PORT TYPE #"" serials $ !"" alpha serial #"" switches $ #"" reset switch $ #"" power switch $ !"" debug switch !"" ethernet ethernet !"" ip-1 ip !"" alpha !"" gdb udp $ $ maestro target port list mpc5567evb-1
  54. 54. © 24 PORT TYPE #"" serials $ !"" alpha serial #"" switches $ #"" reset switch $ #"" power switch $ !"" debug switch !"" ethernet ethernet !"" ip-1 ip !"" alpha !"" gdb udp $ $ maestro target port list mpc5567evb-1 $ maestro target port list mpc5567evb-1 --label fj.alpha.debug PORT TYPE !"" ethernet ethernet !"" ip-1 ip !"" alpha !"" gdb udp $
  55. 55. © 24 PORT TYPE #"" serials $ !"" alpha serial #"" switches $ #"" reset switch $ #"" power switch $ !"" debug switch !"" ethernet ethernet !"" ip-1 ip !"" alpha !"" gdb udp $ $ maestro target port list mpc5567evb-1 $ maestro target port list mpc5567evb-1 --label fj.alpha.debug PORT TYPE !"" ethernet ethernet !"" ip-1 ip !"" alpha !"" gdb udp $$ maestro target port list mpc5567evb-1 --label fj.alpha.console PORT TYPE !"" serials !"" alpha serial
  56. 56. © 25 Driving Target Ports
  57. 57. © 25 Usage: maestro target port drive mpc5567evb-1 serials.alpha [command] Available Commands: attach Attach local standard intput and output streams to a serial device read Read data from a serial device. virtual Create a virtual serial device write Write data to a serial device. Flags: --bps=uint Serial line baudrate in bytes per second. --min=uint Minimum read size. Block until this amount of bytes is received. (defaults to "1") $ $ maestro target port drive mpc5567evb-1 serials.alpha --help
  58. 58. © 25 Usage: maestro target port drive mpc5567evb-1 serials.alpha [command] Available Commands: attach Attach local standard intput and output streams to a serial device read Read data from a serial device. virtual Create a virtual serial device write Write data to a serial device. Flags: --bps=uint Serial line baudrate in bytes per second. --min=uint Minimum read size. Block until this amount of bytes is received. (defaults to "1") $ $ maestro target port drive mpc5567evb-1 serials.alpha --help 12 bytes written in 176.031µs $ echo 'hello world' | maestro target port drive mpc5567evb-1 serials.alpha write
  59. 59. © 26 Creating Virtual Target Ports
 of their remote physical counterparts
  60. 60. © 26 /dev/pts/23 $ $ maestro target port drive mpc5567evb-1 serials.alpha virtual
  61. 61. © 26 /dev/pts/23 $ $ maestro target port drive mpc5567evb-1 serials.alpha virtual udp://127.0.0.1:43840 $ maestro target port drive mpc5567evb-1 ethernet.ip-1.alpha.gdb virtual
  62. 62. 27 Hello, GDB!
 https://youtu.be/TYnD03A8cZM
  63. 63. 28 GDB Scripting Example Embedded Program’s Execution Benchmark
 https://youtu.be/iFvImG3TzFc
  64. 64. 29 GDB Scripting Example Embedded Program’s Awareness
 https://youtu.be/LJ88V5lfcsM
  65. 65. 30 Semihosting Host/Target Communication
 https://youtu.be/9I7oOMmzuVo
  66. 66. 31 Porting Test Frameworks
 https://youtu.be/uzIuUaknSDg
  67. 67. 32 Continuous Integration
 https://youtu.be/77IdADA9J3U
  68. 68. 33 Embedded Software Made Easy github.com/farjump/raspberry-pi Start Now!

×