Author Topic: ARM begginer questions  (Read 27769 times)

0 Members and 1 Guest are viewing this topic.

exapod

  • Guest
ARM begginer questions
« on: February 17, 2014, 11:33:30 pm »
Hi,
I have experience with almost all the microchip mcu family and now i would like to learn more about ARM. I was thinking of starting with the STM32 family of chip and buying an ST evaluation board, and the ST-LINK/V2  programmer for future standalone project (both are very cheap). Can you reccomend some books or guide to start using the ST line of mcu? Is this in your opinion a good way to start learing using the arm mcu? Should i start withe the M0 series?
Thank you for the help
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #1 on: February 18, 2014, 01:32:45 am »
Assuming that you will code in C (coding those chips in assembly would be crazy), I would suggest that you dive into the datasheet / reference manuals.

CM3 is a middle of the road chip. CM4 more processing power and CM0 to compete more with the 8-bits. However, they mean very little for most embedded applications: you care about the peripheral, not the core.

As long as you code in C.

I would start in CM3 but it makes little difference.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #2 on: February 18, 2014, 11:28:41 am »
Quote
If you wanted to learn about programming the ARM core (and nothing else)

What if I don't want to learn about programming the ARM core? As far as I am concerned, it might as well be a green monster sitting inside that little chip. As long as it does what I wanted it to do, it doesn't matter to me how the core does it.

That's part of the reason, not all, that it is crazy to code in assembly.
================================
https://dannyelectronics.wordpress.com/
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: ARM begginer questions
« Reply #3 on: February 18, 2014, 12:23:58 pm »
If you start with a certain arm processor it is important that the manufacturer supplies the hardware abstraction layers in a software language you are familiar with. As far as I know most manufacturers incl. ST do this in C so this is a logical choice.
For TS: what is the application you have in mind? If you are interested in large applications such as IP communication and/or TS LCD applications I would definitely go for the M3 (STM32F207) or M4 (STM32F4xx) cores but probably myself would go for the NXP expresso boards since their compiler is free and has a huge free codesize (i believe currently even 256k). The boards aren't that expensive either (ebay, embedded artists).
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #4 on: February 18, 2014, 12:32:43 pm »
Quote
probably myself would go for the NXP expresso boards since their compiler is free and has a huge free codesize (i believe currently even 256k).

In that regard, the TI compiler / tool is totally free and limitless if you use it with the launchpads. CoIDE offers totally free and limitless compilers also for many chips from many vendors.
================================
https://dannyelectronics.wordpress.com/
 

exapod

  • Guest
Re: ARM begginer questions
« Reply #5 on: February 18, 2014, 04:50:23 pm »
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #6 on: February 18, 2014, 05:23:18 pm »
Thank you all, i will buy this board http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1199/PF254044?s_searchtype=partnumber

Excellent choice. I have the same board and i am very pleased with it. Another positive thing is that the free CooCox IDE in it's latest version fully supports the STM32F303 MCU and everything works right out the box (programming/debugging). As far as books go, i think that you can't go wrong with this one:

http://www.amazon.com/Definitive-Cortex%C2%AE-M3-Cortex%C2%AE-M4-Processors-Edition/dp/0124080820

Maybe it is little on the expensive side, but i think it's worth it, and the featured examples are with STM32.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #7 on: February 18, 2014, 07:06:20 pm »
Quote
i think that you can't go wrong with this one:

That's a good book if you want to know the inner workings of the core.

It is of minimum value, and potentially a waste of time, if you want to program the core to do things, especially in C.
================================
https://dannyelectronics.wordpress.com/
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #8 on: February 18, 2014, 08:28:34 pm »
Quote
i think that you can't go wrong with this one:

That's a good book if you want to know the inner workings of the core.

It is of minimum value, and potentially a waste of time, if you want to program the core to do things, especially in C.

I strongly disagree. The book covers everything, from assembly to advanced topics using C, like DSP, RTOS, etc... And there are PLENTY examples written completely in C, especially in the chapter for ARM CMSIS-DSP library. And like i said, it's all done with the STM32F4 discovery board which is suitable for the OP.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #9 on: February 18, 2014, 09:04:14 pm »
Quote
The book covers everything, from assembly to advanced topics using C, like DSP, RTOS, etc...

My point exactly: how many times do you need to write your own DSP, RTOS, etc. vs. writing your own code to drive peripherals? Even if you do use DSP/RTOS, you can do so by treating them as blackbox (CMSIS' dsp libraries or vendor supplied RTOS) without understanding its inner working.

Effectively, the (C) compiler is taking care of the lowest layer for you. All you need to know is "C = A + B;", without ever understanding how exactly the core does it. In C, you know, with reasonable degree of confidence that "C = A+B;" will work, on core A, B, or C.

That's the beauty of programming in a high level language. It renders the core "bland", and allows you to focus on the most value-add: your algorithm / logic, and the peripherals.
================================
https://dannyelectronics.wordpress.com/
 

Offline fagiano

  • Regular Contributor
  • *
  • Posts: 61
  • Country: it
Re: ARM begginer questions
« Reply #10 on: February 18, 2014, 09:30:12 pm »
I found this "book" very useful when I fist approached STM32s

"Discovering the STM32 Microcontroller"
http://www.cs.indiana.edu/~geobrown/book.pdf

ciao
Alberto
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #11 on: February 18, 2014, 09:38:30 pm »
Well, it all depends on what you want to learn and how much time are you willing to spend on it. If not all that information is required, then i strongly suggest "Discovering the STM32 Microcontroller" by Geo?rey Brown. The book has several examples for programming the peripherals, including examples with sensors, lcd's, etc... The best thing is that it is completely free. It is for the STM32F1 (Cortex-M3), but all principles should apply for the STM32F303.

You can download it from here:

http://www.cs.indiana.edu/~geobrown/book.pdf

Cheers.

EDIT: Looks like fagiano beat me to it. :)
« Last Edit: February 18, 2014, 09:40:18 pm by gocemk »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #12 on: February 18, 2014, 10:00:21 pm »
Quote
"Discovering the STM32 Microcontroller"

That is a fabulous book, indeed.

Some of the examples there could have been more complete. But it is a great beginner's book.
================================
https://dannyelectronics.wordpress.com/
 

exapod

  • Guest
Re: ARM begginer questions
« Reply #13 on: February 21, 2014, 02:23:24 pm »
I donwloaded the book and bought the board. Which compiler/IDE do you suggest i start develop? GNU, IAR, Keil or CooCox ?
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ARM begginer questions
« Reply #14 on: February 21, 2014, 02:42:27 pm »
Which one of the boards did you get?

I've been playing with the stm32f4 board and I've found the Keil (limited) free compiler works really well as TI supplies their samples in the (among others) Keil uVision format.

It's a good starting point, later on you probably want to switch to CoIde or some other free environment, to avoid the 32kB code limits.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

exapod

  • Guest
Re: ARM begginer questions
« Reply #15 on: February 21, 2014, 03:10:22 pm »
The STM32F3DISCOVERY with a STM32F303VCT6. If the switch is easy i will start with the keil. Thanks
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: ARM begginer questions
« Reply #16 on: February 21, 2014, 03:13:43 pm »
If your intent is to use CoIDE, I would start with it. You will find that setting up a project in CoIDE is very easy and coding in both environment is almost identical.

I am a big fan of CoIDE.
================================
https://dannyelectronics.wordpress.com/
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #17 on: February 21, 2014, 03:27:02 pm »
Take mine and dannyf's advice and go with CooCox IDE. When i bought the STM32F3 Dsicovery a few months ago, the STM32F303 was still not supported by CoIDE, so i went with Keil. When they finally brought support for the STM32F303 to CoIDE, i've downloaded and installed it and was very impressed. Setting up a new project from scratch is much, much easier with CoIDE then it is with Keil/IAR (especially IAR). Since then, i never looked back.
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ARM begginer questions
« Reply #18 on: February 21, 2014, 03:38:56 pm »
Agree about the value of CoIde, but can you load the TI sample projects directly in CoIde?



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: ARM begginer questions
« Reply #19 on: February 21, 2014, 03:49:45 pm »
Ask TI for examples which can be loaded in CoIDE. If not then don't use TI's parts. You won't miss much.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

exapod

  • Guest
Re: ARM begginer questions
« Reply #20 on: February 21, 2014, 03:52:57 pm »
I will start with the CoIDE, thank you very much for the help!
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #21 on: February 21, 2014, 03:54:01 pm »
Agree about the value of CoIde, but can you load the TI sample projects directly in CoIde?

No, ST provides examples only for IAR, Keil, Altium TASKING and TrueStudio. But it is very easy to setup a new project in CoIDE using the .h and .c files from the provided examples.
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ARM begginer questions
« Reply #22 on: February 21, 2014, 04:01:52 pm »
Agree about the value of CoIde, but can you load the TI sample projects directly in CoIde?

No, ST provides examples only for IAR, Keil, Altium TASKING and TrueStudio. But it is very easy to setup a new project in CoIDE using the .h and .c files from the provided examples.

So I still think still fastest to get going with stm32 is using IAR or Keil (etc) limited versions, once you grow beyond their limitations you will easily know what path to pursue. (hint hint CoIde)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Re: ARM begginer questions
« Reply #23 on: February 21, 2014, 04:12:26 pm »
Agree about the value of CoIde, but can you load the TI sample projects directly in CoIde?

No, ST provides examples only for IAR, Keil, Altium TASKING and TrueStudio. But it is very easy to setup a new project in CoIDE using the .h and .c files from the provided examples.

So I still think still fastest to get going with stm32 is using IAR or Keil (etc) limited versions, once you grow beyond their limitations you will easily know what path to pursue. (hint hint CoIde)

Perhaps. That's exactly what i did, but as i've said before that was because at the time the stm32f303 was still not supported by CoIDE. Also in my class at the university we were using IAR. If the OP starts learning using "Discovering the STM32", then CoIDE will be better then Keil/IAR. (IMHO)
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: ARM begginer questions
« Reply #24 on: February 21, 2014, 04:20:47 pm »
Agree about the value of CoIde, but can you load the TI sample projects directly in CoIde?

No, ST provides examples only for IAR, Keil, Altium TASKING and TrueStudio. But it is very easy to setup a new project in CoIDE using the .h and .c files from the provided examples.

So I still think still fastest to get going with stm32 is using IAR or Keil (etc) limited versions, once you grow beyond their limitations you will easily know what path to pursue. (hint hint CoIde)

Perhaps. That's exactly what i did, but as i've said before that was because at the time the stm32f303 was still not supported by CoIDE. Also in my class at the university we were using IAR. If the OP starts learning using "Discovering the STM32", then CoIDE will be better then Keil/IAR. (IMHO)

Sure, no arguments there, once you have some familiarity and experience with the platform it's no problem switching to an environment like CoIde.

But for a beginner just starting out, surely Keil or IAR limited versions are much more productive as they will be able to directly load/compile/program and modify the TI samples to easily gain some basic experience with the platform.

Just getting st-link and the right board etc. setup for CoIde up and running could take a lot of time for someone who has never used the environment before, time that would have been better spent playing with and modifying the provided samples instead.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf