Upload
chris-simmonds
View
252
Download
1
Embed Size (px)
Citation preview
10 things that make softwareintegration easier
H/WExpo 2016
10 things that make software integration easier 1 Copyright © 2011-2016, 2net Ltd
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
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
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
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
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
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
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
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
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
3: Fit a JTAG connector
• How else to debug the bootloader?
10 things that make software integration easier 8 Copyright © 2011-2016, 2net Ltd
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
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
6: Fit more flash memory
• See 5
10 things that make software integration easier 11 Copyright © 2011-2016, 2net Ltd
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
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
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
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
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
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
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