according to my knowledge : C is standard in arm when it comes to the core. but accessing peripherals vary widely from manufacturer to another.
if I used a book about "embedded C" but that book is using some microcontroller other than arm (e.g. AVR) will the book be useful for arm programming?
what about C book that is targeting desktop programming? my guess is that it will be OK but I will waste time learning some stuff that is not applicable to embedded e.g. system file access. correct?
any help in choosing a good C programming book for the sole purpose of arm programming will be greatly appreciated. my aim in this question is not to waste time learning something not needed or not the correct thing to spend my time on.
Why are you asking this in "Infrastructure Solutions" ?
john moore said:C is standard in arm
C remains the dominant language in small embedded microcontrollers - ARM or otherwise.
But C++ is not uncommon - and gaining ground.
Notably, both Arduino and mbed are C++
john moore said:peripherals vary widely from manufacturer to another
john moore said:if I used a book about "embedded C" but that book is using some microcontroller other than arm (e.g. AVR) will the book be useful for arm programming?
If you take care to distinguish general principles from specific implementation details - then yes.
See: https://www.avrfreaks.net/comment/2312886#comment-2312886 - and follow the link
john moore said:what about C book that is targeting desktop programming? my guess is that it will be OK but I will waste time learning some stuff that is not applicable to embedded e.g. system file access. correct?
So don't spend time on those parts!
But it is not uncommon to have file access - eg, SD-Cards - in small embedded systems.
And, nowadays, networking ...
john moore said:any help in choosing a good C programming book
and some more C learning & reference materials - including a free online C textbook:
As far as learning C programming, that probably is better done on a desktop - where you will have a far more comfortable experience away from all the added complications & limitations of (small) embedded microcontrollers.
Once you have learned the language, then you can move on to applying it in (small) embedded microcontrollers.
Some general microcontroller getting started tips:
A basic understanding of electronics will also help: https://electronicsclub.info/
great answer thank you. sorry I didn't know that i am posting in a particular forum.
The reason for the wrong forum has been discovered:
would be good if you could add your feedback there ...