SlideShare a Scribd company logo
C++ for Marine Streamer
Positioning & Navigation




              Mike Long
       Schlumberger Western Geco
Our Technologies and Services
             Schlumberger Information                                         Western Geco
             Solutions

                                                                                             Drilling &
                                                                                             Measurements
Data & Consulting
Services

                                         Reservoir
                                        Management            Reservoir
                                                           Characterization
Integrated
Project                                                                                             Wireline
Management
                                              Reservoir
                                              Production




          Artificial Lift                                                                    Well Testing



                             Completions                            Well Services
Western Geco : Seismic acquistion




   You Tube - marine seismic acquisition
Deployment Configuration
Streamer Navigation & Positioning
Western Geco : Technical Challenges
   Data Volume
      Tens of thousands of sensors
      acquiring real time data (+ranging
      and status)
   Power
      Physically long streamers
   Cost
      Proprietary hardware systems
      Custom chip development
C++ On a Shoestring
Building a gcc cross compile toolchain
for the Stellaris LM3S8962 Cortex-M3
Topics

         What is a toolchain and how to
         choose one?
         Building your own gcc cross
         compile toolchain.
         Stacks & Heaps: Linker Scripts
         Programming and On-chip
         debugging
         The time before "int main()"
         C++ on a diet
         Testable Embedded C++
What makes up a toolchain?
What makes up a toolchain
What makes up a toolchain
How to choose a toolchain

 Step 0, surveying the options:
    Are there any options?
    Paid or Free?
    Are you paying for the compiler or for support?
    Does the compiler require a license?

 Step 1: what is the lifetime of the product/target?
    Projects with a limited shelf life don't need to be too
    concerned about source availability
    Extended life products will benefit from source
    availability
How to choose a toolchain

 Given that we make long-lived products, source availability
 is desirable. So: are there any companies providing
 toolchains?
How to choose a toolchain

 Given that we make long-lived products, source availability
 is desirable. So: are there any companies providing
 toolchains?
How to choose a toolchain

 Given that we make long-lived products, source availability
 is desirable. So: are there any companies providing
 toolchains?




 + Up and running quickly
 + Tested and supported
 - Proprietary startup code and libraries
 - Licence management
How to choose a toolchain

Build from source:
   Some companies provide a "lite" gcc toolchain for free with
   full source.
   Some popular targets already have a gcc cross compiler out
   of the box.
   If you are really lucky it might even be part of your
   distribution:
        #sudo apt-get install gcc-arm-linux-gnueabi qemu-kvm-extras
   If you are particularly masochistic you can build each
   component from the sources and independently verify each
   component and the dependencies (not for the faint of heart).
   Or you can use a toolchain builder (like crosstool-NG)
How to choose a toolchain
Crosstool-NG

 crosstool-NG is a tool to build cross-toolchains

 Kernel-like menuconfig interface
 Large number of supported architectures
 uClibc-, glibc- or eglibc-based toolchain supported
 Can create toolchains that target linux and bare-metal
 Supports both soft- and hard- float toolchains
 Debug facilities (native and cross gdb, gdbserver)
    Watch out though, the default configuration for cortex-
    m3 doesn't enable gdb. Remember to adjust the config!
Crosstool-NG
 #install crosstool-ng
 bzip2 -d crosstool-ng-1.8.1.tar.bz2
 tar -xf crosstool-ng-1.8.1.tar
 cd crosstool-ng-1.8.1/
 sudo apt-get install awk
 sudo apt-get install gawk
 sudo apt-get install bison
 sudo apt-get install flex
 sudo apt-get install automake
 sudo apt-get install libtool
 sudo apt-get install libncurses-dev
 sudo apt-get install zlib1g-dev
 ./configure
 make
 sudo make install
 mkdir /home/user1/arm-eabi/
 cd /home/user1/arm-eabi/
 #copy sample file for baremetal build to new directory
 cp /home/user1/downloads/crosstool-ng-1.8.1/samples/arm-bare_newlib_cortex_m3_nommu-
 eabi/crosstool.config .config
 #build the entire toolchain
 ct-ng build
Crosstool-NG

 Kernel-like menuconfig interface
 Large number of supported architectures
 uClibc-, glibc- or eglibc-based toolchain supported
 Can create toolchains that target linux and bare-metal
 Supports both soft- and hard- float toolchains
 Debug facilities (native and cross gdb, gdbserver)
    Watch out though, the default configuration for cortex-
    m3 doesn't enable gdb. Remember to adjust the config!
Stacks & Heaps: Linker Scripts
Stacks & Heaps: Linker Scripts

Gcc uses a linker script to decide what goes where, and when:
Stacks & Heaps: Linker Scripts
Stacks & Heaps: Linker Scripts
Stacks & Heaps: Linker Scripts
Stacks & Heaps: Linker Scripts
From link-time to run-time:
Programming and On-chip debugging
The time before "int main()"
The time before "int main()"
The time before "int main()"
C++ on a diet
C++ on a diet

  The standard C and C++ runtime has many code and
  data greedy features.

  How to shave off some of the bloat?
    Minimize standard library use?
    Disable exceptions?
    Restrict dynamic memory allocation?
    Custom heap allocator?
    Disable runtime type identification?
C++ on a diet

  -fno-rtti

  -fno-exceptions

  -nostdlib

  -nostartfiles

  -Xlinker --no-gc-sections
C++ on a diet
C++ on a diet
C++ on a diet
Testable Embedded C++
Testable Embedded C++: HIL
Conclusions

Why would anyone do this?
  Time consuming
  Difficult to estimate
  Hard
Conclusions

Why would anyone do this?   Why would anyone do this?
  Time consuming              Vendor Independence
  Difficult to estimate       Full source
  Hard                        No "magic"
                              Fully configurable
                              Great learning experience
http://www.westerngeco.com/
http://meekrosoft.wordpress.com/
@meekrosoft
Credits
 OpenOCD
 https://sites.google.com/a/stf12.net/developer-sw-fw/eclipse-demo

 Choose You:
 http://www.flickr.com/photos/buzzbishop/3270420690/

 Fish Stack:
 http://www.flickr.com/photos/14903992@N08/4053566319/in/photostream/

 Fish Heap
 http://www.flickr.com/photos/bansal98/2389487868/

 Burger
 http://www.flickr.com/photos/derusha/561781801/

 Salad
 http://www.flickr.com/photos/freddy/39340695/

 Go the right way:
 http://www.flickr.com/photos/elenahneshcuetphotography/4438510791/

More Related Content

PPTX
Cleaning Code - Tools and Techniques for Large Legacy Projects
PPTX
Long Life Software
PDF
Space Codesign ARM Tech Symposium Japan 20141027
PDF
Space Codesign at TandemLaunch 20150414
PDF
IP Reuse Impact on Design Verification Management Across the Enterprise
PDF
Big Ball of Mud: Software Maintenance Nightmares
PDF
BBOM-AgilePT-2010
PDF
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Cleaning Code - Tools and Techniques for Large Legacy Projects
Long Life Software
Space Codesign ARM Tech Symposium Japan 20141027
Space Codesign at TandemLaunch 20150414
IP Reuse Impact on Design Verification Management Across the Enterprise
Big Ball of Mud: Software Maintenance Nightmares
BBOM-AgilePT-2010
Setting up Continuous Delivery Culture for a Large Scale Mobile App

What's hot (14)

PDF
Back to the Basics: Principles for Constructing Quality Software
PPTX
Testing in a Continuous Delivery Pipeline - Better, Faster, Cheaper
PDF
EuroPython 2019: Modern Continuous Delivery for Python Developers
PDF
2014 12-10 aimee
PPTX
Elite Bug Squashing
PDF
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PDF
Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...
PDF
CPSeis & GeoCraft
PDF
DEVNET-1151 DevNet Sandbox 101
PDF
11 best practices_for_peer_code_review
PDF
Better Security Testing: Using the Cloud and Continuous Delivery
PDF
Attacking Pipelines--Security meets Continuous Delivery
PDF
Software Development Graveyard
PPTX
DevOps in a Regulated and Embedded Environment (AgileDC)
Back to the Basics: Principles for Constructing Quality Software
Testing in a Continuous Delivery Pipeline - Better, Faster, Cheaper
EuroPython 2019: Modern Continuous Delivery for Python Developers
2014 12-10 aimee
Elite Bug Squashing
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...
CPSeis & GeoCraft
DEVNET-1151 DevNet Sandbox 101
11 best practices_for_peer_code_review
Better Security Testing: Using the Cloud and Continuous Delivery
Attacking Pipelines--Security meets Continuous Delivery
Software Development Graveyard
DevOps in a Regulated and Embedded Environment (AgileDC)
Ad

Similar to C++ for Marine Streamer Positioning and Navigation - ACCU 2011 (20)

PDF
Trying and evaluating the new features of GlusterFS 3.5
PDF
Introducing CQ 5.1
PDF
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
PDF
'DOCKER' & CLOUD: ENABLERS For DEVOPS
PDF
Docker and Cloud - Enables for DevOps - by ACA-IT
PDF
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
PPTX
20171122 aws usergrp_coretech-spn-cicd-aws-v01
PDF
A hitchhiker‘s guide to the cloud native stack
PDF
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
PDF
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
PDF
Kubecon seattle 2018 workshop slides
PDF
Bounded Model Checking for C Programs in an Enterprise Environment
PDF
Where should I run my code? Serverless, Containers, Virtual Machines and more
PPT
20160221 va interconnect_pub
PDF
Genomic Computation at Scale with Serverless, StackStorm and Docker Swarm
PPTX
[Devopsdays2021] Roll Your Product with Kaizen Culture
PDF
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
PDF
Journey to cloud engineering
PDF
Things You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst IT
PDF
Cmake kitware
Trying and evaluating the new features of GlusterFS 3.5
Introducing CQ 5.1
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
'DOCKER' & CLOUD: ENABLERS For DEVOPS
Docker and Cloud - Enables for DevOps - by ACA-IT
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
20171122 aws usergrp_coretech-spn-cicd-aws-v01
A hitchhiker‘s guide to the cloud native stack
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
Kubecon seattle 2018 workshop slides
Bounded Model Checking for C Programs in an Enterprise Environment
Where should I run my code? Serverless, Containers, Virtual Machines and more
20160221 va interconnect_pub
Genomic Computation at Scale with Serverless, StackStorm and Docker Swarm
[Devopsdays2021] Roll Your Product with Kaizen Culture
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
Journey to cloud engineering
Things You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst IT
Cmake kitware
Ad

More from Mike Long (8)

PDF
Test Driven Compliance
PDF
Designing a secure software development process with DevOps
PDF
Avoiding the agile alignment trap
PDF
Avoiding the Agile Alignment Trap with DevOps
PDF
Continuous delivery of embedded systems embedded meetup
PPTX
Object Calisthenics Refactoring Dojo
PPTX
Metricide
PDF
Unit Testing Legacy C
Test Driven Compliance
Designing a secure software development process with DevOps
Avoiding the agile alignment trap
Avoiding the Agile Alignment Trap with DevOps
Continuous delivery of embedded systems embedded meetup
Object Calisthenics Refactoring Dojo
Metricide
Unit Testing Legacy C

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Understanding_Digital_Forensics_Presentation.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

C++ for Marine Streamer Positioning and Navigation - ACCU 2011

  • 1. C++ for Marine Streamer Positioning & Navigation Mike Long Schlumberger Western Geco
  • 2. Our Technologies and Services Schlumberger Information Western Geco Solutions Drilling & Measurements Data & Consulting Services Reservoir Management Reservoir Characterization Integrated Project Wireline Management Reservoir Production Artificial Lift Well Testing Completions Well Services
  • 3. Western Geco : Seismic acquistion You Tube - marine seismic acquisition
  • 5. Streamer Navigation & Positioning
  • 6. Western Geco : Technical Challenges Data Volume Tens of thousands of sensors acquiring real time data (+ranging and status) Power Physically long streamers Cost Proprietary hardware systems Custom chip development
  • 7. C++ On a Shoestring Building a gcc cross compile toolchain for the Stellaris LM3S8962 Cortex-M3
  • 8. Topics What is a toolchain and how to choose one? Building your own gcc cross compile toolchain. Stacks & Heaps: Linker Scripts Programming and On-chip debugging The time before "int main()" C++ on a diet Testable Embedded C++
  • 9. What makes up a toolchain?
  • 10. What makes up a toolchain
  • 11. What makes up a toolchain
  • 12. How to choose a toolchain Step 0, surveying the options: Are there any options? Paid or Free? Are you paying for the compiler or for support? Does the compiler require a license? Step 1: what is the lifetime of the product/target? Projects with a limited shelf life don't need to be too concerned about source availability Extended life products will benefit from source availability
  • 13. How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any companies providing toolchains?
  • 14. How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any companies providing toolchains?
  • 15. How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any companies providing toolchains? + Up and running quickly + Tested and supported - Proprietary startup code and libraries - Licence management
  • 16. How to choose a toolchain Build from source: Some companies provide a "lite" gcc toolchain for free with full source. Some popular targets already have a gcc cross compiler out of the box. If you are really lucky it might even be part of your distribution: #sudo apt-get install gcc-arm-linux-gnueabi qemu-kvm-extras If you are particularly masochistic you can build each component from the sources and independently verify each component and the dependencies (not for the faint of heart). Or you can use a toolchain builder (like crosstool-NG)
  • 17. How to choose a toolchain
  • 18. Crosstool-NG crosstool-NG is a tool to build cross-toolchains Kernel-like menuconfig interface Large number of supported architectures uClibc-, glibc- or eglibc-based toolchain supported Can create toolchains that target linux and bare-metal Supports both soft- and hard- float toolchains Debug facilities (native and cross gdb, gdbserver) Watch out though, the default configuration for cortex- m3 doesn't enable gdb. Remember to adjust the config!
  • 19. Crosstool-NG #install crosstool-ng bzip2 -d crosstool-ng-1.8.1.tar.bz2 tar -xf crosstool-ng-1.8.1.tar cd crosstool-ng-1.8.1/ sudo apt-get install awk sudo apt-get install gawk sudo apt-get install bison sudo apt-get install flex sudo apt-get install automake sudo apt-get install libtool sudo apt-get install libncurses-dev sudo apt-get install zlib1g-dev ./configure make sudo make install mkdir /home/user1/arm-eabi/ cd /home/user1/arm-eabi/ #copy sample file for baremetal build to new directory cp /home/user1/downloads/crosstool-ng-1.8.1/samples/arm-bare_newlib_cortex_m3_nommu- eabi/crosstool.config .config #build the entire toolchain ct-ng build
  • 20. Crosstool-NG Kernel-like menuconfig interface Large number of supported architectures uClibc-, glibc- or eglibc-based toolchain supported Can create toolchains that target linux and bare-metal Supports both soft- and hard- float toolchains Debug facilities (native and cross gdb, gdbserver) Watch out though, the default configuration for cortex- m3 doesn't enable gdb. Remember to adjust the config!
  • 21. Stacks & Heaps: Linker Scripts
  • 22. Stacks & Heaps: Linker Scripts Gcc uses a linker script to decide what goes where, and when:
  • 23. Stacks & Heaps: Linker Scripts
  • 24. Stacks & Heaps: Linker Scripts
  • 25. Stacks & Heaps: Linker Scripts
  • 26. Stacks & Heaps: Linker Scripts
  • 27. From link-time to run-time: Programming and On-chip debugging
  • 28. The time before "int main()"
  • 29. The time before "int main()"
  • 30. The time before "int main()"
  • 31. C++ on a diet
  • 32. C++ on a diet The standard C and C++ runtime has many code and data greedy features. How to shave off some of the bloat? Minimize standard library use? Disable exceptions? Restrict dynamic memory allocation? Custom heap allocator? Disable runtime type identification?
  • 33. C++ on a diet -fno-rtti -fno-exceptions -nostdlib -nostartfiles -Xlinker --no-gc-sections
  • 34. C++ on a diet
  • 35. C++ on a diet
  • 36. C++ on a diet
  • 39. Conclusions Why would anyone do this? Time consuming Difficult to estimate Hard
  • 40. Conclusions Why would anyone do this? Why would anyone do this? Time consuming Vendor Independence Difficult to estimate Full source Hard No "magic" Fully configurable Great learning experience
  • 42. Credits OpenOCD https://sites.google.com/a/stf12.net/developer-sw-fw/eclipse-demo Choose You: http://www.flickr.com/photos/buzzbishop/3270420690/ Fish Stack: http://www.flickr.com/photos/14903992@N08/4053566319/in/photostream/ Fish Heap http://www.flickr.com/photos/bansal98/2389487868/ Burger http://www.flickr.com/photos/derusha/561781801/ Salad http://www.flickr.com/photos/freddy/39340695/ Go the right way: http://www.flickr.com/photos/elenahneshcuetphotography/4438510791/