according to my knowledge : C is standard in arm when it comes to the core. but accessing peripherals vary widely from manufacturer to another.
questions:
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" ?
https://community.arm.com/developer/f/infrastructure-solutions/49416/gnu-arm-compiler-7-3-1-executable-option/172378#172378
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
Correct. See:
https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158950#158950
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
https://www.keil.com/books/
and some more C learning & reference materials - including a free online C textbook:
https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
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:
https://www.avrfreaks.net/comment/1138166#comment-1138166
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:
https://community.arm.com/community-help/f/discussions/49419/the-reason-why-so-many-first-questions-end-up-in-infrastructure-solutions
would be good if you could add your feedback there ...