I want to be fluent at c programming to start Embedded sytem
I want to be fluent at c programming to start Embedded sytem
I'm glad for you.
What's a sytem?
This program will make your computer loopy!
void main(){for(;;);}
The best path to learn c is on a unix/linux console based platform (like BBB and RPi) and once you've become proficient at that then migrate to embedded systems.
C programming with embedded systems is more complex because you will need to deal with hardware specific details and be quite #pragma tic.
With MSP43x you'd be dealing with statements like;
SIMCO &= ~0x07;
With AVR programming;
#pragma interrupt_handler isr_t1:iv_TIMER1_COMPA
With PSOC programming;
saved->clkSelectReg & CY_SYS_CLK_SELECT_DIRECT_SEL_MASK) != CY_SYS_CLK_HFCLK_IMO
All of which are hardware specific and make no real sense to the learner.
If you plan to play with Arduinos then download and play with PROCESSING on your PC. It's where the Arduino IDE was spawned.
Processing was designed to make C programming easy for quick results for Arts Students.
Enjoy!
Sorry but I'm with Enrico with this - start on simple embedded boards.
I would recommend a ARM Cortex based part, probably one of the ST Nucleo boards but the TI Launchpads are good too.
If you want to learn C for embedded stuff then keep away from Linux targets for now.
Compact is being a bit naughty with his examples which are chosen to look obscure:
SIMCO &= ~0x07;
can be written like this:
foo_register = foo_register & 0xf8;
and what the line of code is doing is clearing bits 2 down to 0 in the register. (SIMCO or foo_register are just names for a variable which has been set up to be in the memory location of a control register in the processor).
The best book, not only about C, but the best programming language manual ever is "The C programming Language" (this is only an opinion ).
You'll still need some tutorial stuff to go with your chosen board but if you stick with TI or ST you'll be OK.
MK
Sorry but I'm with Enrico with this - start on simple embedded boards.
I would recommend a ARM Cortex based part, probably one of the ST Nucleo boards but the TI Launchpads are good too.
If you want to learn C for embedded stuff then keep away from Linux targets for now.
Compact is being a bit naughty with his examples which are chosen to look obscure:
SIMCO &= ~0x07;
can be written like this:
foo_register = foo_register & 0xf8;
and what the line of code is doing is clearing bits 2 down to 0 in the register. (SIMCO or foo_register are just names for a variable which has been set up to be in the memory location of a control register in the processor).
The best book, not only about C, but the best programming language manual ever is "The C programming Language" (this is only an opinion ).
You'll still need some tutorial stuff to go with your chosen board but if you stick with TI or ST you'll be OK.
MK
There's nothing sinister at all.
NXP, Cypress, Zilog, MicroChip and Silicon Labs are also great microcontroller manufacturers.
Using mbed, you don't have to install any software at all!
What is SIMCO?
And why would one need to have __RESET_WATCHDOG(); included in their code to make something work with an MSP430?
Neither these are defined in C.
if (SIMCO=(4==0)) x=5; x=3;
There are far too many technical considerations (development potholes) for the learner to worry about trying to learn c on an embedded system IDE.
They'll have enough time deciphering standard statements like this.
while(a=b){switch(a){case 0:a++;continue;case '5':b=b/*a*/%b;continue;default:--a;break;}b+=a<<1;}
Hopefully the influent C is not F fluent
itispossibletomakeenglishprettyincomprehensiblebyignoringtheusualconvetionsofpunctuationanduseofwhitespacedoinginresponsetoareasonablerequestforassitancefromabeginnerisntverynice
MK
That's just my style.
My C statement is correct and contains the correct punctuation and whitespace.
If you wish attempt to compile it.
What's your "convetions" and "isn't" got to do with it?
This is a reason why you should start learning C on a standard platform rather than an embedded one.
A good learner's playground: http://processing.org