Page 1 of 1

Getting Started

Posted: Tue Jun 18, 2013 11:56 pm
by StuntMonkeh
I am looking to get started programming with ChibiOS and I want to check how I should proceed.

I have limited programming skills but I believe if you want to learn something bad enough eventually you will succeed. I have done some programming with the Arduino but I want to move on to the more embedded systems. The project I have in mind may end up being fairly complex and an RTOS seems the correct method.

The project is to use multiple physical I/O no graphics etc. so I was thinking a development board based on the M3-Cortex. Would the STM32VLDiscovery be the best choice to start from?

I have downloaded and installed the ARM GCC toolchain and ChibiStudio.

So am I right in thinking I just need a development board and a tutorial to get me started?

Re: Getting Started

Posted: Wed Jun 19, 2013 3:01 am
by jscott
Hi StuntMonkeh,

In transitioning from the Arduino platform to ARM, you will be amazed at how much more
you can do. If you have not done much pure 'C' programming, you will find that to be
something you will need to pay attention too. Specifically the facts that there are not
setup() and loop() functions but instead there is a main() function that you will put
code to handle the functionality of these functions.

Any of the STM32 Discovery boards would be a good start.

I have some getting started information on my website at www.atl123.com that may help.

Using ChibiStudio is a great way to get started. It removes a lot of the complications of
getting the development environment up and running.

Good luck
-John Scott
www.atl123.com

Re: Getting Started

Posted: Wed Jun 19, 2013 4:43 am
by Tectu
Hello StuntMonkeh and welcome to ChibiOS!

Basically jscott told you everything you need to know. Personally, I started with the STM32VL-Discovery board myself :D
However, there is one more thing I propose: First, start using the STM32 microcontroller without the usage of an RTOS. Try to get some small, very basic project working just with the StdPeriph library. Giovanni might beat me for this but I think it's an important step to first learn to understand your microcontroller before you start using some awesome RTOS ;-) The StdPeriph library does still provide you with a high level API (if it can be called like that?) for the HAL. However, you will be forced to read the datasheet and therefore start understanding the architecture and functionality of your MCU. There are PLENTY of examples that can be found on the internet, showing how to properly interface some LEDs, buttons, then maybe some accelerometer, SD-Cards, USB etc. But again: This is just my personal preference and experience which I am sharing. There might be other people telling you something different for sure and you're not forced to do that.

May I ask what your preferred host OS is? (Windows, Linux, Mac OS-X, ... ?)


~ Tectu

Re: Getting Started

Posted: Wed Jun 19, 2013 10:15 am
by StuntMonkeh
Thanks for the advice, I'm glad I'm on the right track. I will get the STM32VL board as a starting point.

I have a reasonable underpinned knowledge of processors but I agree that maybe I should start with some basic programming without the RTOS.

My preferred host OS is Windows although I do have a little Linux knowledge.

I have never done any 'C' programming but I have a loose grasp on the concepts of programming. My preferred learning method is by reading code where someone has explicitly explained what each line does and tweaking parts of the code to see how the result changes/breaks it.

I welcome book suggestions to read in conjunction if you think it might be useful.

Re: Getting Started

Posted: Mon Aug 04, 2014 8:17 pm
by dm13dv1b
I don't like asking too much questions, but now I will ask for an advice.
I'm using ChibiOS and uGFX and have a project where I need to measure 2 ADCs and 2 external pulses, make some math
and display it on a TFT. I'm using the STM32F4Discovery board for testing and an Open407 as the base board. I've the
display and the touch screen working.
I just dont know how to make the structure of my program. Again, I need only general advice.
My first thought was to make the ADC sampling into threads and the external pulse counting too, and in the main loop
I should care about the events for the TFT like buttons whatever.
Does anybody has a better advice for this?
All comments are welcome :)
Thank you!

Re: Getting Started

Posted: Mon Aug 04, 2014 10:45 pm
by Giovanni
I am not sure about how you are trying to organize the code but in general: KISS, try to keep things simple, even if the OS provides a lot of mechanisms you don't have to use them all :)

Try implementing first without threads and then see where an how threads can be used to simplify things.

Giovanni