Coder Social home page Coder Social logo

rokath / modbus-stm32-hal-freertos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alejoseb/modbus-stm32-hal-freertos

0.0 0.0 0.0 17.95 MB

Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS

License: GNU Lesser General Public License v2.1

C 82.38% Jupyter Notebook 17.62%

modbus-stm32-hal-freertos's Introduction

Hi there πŸ‘‹

Embedded Programming is my passion

  • Still sticking with C (liking function pointer arrays) in micro-controllers.

My favorite PC language is Go

Why?

  • Go is open source, sponsored, professionally developed and used by Google.
  • Go is a multi-purpose language.
  • Go is object oriented.
    • Go uses composition instead of inheritance - programs get cleaner this way.
  • In Go interfaces are implicit - they need no explicit declaration.
    • This allows clean and simple APIs in your code without unneeded dependencies.
  • Go is easy to learn, to use and gives quick programming success.
  • Go is a compiled language, therefore checks a lot before building the code.
    • You get most errors at compile-time and not at run-time as with scripting languages (like Python). The Go compiler itself is fast. It allows script like usage of Go as well.
    • The Go program execution is fast.
      • Could be about half speed of a well written C program - not relevant for normal use cases. To get an equivalent "well written C programm" takes much longer than getting the Go program for a specific task.
  • Go is a managed language making memory leaks impossible.
    • No explicit memory allocation and free.
  • Go supports slices, a very light array management struct.
  • Go has pointers but no pointer arithmetic, making code more reliable this way.
  • Go is designed to use multi-core machines and single-core ones and allows easy multi-threading and inter-process communication.
    • Concurrent programming using Go rotines and channels allow efficient program structures.
    • Parallel execution allows to use the full multicore power of modern systems easyly.
    • Concurrency is not Parallelism by Rob Pike
  • The auto-formatting as languge part is very comfortable.
    • This allows a bunch of helper tools.
  • A testing environment comes with the language. Fuzzying is supported.
    • Simply create my_test.go files inside your Go package and run go test ./... in the project root.
  • You get a stand-alone runnable without libraries dependencies.
    • No missing library anymore.
    • No install ... before running an executable.
  • Many platforms are supprted, also mobile development.
  • Go has an integrated documentation System.
    • Just add comments to your functions.
  • Easy Visibility control: Packages export UppercaseFunction and hide lowerCaseFunction.
  • Go can use C/C++-code and vice versa, but crossing the border takes time, so avoid that in loops.
  • Compatibility: Legacy Go code runs on new Go versions.
  • Go has generics now.

Disadvantages?

  • Not made for small microcontrollers.
  • Not well suited for fast hard real-time applications on sub-millisecond level because of the stop-the-world garbage collector.
    • BUT: The GC gets better and better with new Go versions AND avoiding that Go uses the heap heavily, avoids GC at all.

More Information

Some Details

Examples

Learning

What I use Go for?

  • The Trice tool is written in Go.
  • Test tools stimulating embedded devices under test.

modbus-stm32-hal-freertos's People

Contributors

alejoseb avatar godchadigo avatar heme2 avatar nguyenlam185 avatar samo4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.