element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog C++ library for ST Teseo GPS - pt. 5: ready for a first (0.1) firmware release
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 21 Jul 2024 11:20 AM Date Created
  • Views 855 views
  • Likes 6 likes
  • Comments 12 comments
  • raspberry
  • pico
  • uart
  • Teseo
  • gps
  • OO
  • teseo_c++
Related
Recommended

C++ library for ST Teseo GPS - pt. 5: ready for a first (0.1) firmware release

Jan Cumps
Jan Cumps
21 Jul 2024

The Teseo-LIV3 GPS module (as used in shabaz ' GPS / Galileo / BeiDou / GLONASS receiver) talks UART and I2C. I'm writing an OO driver for it, for embedded systems. The firmware is now ready for a release.

GitHub Release 0.1, with binaries.

image
image: actual output of the firmware for Pico

Functionality:

  • Talks to ST Teseo-LIV3 GPS in query-response mode.
    you send a query, and get the reply
  • UART and I2C supported.
    same functionality with both protocols.
  • predefined functionality for NMEA commands $GPGLL, $GLGSV, $GPRMC.
    low level write, read, and parse functions can be used for the other NMEA commands
  • reply validation.
    for the predefined functions, the library validates the NMEA status line
  • supports commands that return single and multiline lines of data.
    single line commands fill a string with the response.
    multiline commands fill a vector of strings with all response lines. The library reports the count of lines.
  • initialisation option.
    you can pre-program the Teseo to work in reply-response mode (persistent).
    but if you want to keep the factory settings, the library can configure the Teseo (nonpersistent)
  • platform independent.
    will work on any platform, that supports UART or I2C
    you provide the reader and writer for the protocol, and (optionally) a reset function.
    current firmware example tests the lib with a Raspberry Pico 

Pico connections for I2C, UART and shared functions

A connection deep dive in available in this post:  C++ library for ST Teseo GPS - pt. 4: PCB to Pico hardware connections . The instructions will work for different Teseo boards. I used the board that shabaz published on the e14 community:  Fun With Arduino, Global Navigation Satellite Systems (GNSS) and Teseo III .

Pico resources used only if you use I2C:

  • I2C0
  • SDA: GP16 (Pico I2C0 SDA)
  • SCL:  GP17 (Pico I2C0 SCL)
  • baud: 100 * 1000

for I2C, SDA connects to SDA and SCL to SCL. The PCB that I use has the pull-ups for I2C.

Pico resources used only if you use UART:

  • UART1
  • TX: GP4 (Pico UART1 RX)
  • RX:  GP5 (Pico UART1 Tx)
  • baud: 9600
  • UART1 RX interrupt

for UART, RX connects to TX and vice versa

Pico common resources:

  • RESET: GP18 (optional)
  • 5V: VBUS
  • 0V: GND

image
image: how to hook up the Teseo PCB to a Pico.

The binary firmware file (.uf2) - built for I2C -  can be downloaded from GitHub.

Next post:  C++ library for ST Teseo GPS - pt. 6: running library built-in requests, and free conversations 

visit the github repository (git clone https://github.com/jancumps/pico_gps_teseo.git)
view the online documentation
Link to all posts.

  • Sign in to reply
  • Jan Cumps
    Jan Cumps 11 months ago in reply to Jan Cumps

    > Why I selected std::vector

    This has since changed - more options:

    in all post v1.0 releases, the library no longer assumes what container is used. The firmware developer can decide if it's a std::array, std::vector, ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 11 months ago

     C++ library for ST Teseo GPS - pt. 7: 1.0 release with NMEA parser - stable 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 11 months ago

    since this release, I made the following changes to sturdy the code:

    • validate data string as well as status string

    To cover scenarios where I receive an incorrect, but well-formed reply (it happens mostly after a previous reply failed), I now also validate that each reply string has the correct signature. It's done by checking if the characters 3 - 5 of the reply (these are constant for every type of reply) are the expected ones.

    If not, the library returns an empty data result, and a count of 0 for multi line replies. The return value will be false.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 11 months ago in reply to Jan Cumps

    I got automatic deploy working: https://github.com/jancumps/pico_gps_teseo/releases/tag/nightly_development

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 11 months ago

    Since the release, I've made these changes to the nmake file:

    more examples

    There will be a

    • simple communication example to talk to the ST Teseo GPS, and
    • an example that uses this nmea parser in combination with talking to the Teseo GPS.

    build firmware binaries for both UART and I2C

    In version 1, you controlled with a compile definition, if firmware is for I2C or UART control.
    At build time, it then created the binary for that protocol

    In the next version, the standard build command will create the I2C and UART binary for each example.
    You can still build a single selected binary, if you want that.
    It's similar to what Pico does with its examples. Default build makes all of them, but you can ask to build one particular example.

    It 'll make it easier to provide binaries when cutting a release.
    It also serves as a proof that you can use these libraries for both protocols without code changes or conditional constructs.

    This is already available on GitHub develop and main branch.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube