C++ for Marine StreamerPositioning & Navigation              Mike Long       Schlumberger Western Geco
Our Technologies and Services             Schlumberger Information                                         Western Geco   ...
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 (+rangin...
C++ On a ShoestringBuilding a gcc cross compile toolchainfor the Stellaris LM3S8962 Cortex-M3
Topics         What is a toolchain and how to         choose one?         Building your own gcc cross         compile tool...
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 ...
How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any comp...
How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any comp...
How to choose a toolchain Given that we make long-lived products, source availability is desirable. So: are there any comp...
How to choose a toolchainBuild from source:   Some companies provide a "lite" gcc toolchain for free with   full source.  ...
How to choose a toolchain
Crosstool-NG crosstool-NG is a tool to build cross-toolchains Kernel-like menuconfig interface Large number of supported a...
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....
Crosstool-NG Kernel-like menuconfig interface Large number of supported architectures uClibc-, glibc- or eglibc-based tool...
Stacks & Heaps: Linker Scripts
Stacks & Heaps: Linker ScriptsGcc 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...
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
ConclusionsWhy would anyone do this?  Time consuming  Difficult to estimate  Hard
ConclusionsWhy would anyone do this?   Why would anyone do this?  Time consuming              Vendor Independence  Difficu...
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...
Upcoming SlideShare
Loading in...5
×

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

2,942

Published on

The slides from my ACCU 2011 conference presentation.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,942
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
44
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

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

  1. 1. C++ for Marine StreamerPositioning & Navigation Mike Long Schlumberger Western Geco
  2. 2. Our Technologies and Services Schlumberger Information Western Geco Solutions Drilling & MeasurementsData & ConsultingServices Reservoir Management Reservoir CharacterizationIntegratedProject WirelineManagement Reservoir Production Artificial Lift Well Testing Completions Well Services
  3. 3. Western Geco : Seismic acquistion You Tube - marine seismic acquisition
  4. 4. Deployment Configuration
  5. 5. Streamer Navigation & Positioning
  6. 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. 7. C++ On a ShoestringBuilding a gcc cross compile toolchainfor the Stellaris LM3S8962 Cortex-M3
  8. 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. 9. What makes up a toolchain?
  10. 10. What makes up a toolchain
  11. 11. What makes up a toolchain
  12. 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 dont need to be too concerned about source availability Extended life products will benefit from source availability
  13. 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. 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. 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. 16. How to choose a toolchainBuild 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. 17. How to choose a toolchain
  18. 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 doesnt enable gdb. Remember to adjust the config!
  19. 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. 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 doesnt enable gdb. Remember to adjust the config!
  21. 21. Stacks & Heaps: Linker Scripts
  22. 22. Stacks & Heaps: Linker ScriptsGcc uses a linker script to decide what goes where, and when:
  23. 23. Stacks & Heaps: Linker Scripts
  24. 24. Stacks & Heaps: Linker Scripts
  25. 25. Stacks & Heaps: Linker Scripts
  26. 26. Stacks & Heaps: Linker Scripts
  27. 27. From link-time to run-time:Programming and On-chip debugging
  28. 28. The time before "int main()"
  29. 29. The time before "int main()"
  30. 30. The time before "int main()"
  31. 31. C++ on a diet
  32. 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. 33. C++ on a diet -fno-rtti -fno-exceptions -nostdlib -nostartfiles -Xlinker --no-gc-sections
  34. 34. C++ on a diet
  35. 35. C++ on a diet
  36. 36. C++ on a diet
  37. 37. Testable Embedded C++
  38. 38. Testable Embedded C++: HIL
  39. 39. ConclusionsWhy would anyone do this? Time consuming Difficult to estimate Hard
  40. 40. ConclusionsWhy 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
  41. 41. http://www.westerngeco.com/http://meekrosoft.wordpress.com/@meekrosoft
  42. 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/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×