K&R is just a primer on the C language. There's no specifics in regards to embedded programming.
Get an Arduino starter kit or something.
Noah Adams
>would I need more external knowledge? yes
Evan Sanchez
K&R is for people wanting to implement the C language (ie write a compiler), not for people who want to program in C.
Mason Allen
K&R is only about C, embedded system is more than that (I/O, register, etc).
But learn K&R first, it's a very smoll book. After that grab one stm32 discovery board and start tinkering with it
Jack Rogers
wow you seem really stupid. have you even read it? it's literally just beginner exercises with strings and linked lists.
Justin Flores
He probably got overtly excited there's a problem in the book for parsing a compound type declaration
Bentley Foster
there are few things missing in the book that you will need >understanding volatile >understanding linking >how to actually structure larger projects and several things related to stm32s >knowing ARM Cortex-M architecture >knowing CMSIS or HAL libraries >knowing how to actually flash your device >how to design your program in interrupt model, concurrency primitives available and good patterns >knowing all sorts of hardware peripherals >how to debug baremetal programs you can also use some IDE (CubeIDE or Atollic come to mind) solving some stuff for you (such as flashing, interactive debugger session, generating project), this gives you quick start. there is some value learning about what the IDE does for you regarding building the project, generated files used, and how it actually loads stuff into the board - keep it for later curiosity.
Jayden Collins
not this guy, but for OP i can tell the most important thing about volatile is stuff accessed from interrupt vectors - if not marked volatile, compiler might optimize it away because there is no usual code path/access to it
Henry Nguyen
>the most important thing about volatile is stuff accessed from interrupt vectors
I want to learn embedded c programming from scratch, my only background in programmign is really basic things from grade 10 comp sci. Recommended books besides the K&R?
is that actually useful for a beginner? Looks on the surface like a complicated architecture book or something.
Christopher Rogers
>complicated architecture book or something ARM architecture isn't "that" complicated. >useful for a beginner? Depends on: beginner in what? I wasn't new to programming nor C, but new to embedded, microchips and ARM and this was tremendously useful.
Henry Kelly
K&R C will help you learn C as well as how to write good, minimal code. You'll need other resources for working on embedded projects specifically.
The first few chapters detail those, but it also delves into UNIX system calls, program structure and OS design very briefly. It's a good book.
Josiah Miller
I'm new to C and programming in general and want to build a solid foundation.
Joshua Campbell
The book taught me enough to create my own database system for a compasny that needed to database all its financial interaction with customers and suppliers including a targetted emailing system
Jacob Sullivan
sounds like it would be far easier to just use sqlite
Mason Rivera
It was good enough for me to learn C from it.
Nolan Brown
C is too big for embedded fren, try forth or assembler
Robert Carter
C books for reverse engineering? or should I just focus on x86 asm for now?
Gabriel Rodriguez
No. C works fine on embedded. Depends on what you're doing though (and get friends with static inline so you can avoid function call overhead).
Oliver Morales
>C books for reverse engineering? or should I just focus on x86 asm for now? x86 isn't useful for embedded.
Jonathan Myers
I don't get it with the books. Do a tutorial on YouTube and start tyring what you want to do. Sitting around reading isnt' the path I take. I read enought to get started, then I start, and I read how to cross hurdles when I encounter them. Then I move as far as I can until I have to look up again. I've always found everything I need on YouTube or stackexchange, or the github docs, or the official docs. Never once thought to buy a book and sit down and read how to code without doing it. Sounds like a collosal waste of time.
Brody Robinson
K&R is for people coming from another programming language. They even stated explicitly in the beginning of the book. Get something like C programming a modern approach by King then get on 1337x and download some udemy courses.