Author Topic: kLib - searching for github contributors  (Read 12332 times)

0 Members and 1 Guest are viewing this topic.

Offline pxtTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
kLib - searching for github contributors
« on: August 12, 2016, 05:49:26 AM »
Hi I'm Paul. I'll get right to the point. I'm looking for people to work on the github project. Repository contains a C ++ library for the STM32 microcontrollers. At the beginning I had some interesting ideas, which can greatly simplify programming of these devices but the project has expanded considerably.
What has been done? Library support GPIO management, UART, PWM. Work continues on the I2C and SPI. There are libraries for quaternions, vectors and matrices. Support sensors BMP085, HMC5883L, MPU6050. AHRS algorithm based on quaternions . Discrete PID, low and high pass filters. Integration with FreeRTOS.
At the moment the project contains some bugs and unfinished ideas - I do not hide it . That's why I turn to you here.
There is a link to guide through the project. Only a few articles to show a general outline of the project.
Feel free to criticize. Perhaps the project will be worth something or maybe it will cover with dust.

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 558
  • Helpful? 15
  • From Dream to Design at the speed of Imagination!
Re: kLib - searching for github contributors
« Reply #1 on: August 13, 2016, 06:14:11 AM »
 ;D Hello!
     Project sounds awesome!
I would love to dedicate some time to help you out, but I am trying to develop the potential for
the axon at this time. I have not heard of a lot of people with their applications of the Axon.
I could look into the possibilities of the ST32 microcontrollers, if you could elaborate on the nature of
your processor intentions. What potentials do you see for your project, that other processors may not have the
advantage of having.(processing, size, power consumption, simple IDE, programming, etc)
Parallax has had great success with open sourcing all programs with the processor.
(Maybe you could use other companies as a model for your endeavors.)
Good Luck!  ;) :) :D ;D

Offline pxtTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: kLib - searching for github contributors
« Reply #2 on: August 14, 2016, 04:44:23 PM »
Thank you for your opinion mklrobo!
I will explain in more detail why these libraries are created and why I am looking for people to cooperate?
I program these devices for 10 years. In time, I began to gather my ideas so that they are consistent. But why? For example, a library for GPIO is quite trivial. Am I not reinventing the wheel? Probably a lot of people say so but for me it is an opportunity to deeply understand the principle of operation of these devices. For instance, see how registers and processor core works. While writing these libraries I also learned a lot about C++ and many of its flavors. Project has grown and I thought it might be useful to someone.

What about libraries? Most of the solutions here is based on the C language. Writing programs in C ++ increases footprint a little but you have a more friendly interface instead. It is not hard to see that cortex-m are large machines. Much of the time it may take to configure peripherals only. In these libraries, you can find a more eye-friendly mechanisms to take care about that.
Example:

Code: [Select]

   // set GPIOA pin 5 in high state
   PORTA[5] = 1;

Code: [Select]

   // uart configuration
   kSerial com;
   com.hardware = kSerial::usart1->TX.PORTA9;
   com.run(115200);
   com << "Hello!";

Code: [Select]

   // setting up hardware for PWM generation
   ...
   PWM1.hardware = kPWM::out->Timer1.OC1.PORTA8;
   ...


The most important feature of this library is expressed in the third example. This single line can summarize what really kLib is. Through the expansion of normal structure user can select timer, output compare channel, and finally, which pin should be used to generate signal. No need to go to the datasheet finding where peripheral outputs may be mapped. Only auto code completion in your IDE enabled.

Answering the questions
STM32 is the starting point. In the future I would like to make the code compatible with many others microcontrollers but based on cortex-m due to the main reasons: they have enough memory to handle the C++, they also have quite a lot and extensive peripherals in which it is sometimes difficult to step in.
It would be great to create an interface that simplicity would be comparable to the Arduino - so that larger devices also do not deter. The first goal is simple interface. Second - small result code.

Thanks for your support! I would like to add once again - feel free to give your opinion. I do not want play the smart guy here or be seen as a super experienced programmer. I just want to find someone to help and learn something from the others too.  :)

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 558
  • Helpful? 15
  • From Dream to Design at the speed of Imagination!
Re: kLib - searching for github contributors
« Reply #3 on: August 15, 2016, 03:20:07 AM »
 ;D Hello!
I found this information regarding the STM32 processor, the high power to the low power;

Smart architecture with new peripheral set
The STM32F7 series unleashes the Cortex-M7 core:
AXI and multi-AHB bus matrixes for interconnecting core, peripherals and memories
Up to 16 Kbytes +16 Kbytes of I-cache and D-cache
Up to 2 Mbytes of embedded Flash, with Read-While-Write capability on certain devices
Two general-purpose DMA controllers and dedicated DMAs for Ethernet, high-speed USB On-The-Go interface and the Chrom-ART graphic accelerator
Peripheral speed independent from CPU speed (dual clock support) allowing system clock changes without any impact on peripheral operations
Even more peripherals, such as two serial audio interfaces (SAI) with SPDIF output support, three I²S half-duplex with SPDIF input support, two USB OTG with dedicated power supply and Dual-mode Quad-SPI interface
Large SRAM with a scattered architecture:
Up to 512 Kbytes of universal data memory, including up to 128 Kbytes of Tightly-Coupled Memory for Data (DTCM) for time critical data handling (stack, heap...)
16 Kbytes of Tightly-Coupled Memory for Instructions (ITCM) for time-critical routines
4 Kbytes of backup SRAM to keep data in the lowest power modes
Power efficiency
7 CoreMark/mW at 1.8 V
100 µA typical current consumption in Stop mode with all context and SRAM saved
Compatibility
Cortex-M7 is backwards compatible with the Cortex-M4 instruction set
STM32F7 series is pin-to-pin compatible with the STM32F4 series*

************************************************************
STM32 L0 series of ultra-low-power MCUs

Every part of the STM32 L0 MCUs has been optimized to achieve an outstandingly low power consumption level. The result is a genuine Ultra-Low-Power MCU with record breaking performances.

The exclusive combination of an ARM® Cortex®-M0+ core and STM32 ultra-low-power features, makes the STM32 L0 the best fit for applications operating on battery or supplied by energy harvesting and the world’s lowest power consumption MCU at 125°C.

The STM32 L0 offers dynamic voltage scaling, an ultra-low-power clock oscillator, LCD interface, comparator, DAC and hardware encryption.

New autonomous peripherals (including USART, I²C, touch sense controller) reduce the load of the ARM Cortex-M0+ core leading to fewer CPU wakeups and contribute to decreased processing time and power consumption.

Other value-added features such as 16-bit ADC (HW oversampling), crystal-less USB, short wake-up time and communication peripherals capable of operating in ultra-low-power mode make up for an unrivaled tradeoff between feature integration, performance and ultra-low-energy consumption.

The STM32 L0 is available with up to 64 Kbytes of Flash, 8 Kbytes of RAM and up to 2 Kbytes of embedded EEPROM (no emulation needed) in 32- to 64-pin packages, including a space-saving WLCSP36.

**************
There seems to be a lot of support for the chip, and a lot of potential. I have not had a chance to look into the programming and libraries
that the web site I visited offered. There can always be improvements t the library, and a more friendly IDE. These user end items
make work with the MCU very good to work with in the long run. If the IDE programmer access is easier, lots of people
would program the chip, finding more efficient ways for programming.   ;) :) :D ;D

Offline pxtTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: kLib - searching for github contributors
« Reply #4 on: August 15, 2016, 11:13:41 AM »
 :D That is right. CubeMX is a great tool for configuration. Especially clock configuration tool is very helpful. Also, there are plenty of examples out there but everything is written in C. You can of course compile the code in C ++ , however, it's not the same . I'm talking about realizing the full potential of the C ++ language . I found a project stm32plus whose effect may be similar to this

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 558
  • Helpful? 15
  • From Dream to Design at the speed of Imagination!
Re: kLib - searching for github contributors
« Reply #5 on: August 15, 2016, 05:52:02 PM »
 ;D Cool!
       I have found, programming a processor, and exploring the full dynamics of
it are addictive. it is easy to get lost and delve into the machine code, to see what is really
going on. I had this experience with Parallax's Propeller. Open source, great to spring board
into. I could not proceed without the forum. The forum, and thus, people to use the propeller
for different uses, have grown the product to fantastic heights. That being said, the same could
happen for your process; having a vision for your destiny of your path is critical. Creating excitement
about programming, and the internal workings only come with applications that are useful, or
curious, for the user. Questions like, can this processor be programmed to function like a
dual core? If I do, can it rival the programming power of the Raspberry Pi
? (Using FORTH)
What commercial or home uses do you have in mind? Radios, drones, washing machines,
personal robots, telephones, and/or small computer could be a target.
Could one be put on an Axon board, to replace that processor? Just a thought.  ;) :) :D ;D

Offline pxtTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 1
Re: kLib - searching for github contributors
« Reply #6 on: August 17, 2016, 02:17:46 PM »
Really interesting. I've never seen a multi-core MCU  :D. For now, I do not know what shape project will have in the future . We'll see if it will be useful! I do not know the language FORTH so I can not say if he could compete . It seems to me that the raspberry is designed for some other purposes than boards which use stm32. Also I think it's a great idea to put this processor into some version of Axon board . ;)

Offline mklrobo

  • Supreme Robot
  • *****
  • Posts: 558
  • Helpful? 15
  • From Dream to Design at the speed of Imagination!
Re: kLib - searching for github contributors
« Reply #7 on: August 18, 2016, 05:54:41 AM »
 :) Hello!
I am a strong supporter of the Axon board. I love the design of the pinouts and general attributes. I get frustrated
with it because I can not get access to program it.  If we could use yours in place of the processor, or have a dual core
STM32 for the brains and the Axon for the physical interface, that would work. Ideas increase immensely if you have
an open, intuitive IDE for programming; People will program it.  ;) :) :D ;D