Your SlideShare is downloading. ×
0
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
C++ for Marine Streamer Positioning and Navigation - ACCU 2011
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

2,872

Published on

The slides from my ACCU 2011 conference presentation.

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,872
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
43
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. C++ for Marine StreamerPositioning & Navigation Mike Long Schlumberger Western Geco
  • 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. Western Geco : Seismic acquistion You Tube - marine seismic acquisition
  • 4. Deployment Configuration
  • 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 ShoestringBuilding a gcc cross compile toolchainfor 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 dont 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 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. 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 doesnt 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 doesnt enable gdb. Remember to adjust the config!
  • 21. Stacks & Heaps: Linker Scripts
  • 22. Stacks & Heaps: Linker ScriptsGcc 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
  • 37. Testable Embedded C++
  • 38. Testable Embedded C++: HIL
  • 39. ConclusionsWhy would anyone do this? Time consuming Difficult to estimate Hard
  • 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. http://www.westerngeco.com/http://meekrosoft.wordpress.com/@meekrosoft
  • 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/

×