SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
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/

Más contenido relacionado

La actualidad más candente

Back to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality SoftwareBack to the Basics: Principles for Constructing Quality Software
Back to the Basics: Principles for Constructing Quality SoftwareTechWell
 
Testing in a Continuous Delivery Pipeline - Better, Faster, Cheaper
Testing in a Continuous Delivery Pipeline - Better, Faster, CheaperTesting in a Continuous Delivery Pipeline - Better, Faster, Cheaper
Testing in a Continuous Delivery Pipeline - Better, Faster, CheaperGene Gotimer
 
EuroPython 2019: Modern Continuous Delivery for Python Developers
EuroPython 2019: Modern Continuous Delivery for Python DevelopersEuroPython 2019: Modern Continuous Delivery for Python Developers
EuroPython 2019: Modern Continuous Delivery for Python DevelopersPeter Bittner
 
Elite Bug Squashing
Elite Bug SquashingElite Bug Squashing
Elite Bug SquashingTony Brown
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDDevOps.com
 
Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...
Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...
Software Ecosystems as Networks - Advances on the FASTEN project, Paolo Boldi...Fasten Project
 
CPSeis & GeoCraft
CPSeis & GeoCraftCPSeis & GeoCraft
CPSeis & GeoCraftbillmenger
 
DEVNET-1151 DevNet Sandbox 101
DEVNET-1151	DevNet Sandbox 101DEVNET-1151	DevNet Sandbox 101
DEVNET-1151 DevNet Sandbox 101Cisco DevNet
 
11 best practices_for_peer_code_review
11 best practices_for_peer_code_review11 best practices_for_peer_code_review
11 best practices_for_peer_code_reviewSmartBear Software
 
Better Security Testing: Using the Cloud and Continuous Delivery
Better Security Testing: Using the Cloud and Continuous DeliveryBetter Security Testing: Using the Cloud and Continuous Delivery
Better Security Testing: Using the Cloud and Continuous DeliveryGene Gotimer
 
Attacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryAttacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryJames Wickett
 
Software Development Graveyard
Software Development GraveyardSoftware Development Graveyard
Software Development GraveyardErika Barron
 
DevOps in a Regulated and Embedded Environment (AgileDC)
DevOps in a Regulated and Embedded Environment (AgileDC)DevOps in a Regulated and Embedded Environment (AgileDC)
DevOps in a Regulated and Embedded Environment (AgileDC)Arjun Comar
 

La actualidad más candente (14)

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

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

Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Keisuke Takahashi
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...Christopher Diamantopoulos
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPSACA IT-Solutions
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITStijn Wijndaele
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...GetInData
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01Scott Miao
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackQAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17Mario-Leander Reimer
 
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience ReportMaking Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience ReportQAware GmbH
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesWeaveworks
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentAdaCore
 
20160221 va interconnect_pub
20160221 va interconnect_pub20160221 va interconnect_pub
20160221 va interconnect_pubCanturk Isci
 
Genomic Computation at Scale with Serverless, StackStorm and Docker Swarm
Genomic Computation at Scale with Serverless, StackStorm and Docker SwarmGenomic Computation at Scale with Serverless, StackStorm and Docker Swarm
Genomic Computation at Scale with Serverless, StackStorm and Docker SwarmDmitri Zimine
 
[Devopsdays2021] Roll Your Product with Kaizen Culture
[Devopsdays2021] Roll Your Product with Kaizen Culture[Devopsdays2021] Roll Your Product with Kaizen Culture
[Devopsdays2021] Roll Your Product with Kaizen CultureWoohyeok Kim
 
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...Edge AI and Vision Alliance
 
Journey to cloud engineering
Journey to cloud engineeringJourney to cloud engineering
Journey to cloud engineeringMd. Sadhan Sarker
 
Things You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst IT
Things You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst ITThings You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst IT
Things You MUST Know Before Deploying OpenStack: Bruno Lago, Catalyst ITOpenStack
 

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

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

Más de Mike Long

Test Driven Compliance
Test Driven ComplianceTest Driven Compliance
Test Driven ComplianceMike Long
 
Designing a secure software development process with DevOps
Designing a secure software development process with DevOpsDesigning a secure software development process with DevOps
Designing a secure software development process with DevOpsMike Long
 
Avoiding the agile alignment trap
Avoiding the agile alignment trapAvoiding the agile alignment trap
Avoiding the agile alignment trapMike Long
 
Avoiding the Agile Alignment Trap with DevOps
Avoiding the Agile Alignment Trap with DevOpsAvoiding the Agile Alignment Trap with DevOps
Avoiding the Agile Alignment Trap with DevOpsMike Long
 
Continuous delivery of embedded systems embedded meetup
Continuous delivery of embedded systems   embedded meetupContinuous delivery of embedded systems   embedded meetup
Continuous delivery of embedded systems embedded meetupMike Long
 
Object Calisthenics Refactoring Dojo
Object Calisthenics Refactoring DojoObject Calisthenics Refactoring Dojo
Object Calisthenics Refactoring DojoMike Long
 
Unit Testing Legacy C
Unit Testing Legacy CUnit Testing Legacy C
Unit Testing Legacy CMike Long
 

Más de Mike Long (8)

Test Driven Compliance
Test Driven ComplianceTest Driven Compliance
Test Driven Compliance
 
Designing a secure software development process with DevOps
Designing a secure software development process with DevOpsDesigning a secure software development process with DevOps
Designing a secure software development process with DevOps
 
Avoiding the agile alignment trap
Avoiding the agile alignment trapAvoiding the agile alignment trap
Avoiding the agile alignment trap
 
Avoiding the Agile Alignment Trap with DevOps
Avoiding the Agile Alignment Trap with DevOpsAvoiding the Agile Alignment Trap with DevOps
Avoiding the Agile Alignment Trap with DevOps
 
Continuous delivery of embedded systems embedded meetup
Continuous delivery of embedded systems   embedded meetupContinuous delivery of embedded systems   embedded meetup
Continuous delivery of embedded systems embedded meetup
 
Object Calisthenics Refactoring Dojo
Object Calisthenics Refactoring DojoObject Calisthenics Refactoring Dojo
Object Calisthenics Refactoring Dojo
 
Metricide
MetricideMetricide
Metricide
 
Unit Testing Legacy C
Unit Testing Legacy CUnit Testing Legacy C
Unit Testing Legacy C
 

Último

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

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/