21
10 things that make software integration easier H/WExpo 2016 10 things that make software integration easier 1 Copyright © 2011-2016, 2net Ltd

10 ways hardware engineers can make software integration easier

Embed Size (px)

Citation preview

Page 1: 10 ways hardware engineers can make software integration easier

10 things that make softwareintegration easier

H/WExpo 2016

10 things that make software integration easier 1 Copyright © 2011-2016, 2net Ltd

Page 2: 10 ways hardware engineers can make software integration easier

About Chris Simmonds• Consultant and trainer• Author of Mastering Embedded Linux

Programming• Working with embedded Linux since 1999• Android since 2009• Speaker at many conferences and

workshops"Looking after the Inner Penguin" blog at http://2net.co.uk/

https://uk.linkedin.com/in/chrisdsimmonds/

https://google.com/+chrissimmonds

10 things that make software integration easier 2 Copyright © 2011-2016, 2net Ltd

Page 3: 10 ways hardware engineers can make software integration easier

The problem

• Q. How many hardware engineers does it take tochange a light bulb?

• A. None: we’ll fix it in software

• Q. How many software engineers does it take tochange a light bulb?

• A. None: that’s a hardware problem

10 things that make software integration easier 3 Copyright © 2011-2016, 2net Ltd

Page 4: 10 ways hardware engineers can make software integration easier

The problem

• Q. How many hardware engineers does it take tochange a light bulb?

• A. None: we’ll fix it in software

• Q. How many software engineers does it take tochange a light bulb?

• A. None: that’s a hardware problem

10 things that make software integration easier 3 Copyright © 2011-2016, 2net Ltd

Page 5: 10 ways hardware engineers can make software integration easier

The problem

• Q. How many hardware engineers does it take tochange a light bulb?

• A. None: we’ll fix it in software

• Q. How many software engineers does it take tochange a light bulb?

• A. None: that’s a hardware problem

10 things that make software integration easier 3 Copyright © 2011-2016, 2net Ltd

Page 6: 10 ways hardware engineers can make software integration easier

The problem

• Q. How many hardware engineers does it take tochange a light bulb?

• A. None: we’ll fix it in software

• Q. How many software engineers does it take tochange a light bulb?

• A. None: that’s a hardware problem

10 things that make software integration easier 3 Copyright © 2011-2016, 2net Ltd

Page 7: 10 ways hardware engineers can make software integration easier

Some ideas

• Here are my top 10 ideas that will make softwareintegration easier, faster and less stressful

• I work mostly with Linux and Android, so they arebiased in that direction...

10 things that make software integration easier 4 Copyright © 2011-2016, 2net Ltd

Page 8: 10 ways hardware engineers can make software integration easier

1: Choose chips with good softwaresupport

• Lack of support for $OS is biggest bugbear

• Don’t rely on what the salesman says: demand tosee the code

• Check that it:

• is up to date

• works with the version of $OS you are using

• will be supported over the lifetime of your product

10 things that make software integration easier 5 Copyright © 2011-2016, 2net Ltd

Page 9: 10 ways hardware engineers can make software integration easier

Background on vendor kernels

• In the case of Linux, ask if the support is in mainline

• If not, why not?

Mainline

Vendor

4.N 4.N+44.N+24.N+1 4.N+3

4.N 4.N+4

10 things that make software integration easier 6 Copyright © 2011-2016, 2net Ltd

Page 10: 10 ways hardware engineers can make software integration easier

2: Stick to the vendor referencedesign

• Keep it simple: minimal changes are good for us

10 things that make software integration easier 7 Copyright © 2011-2016, 2net Ltd

Page 11: 10 ways hardware engineers can make software integration easier

3: Fit a JTAG connector

• How else to debug the bootloader?

10 things that make software integration easier 8 Copyright © 2011-2016, 2net Ltd

Page 12: 10 ways hardware engineers can make software integration easier

4: Fit a serial console

• Once the $OS kernel has started, debug is usuallyvia a serial console

• It is really helpful to reserve a UART for this purpose

10 things that make software integration easier 9 Copyright © 2011-2016, 2net Ltd

Page 13: 10 ways hardware engineers can make software integration easier

5: Fit more RAM

• Double it!

• You would be surprised how much memory we canuse up

• It takes developement time to reduce the memoryfootprint

10 things that make software integration easier 10 Copyright © 2011-2016, 2net Ltd

Page 14: 10 ways hardware engineers can make software integration easier

6: Fit more flash memory

• See 5

10 things that make software integration easier 11 Copyright © 2011-2016, 2net Ltd

Page 15: 10 ways hardware engineers can make software integration easier

7: Think about in-field update

• Double amount of flash for redundant copies of OS

• Or, fit removeable storage (USB, uSD) for localupgrade

10 things that make software integration easier 12 Copyright © 2011-2016, 2net Ltd

Page 16: 10 ways hardware engineers can make software integration easier

8: Don’t use the main CPU to flash anLED

• Use LED with flash mode: saves waking the mainCPU up every half cycle

• Likewise, maybe use a buzzer rather than employinga full audio stack to sound an alert

10 things that make software integration easier 13 Copyright © 2011-2016, 2net Ltd

Page 17: 10 ways hardware engineers can make software integration easier

9: Hard real-time in microcontroller

• In the case of Linux, it can perform hard real-timemission-critical tasks

• But, bear in mind that the hardware of a typical SoCis not deterministic

• Probably better to offload to a PIC or Cortex-M

10 things that make software integration easier 14 Copyright © 2011-2016, 2net Ltd

Page 18: 10 ways hardware engineers can make software integration easier

10: Anti-brick mode

• Provide some way to recover when the bootloader isbroken

• e.g. image load via USB, serial, JTAG

10 things that make software integration easier 15 Copyright © 2011-2016, 2net Ltd

Page 19: 10 ways hardware engineers can make software integration easier

Bonus: Don’t multiplx those pins

• Try to avoid multiplexing ports (e.g. serial) so that oneport can perform several different roles

• It complicates drivers and applications

• There is always a case when you need both functionsat the same time

• Example: serial console and GSM modemmultiplexed to the same port, making it difficult todebug the modem

10 things that make software integration easier 16 Copyright © 2011-2016, 2net Ltd

Page 20: 10 ways hardware engineers can make software integration easier

Bonus: Board ident

• Fit some means of identifying one version of a boardfrom another (e.g. GPIO pins with pull up/downresistors)

• Means that one s/w image can be used on multipleboards

• (make sure there are enough bits to cover theanticipated number of variants)

10 things that make software integration easier 17 Copyright © 2011-2016, 2net Ltd

Page 21: 10 ways hardware engineers can make software integration easier

Utopia

Stopping Bootlog daemon: bo

Poky (Yocto Project Refer

sama5d4-xplained login: rootroot@sama5d4-xplained:~# root@sama5d4-xplained:~# root@sama5d4-xplained:~#

• Hardware and software engineers should talk to eachother more

• It helps if software engineer are involved in the earlydesign

10 things that make software integration easier 18 Copyright © 2011-2016, 2net Ltd