Тёмный

What Actually is Embedded C/C++? Is it different from C/C++? 

Jacob Sorber
Подписаться 159 тыс.
Просмотров 139 тыс.
50% 1

Patreon ➤ / jacobsorber
Courses ➤ jacobsorber.thinkific.com
Website ➤ www.jacobsorber.com
---
What Actually is Embedded C? // There's a lot of misinformation out there about what embedded C actually is, how it is (or isn't) different from C, and I made this video to clear things up. I hope it helps.
***
Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
More about me and what I do:
www.jacobsorber.com
people.cs.clemson.edu/~jsorber/
persist.cs.clemson.edu/
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [ / jacobsorber ]
Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

Опубликовано:

 

12 июл 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 282   
@ewout4890
@ewout4890 2 года назад
I would describe embedded C as 99% of the time reading your documentation and 1% programming :)
@JacobSorber
@JacobSorber 2 года назад
😂
@karazee404
@karazee404 2 года назад
I can totally confirm... the STM32 data sheet... ^^
@ewout4890
@ewout4890 2 года назад
@@karazee404 true I'm currently using a L476RG dev board that thing has so many peripherals😅
@hansdietrich83
@hansdietrich83 2 года назад
Setup, code, compile, flash, ...... , open the 1000 page datasheet to find why it does not work
@kawrx2002
@kawrx2002 2 года назад
And doing a hail mary google search that someone else has figured out what you're looking for
@datawolk
@datawolk 2 года назад
I would like to see an more in depth video about linkerscripts!
@JacobSorber
@JacobSorber 2 года назад
Yeah, it seems you aren't alone. I'll see what I can do.
@m4l490n
@m4l490n 2 года назад
Definitely! You could make a more detailed video about linker scripts, especially showing how you can place stuff on certain locations using the linker script. That is very useful for example when you need to have a struct always placed in a specific location in ram, or some code in certain location in flash, etc. Knowing how to use the linker file is very valuable and a must for embedded C developers.
@derekkonigsberg2047
@derekkonigsberg2047 2 года назад
Yeah, I went down the rabbit hole of linker scripts a few months ago to put some "descriptor" structs into my embedded app binary, and it wasn't the easiest thing to figure out. The top-level basics are simple, but the moment you try to actually do anything with them it becomes a lot more difficult.
@Psykorr
@Psykorr 2 года назад
Just want to add to the list of wishes for linkerscript videos :)
@Ma1ne2
@Ma1ne2 2 года назад
I totally agree, would love to learn more about it!
@yournemesis8232
@yournemesis8232 2 года назад
RIP to the college student who contributed to this article
@erickballesteros4531
@erickballesteros4531 2 года назад
One of my project courses in CS, was actually embedded programming; we programmed chips to be calculators, serve as alarms, and even play music, and the overall structure felt a lot more comforting than regular C. I liked having all the linker files and macros cuz they just made me feel like I was coding in an environment.
@karazee404
@karazee404 2 года назад
hey Jacob! I got hooked to your videos and they have been really helpful. I'd really love to hear about debugging embedded systems. cheers!
@LogicEu
@LogicEu 2 года назад
Hey! Absolutely loved the last part, I had never seen that kind of embedded slang in C, would love to see more!
@JacobSorber
@JacobSorber 2 года назад
Glad you liked it! I'll see what I can do.
@lilposte6970
@lilposte6970 2 года назад
I am an embedded systems engineering student , i like your tutorials , i like your way of explaining , thank you very much mr jacob
@666aron
@666aron 2 года назад
Nice explanation! I have only one rule for embedded C/C++ vs others. If I'm dealing with embedded systems, I tend to stay far away from dynamic array allocations. But that may be because of the limited experience I have. The heap is scarce, and every time that I tried (string manipulations and complex math algorithms), I ran into hard faults (even with freeing pointers).
@JacobSorber
@JacobSorber 2 года назад
Thanks. Me too. As resource constraints tighten, anything (like dynamic memory allocation) that introduces nondeterminism tends to create headaches.
@MrHaggyy
@MrHaggyy Год назад
😅 i also try to avoid it and only use a fixed memory layout. Only exception beeing diagnostics, you simply need to store different types of structs. Most of the time i even try to stay away from an (RT)OS.
@selectstriker2
@selectstriker2 6 месяцев назад
Static memory allocations or dynamic memory allocations at initialization only in my experience with bare metal
@vijayk7947
@vijayk7947 2 года назад
I started following u last month...i watched almost every video in ur channel... u r really doing great job mate👍
@JacobSorber
@JacobSorber 2 года назад
Thanks and welcome.
@lewiscole5193
@lewiscole5193 2 года назад
Aside from linker scripts and defines, there's also the small matter of various libraries that are specific to a particular embedded processor or family of embedded processors. I bring this up because it seems like neophyte C programmers seem to think that I/O functions like "printf" are a part of the C language (like "WRITE" is a part of the FORTRAN language) rather than a part of a library that can be replaced or omitted entirely depending on need.
@jorgeferreira6727
@jorgeferreira6727 Год назад
Last time I used "Borland Turbo C" was on top of WinNT 4.0, for cross development for an MS-DOS based platform. In case you are curious the MS-DOS based platform(s) were Norand/Intermec portable devices, the grand parents of modern tablets. By that time, 1999, my goto programming tool for desktop development was C++ Builder 3, and some Visual Basic 5 when forced by my co-workers.
@mathemabeat009
@mathemabeat009 2 года назад
Thank you for sharing this, I am an embedded firmware developer, and yes, is a usage of a old C, and not only that, you must be strong at Make and the linkerscript, a whole world on it, diferent architectures. Lot of fun.
@Miguel-tr2ev
@Miguel-tr2ev 2 года назад
Exactly what I need!!! Thanks alot in advance. Imma bout to watch
@benarcher372
@benarcher372 2 года назад
Also, debugging and testing of embedded systems would be great to hear more about.
@gonzajuarez4918
@gonzajuarez4918 2 года назад
i'd like to see more about linker scripts. so far each time i see ".ld" i just know "that's the black box that joins stuff together" but the more i get into embedded and systems programming the more common they become, so it seems like a good time to understand a bit of that black box lol. Really like your channel. greetings from Argentina
@gregoryfenn1462
@gregoryfenn1462 2 года назад
Agreed! linker files looks sort of like C but not really and I'd like to learn more
@hansdietrich83
@hansdietrich83 2 года назад
Yes please
@shaimaehoo821
@shaimaehoo821 2 года назад
A real BLACK BOX, I always have that question; how does the linker work? How it joins everything together ?
@chiragsingla.
@chiragsingla. 2 года назад
Yes I also want to learn about linkers
@jamesboby2206
@jamesboby2206 2 года назад
Great video as usual, Jacob. When you said "I'm not sure anyone has used borland C in the past decade....." you had me laughing my ass off. We still use borland C to learn C in colleges and universities in India to date. It's run in DOSbox. I do see the appeal of using it for educational purposes, as you can see the state of the registers and stuff much easier using the in-built debugging tools.
@kerr1221
@kerr1221 Год назад
GDB: "Am I a joke to you?!"
@belesiu
@belesiu 2 года назад
Nice video. Surprised the Embedded C misinformation is out there. I’ve been using C for embedded systems since … um … the 80s (and that dates me). Back then, we used DOS based cross compilers and had to write our own standard C library and had to create our own header files for the hardware (it was an electrocardiograph based on an Intel 80376, a protected mode only version of the ‘386). We never really considered it a different C language, just regular C with a limited built in library. And we had different ways of writing into the HW registers, sometimes using linker scripts and other times just assigned pointers to physical addresses.
@_BerkDogan
@_BerkDogan 5 месяцев назад
wow
@ashvinjagadeesan2881
@ashvinjagadeesan2881 2 года назад
Thank you for posting such high quality content!
@jgcooper
@jgcooper 2 года назад
Please more on linkers. Say for example, if you were writing an old console game on C, would you be able to write a custom linker to manage the memory mapped resources?
@dipto100
@dipto100 2 года назад
Great video. Thanks for clearing this up. Hard to find quality and easy to understand information on the web sometimes. I'd definitely be interested in videos on linker scripts and debugging embedded systems.
@JacobSorber
@JacobSorber 2 года назад
You're welcome. Linker scripts and embedded debugging coming right up...well eventually in the coming weeks/months. 😀
@robertstrickland9722
@robertstrickland9722 2 года назад
Love your videos and glad to be a top tier patron!
@JacobSorber
@JacobSorber 2 года назад
Thanks. Always appreciate the support.
@mabagoury
@mabagoury 2 года назад
And finally some well-thought content about the difference. I always thought as you about that, but all that content on the web really confused me. They never convinced me, though.
@DM-qm5sc
@DM-qm5sc 2 года назад
Will you do more embedded content? I really like Arduino and other microprocessors and programming them to do neat things.
@cleightthejw2202
@cleightthejw2202 2 года назад
Yes, I would like to see some linker scripts videos, Jacob!! :)
@JacobSorber
@JacobSorber 2 года назад
Ok. I'll put it on the list. Thanks.
@siliconrobot6522
@siliconrobot6522 Год назад
4:31 I think I have an old version of DOS Borland Turbo C and Turbo assembler TASM and Turbo Pascal as well. I used to program my old DOS a lot with these high quality software and even made DOS graphic and mouse driven interfaces with them. I still using them in DOSBOX from time to time. I can send them to you if you still need them.
@anupnishanrao7767
@anupnishanrao7767 2 года назад
You're amazing man i didn't know this before 🙏💕
@lixakcase7897
@lixakcase7897 2 года назад
Thanks for awesome video as always! Can I ask is there some standard way for serial communication between two microcontrollers or pc and mcu? I mean, we can open serial communication and made switch statement to choose which command means what, but is there some standard (bulletproof) way to make reliable communication for production? I saw that communication should contain checksum, number of bytes, negative acknowledgement, timeout, errors, data loss, etc... how to handle all that? If there is some source to learn more about it, I would really like to hear. Thank you
@vedantm19
@vedantm19 2 года назад
Please add more about programming with embedded C. Some sort of examples with explanation. Also I would really be thankful if detailed video on linkerscript is uploaded anytime soon on this channel! :)
@szilagyimiklos4757
@szilagyimiklos4757 Год назад
Did you know that the first embedded system, the Apollo Guidance Computer, was developed for NASA's Apollo program in the 1960s? It used a custom-built assembly language, but modern embedded systems have come a long way since then! Today, we use Embedded C/C++ to program microcontrollers, enabling devices like IoT gadgets, drones, and even smart appliances. The key difference between regular C/C++ and Embedded C/C++ lies in the system constraints, like memory and processing power, that embedded systems have to work with. This makes writing efficient and optimized code a top priority for Embedded C/C++ developers!
@WistrelChianti
@WistrelChianti 2 года назад
Thanks that was really interesting. I came here thinking "eh? there's a difference?" was glad to be assured there wasn't. That said the 2nd half of the video about how the registeres are defined as variables stored at certain memory addresses was super interesting. I had no idea it would be done like that. I'd kinda assumed it was happening in code somewhere rather than a linker.
@hongsonly3785
@hongsonly3785 2 года назад
Hello Jacob, can you make a content about difference between about embedded software engineer, embedded hardware engineer, automotive engineer, driver development engineer? Love your videos much
@bestpseudonym1693
@bestpseudonym1693 2 года назад
Man this would have been very topical when I was teaching myself how to use embedded C++ to program a SBC half a year ago
@tobaadesanya32
@tobaadesanya32 2 года назад
Hi, thank you for this video. I would like to see more videos on linker scripts and testing, especially automated testing, for embedded systems.
@leokiller123able
@leokiller123able 2 года назад
Nothing to do about the video but I'd love to see some videos in which you dive into assembly and low level programming (kind of like the one you did 11 months ago but deeping more into code)
@vatsalnaik15
@vatsalnaik15 2 года назад
Great video again. Please do more videos about linker scripts, and embedded C in general. It would be great.
@doowi1182
@doowi1182 2 года назад
Embedded C is when you have switch statements instead of if-elses and the more switch statements you have the more embedded the C is.
@JacobSorber
@JacobSorber 2 года назад
😂
@MDarkus3
@MDarkus3 2 года назад
perfect video! Please, do an episode about linker script ! also do an episode about why c++ would be considered for embedded system development ? I have trouble figuring this out
@sharana.p5921
@sharana.p5921 2 года назад
Thank you for the video 😊😊. Waiting for linker script, debugging and testing.
@Appel070
@Appel070 2 года назад
Nice video, its wierd that such misinformation is out there would be really frustrating to read that and later found out that it was all bullocks
@raghavsrivastava2910
@raghavsrivastava2910 2 года назад
Great Video 🔥.... Please make a video that explains in depth about linker scripts and why we can directly manipulate registers on embedded devices in C/C++.
@djpenton779
@djpenton779 Год назад
Nice video. I suspect the misconceptions sometimes arise due to lack of experience with, say device drivers, or "larger" computers that have memory-mapped registers. C (not some separate language) is used for that stuff, and for most OS code. Most programmers probably don't run into cross-compilation either. I have just recently started with hobby microprocessor programming, but have lots of experience with low level stuff on general purpose computers. Systems like the arduino IDE hide a huge amount of detail, which leads to misunderstandings of how the too lchain (including the language) actually works.
@TeoTheZetron
@TeoTheZetron 2 года назад
Hello and thanks for this specification. Unfortunately, many programmer comment in totally wrong motion and insert absurd documentation on thei websites which are often taken from other websites. Do people no longer want to study?
@manuelcapel5889
@manuelcapel5889 4 месяца назад
It's like asking "what is the difference between English/French and legal English/French". Both are the same languages, use the same vocabulary and grammar set, just that in a legal setting, you focus more on certain vocabulary and syntax that are not very common in everyday speech.
@tjalferes
@tjalferes 2 года назад
More on testing in future videos please. Thank you.
@burningglory2373
@burningglory2373 Год назад
Funny that GCC was only under the "Normal C" while microchip basically only uses forks of GCC for their pic compilers.
@DevlogBill
@DevlogBill Год назад
Excellent video, I love your content they are always educational. I am learning easier stuff than this, JavaScript. But I had a question. RUST is extremely popular now and I hear it can be used for embedded systems as well? Have you used Rust before? In your personal experience do you think Rust is as perfomanent as C or C++?what is your opinion? ThNk you for the excellent content.
@deepakr8261
@deepakr8261 2 года назад
Hey Jacob Awesome video as usual. Could you do a video on RTOS vs GPOS. Like what make RTOS "real time". Again there are lot of resources out there but intrigued to know your view on it. Thanks.
@JacobSorber
@JacobSorber 2 года назад
You're welcome. I'll add it to the list and see what I can put together.
@neerajkale
@neerajkale 2 года назад
This got to be the most popular interview question out there... 😂
@BorlandC452
@BorlandC452 2 года назад
I actually still have a CD-ROM of the Borland C++ 4.52 compiler that I bought back in the late 90's. Then in the early 2000's, Borland was bought by a company called Embarcadero. Up until 2015, they actually used to let you download the 32-bit compiler for free. (It was strictly a command-line compiler - no IDE.) They still let you download a free compiler, but it's clang-based instead of Borland. I actually still use the 32-bit compiler on the rare occasions I develop something for Windows.
@kasimsche2812
@kasimsche2812 2 года назад
Sir then any plan for Embedded C course??? We would like to have specially if you start with ARM mcus and processors. RISC-V is also a very good option
@hansdietrich83
@hansdietrich83 2 года назад
How often do you look at decompiled assembly when debugging? I used it exactly once in many years of embedded C programming on Atmel and STM32 and I'm wondering if it could be used more.
@JacobSorber
@JacobSorber 2 года назад
I probably look at the assembly weekly. It doesn't always end up being useful, but often it does. I find that it depends a lot on the sort of problem I'm trying to solve and the nature of the bug.
@MrHaggyy
@MrHaggyy Год назад
😅 whenever you found a hardware bug you will need assembly for sure. It highly depends on what you are doing. Bootloader or other "premain" code is quite often written in assembly so you debug it in assembly. Application code like controllers or state machines are more detached from the HW so i usually stay in C and watch windows.
@Maranello988
@Maranello988 2 года назад
Cool video, thanks! Yeah, and I would like to get more about the linker script, that will be useful, thanks in advance!
@sridayalseth801
@sridayalseth801 2 года назад
It will be better if a good discussion on linker should be there. Informative video !!!
@habibahmed5140
@habibahmed5140 2 года назад
Hey good to watch your videos finally someone is right here to ask the following question I have completed bachelors in mechanical here in Italy now i have started masters in mechatronics but i want to make my career in embedded software development, i am going to study "operating systems for embedded systems ", "programming for IoT using python " and "software architecture "this semester any help and guidance to make my path towards this will be highly appreciated
@brokenicry
@brokenicry Год назад
DEFINITELLY a YES on debugging and testing... Do you perhaps have such a video already??
@ivanronda9583
@ivanronda9583 9 месяцев назад
I was learning to code in C for the last 2 years and i was stunned when i saw that embed code.
@trumanbeal5668
@trumanbeal5668 2 года назад
Linker scripts would be awesome! Especially on something embedded, as that is extremely interesting
@amitabhgogoi1823
@amitabhgogoi1823 2 года назад
yeah !! want to learn more about linkerscripts and debugging in emmbedded systems !!! pls put some videos
@gdotone1
@gdotone1 Год назад
more on linker scripts please. a lot more on embedded programming, a project start to finish. walk throughs of were to find and use information for the parts and project. that would be very valuable. and, of course, more than 5 such projects.
@davidramsay9321
@davidramsay9321 2 года назад
Self taught myself alot but can you make a video on the translation layer on makefiles where _("THIS") can be translated via complile time.. vs "this" is hard coded.
@ucnamnguyen7549
@ucnamnguyen7549 2 года назад
Please make more videos about linker process of embedded programming
@ShaunRoselt
@ShaunRoselt 11 месяцев назад
Borland Turbo C evolved into Embarcadero C++ Builder and it's absolutely amazing.
@htainlindwa80
@htainlindwa80 Год назад
Hello sir, I am extremely new with learning C programming, but I want to learn from you because I like your attitude. I am not sure though, that i would be able to learn from you because I am a slow learner. Do you think your class could be for me or do you thank I need some prerequisites to start learning C? Let me know thanks!
@bhimbdrlama
@bhimbdrlama 2 года назад
Can you tell me where I can learn this?? Online course .. any information is valuable.
@RobertFletcherOBE
@RobertFletcherOBE 2 года назад
I get your reticence to call out people for bad information but Its appreciated. Getting good information on C is allot more difficult than C++ and other more 'modern' languages Your videos have inspired me to take another look at C, I've been learning C++ and there is so much 'guff' and complication involved in it that something simpler is quite nice.
@danielmor5002
@danielmor5002 2 года назад
Mate you are awesome!!! If you may also share how do you use VSCODE with ti emulator driver, because Code composer is weird ... To weird So please share your build system with the world .
@salsamancer
@salsamancer 7 месяцев назад
The syntax of C doesn't change, but rather you need to rethink how you design your code. You're not building an app to execute on an OS, you're creating the firmware to run the entire machine.
@saalam6880
@saalam6880 2 года назад
Nice video! I would like to see more about linker scripts. Something I dont understand (maybe it could be answered in a video about linker scripts :)) Why does the sfr macro not define each register adress as a pointer, since they define an adress, and then dereference the pointer to write to the register? When I change some register X how does the compiler know that it has to change register at adress X? If they were defined as pointers could all of the register adresses be defined in the header file instead of the linker script?
@brucelytle1144
@brucelytle1144 Год назад
Funny, just yesterday I was thinking about Borland. I liked their software. Learned C with TurboC.
@tokki_
@tokki_ 2 года назад
I would love more Embedded C content, as much low level as possible
@edgarbonet1
@edgarbonet1 2 года назад
Although the expression “embedded C” is quite fuzzy in its meaning, it can sometimes be used to refer to one of two specific things: • A freestanding C implementation. Although the difference between hosted and freestanding is mostly about the libc, there is also the language requirement that the entry point of the program should be main(), which is lifted in a freestanding implementation. • A set of extensions to the C language standardized by the ISO as “Programming languages - C - Extensions to support embedded processors”. These extensions do affect the language. As an example of the latter, consider how you would read a constant from instruction memory (i.e. flash) on AVR. This is a Harvard architecture, where RAM and flash live in different address spaces and are accessed through different machine instructions. Regular C doesn't know about address spaces: a pointer is a pointer, and is always dereferenced in the same way. The avr-libc works around this issue with some macros like pgm_read_byte() that expand to inline assembly, but they are clumsy to use. Now, since gcc implemented the “named address spaces” section of the embedded C extensions, you can use the __flash type qualifier, and the compiler knows how to dereference your pointers to flash.
@blahhblaah74
@blahhblaah74 2 года назад
That compiler comparison was probably true 20 years ago, and around that time Borland C compilers were used as well... Nuf said.
@classicryda120908
@classicryda120908 Год назад
as a beginner, im confused to this type of programming style, can it be replaced as a more user friendly code that doesnt involve bit shifting/register? or is it a totally different thing? for example im accustomed to digitalWrite(pin, HIGH) instead of toggling some bit on the register, is it equivalent?
@JacobSorber
@JacobSorber Год назад
It's functionally equivalent. digitalWrite is simply just providing a function wrapper around some register accesses. Depending on your compiler, the higher-level interfaces may incur a cost (larger code, slightly slower execution). But, they're doing essentially the same thing.
@aadhuu
@aadhuu Год назад
4:35 yep. In India many colleges unfortunately still use Turbo C and I do have it on my laptop lmao .
@moseschuka7572
@moseschuka7572 Год назад
please can you do a tutorial on programming stm32s with C++ on keil or stm32cube
@axalius572
@axalius572 2 года назад
When Jacob talked about misinformation in regards to programming, I instantly knew which site he meant. The same one that has tons of bugs and memory leaks in their example algorithms.
@aneeshprasobhan
@aneeshprasobhan 2 года назад
which site ?
@w.mcnamara
@w.mcnamara 2 года назад
@@aneeshprasobhan geeksforgeeks. Avoid it
@Ahmed-Hosam-Elrefai
@Ahmed-Hosam-Elrefai 2 года назад
I'd really love to see video on linkers
@yamunasuryawanshi3563
@yamunasuryawanshi3563 2 года назад
I pretty sure the question was asked by a person who tried learning python and ended up learning libraries 😂. Love your videos .LIVE FROM INDIA STAY BLESSED .
@elijahbuscho7715
@elijahbuscho7715 2 года назад
I'm curious what level of experience the person who wrote the article has. My initial thought was like an inexperienced undergrad who took a couple of courses, and was trying to flex their computer science knowledge, but there are some pretty advanced terminology that I would have never been able to use as an undergrad. I'm impressed at how much they know, with how little they seem to understand. Like they understand that the OS changes how you may need to write a program, but they don't really understand what an OS really is.
@not_ever
@not_ever 2 года назад
It's entirely possible that the parts that impressed you were plagiarised, hence why they seemed to have advanced knowledge with little understanding.
@ronalerquinigoagurto555
@ronalerquinigoagurto555 10 месяцев назад
Gcc has different versiones like none-eabi, so I think in the end the compilers avoid using syscall instructions as it knows beforhand that there is no kernel/os
@Mohamed.U3
@Mohamed.U3 6 месяцев назад
I am not sure what linker files are but as the looks of it, it looks like he is using a typedef enum which is inside a struct that is named "MEMORY" and he is using bitfields(since they can't be used with enums that's why it might be added inside a struct) to intialize how many bits that certain enum variable takes. If that's the case, that would mean I have finally found a purpose of enums.
@juuamjskn2420
@juuamjskn2420 2 года назад
I love your vids
@AGBuzz182
@AGBuzz182 2 года назад
I'd like to see more about linker scripts
@ravimali2814
@ravimali2814 2 года назад
Holy crap. That article needs to be pulled down.
@JacobSorber
@JacobSorber 2 года назад
That was my thought. Or fixed?
@ravimali2814
@ravimali2814 2 года назад
@@JacobSorber There is sea of misinformation everywhere to fix. It's rather easier to spread correct information which you are already doing. Keep up the good work.
@derekkonigsberg2047
@derekkonigsberg2047 2 года назад
Back in the late 90's, when I first started to dabble in embedded systems, a lot of the embedded C compilers were really bad. It was also not uncommon for them to not actually properly support ANSI C as we know it. Thankfully we're long past that, but I wouldn't be the least bit surprised if some lingering opinions can be traced back to that era.
@JacobSorber
@JacobSorber 2 года назад
Thank you.
@bobfarker4001
@bobfarker4001 8 месяцев назад
"borland turbo C for archeological sake" -People who LOVE this stuff care about the HISTORY.
@cookingwiththehaitiantwist
@cookingwiththehaitiantwist 2 года назад
Would you please make a video that summarizes c programming for embedded system? (For absolute beginners) I cannot find books or articles that I can use for this introductory computer engineering class. I wanted to preview it before school starts this fall, however, a book was not posted for it in my syllabus. I would really appreciate it! Thank you!
@JacobSorber
@JacobSorber 2 года назад
Hi Cleo. I'm not sure if you've looked at my other embedded videos. They may not be exactly what you're looking for, but they might help. I do plan to make more embedded content, and I'll see what I can do to address your summary question, but I'm not sure I'll get it out in time for your fall class.
@cookingwiththehaitiantwist
@cookingwiththehaitiantwist 2 года назад
@@JacobSorber hi, thank you. I have checked out a few of them, but they are a bit more advanced. However, I figured out that it would be best to learn about embedded systems and then see how C language is used in them. Thank you!
@JacobSorber
@JacobSorber 2 года назад
@@cookingwiththehaitiantwist Thanks. That's good to know. All the best.
@cookingwiththehaitiantwist
@cookingwiththehaitiantwist 2 года назад
@@JacobSorber thank you!
@ranjithmkumar
@ranjithmkumar 2 года назад
I think it would be better if you have told about the availability of the C standard library. Most OSs like Linux or Mac come with a standard library like glibc or bionic libc. But on a embedded system, it is optional. So, the microcontroller vendor might or might not provide a full-fledged standard library. This means standard malloc or logging to the console using printf which is over UART usually in embedded system is optional. Something like diet libc, musl libc, nanolib, newlib all implement printf over a wrapper to sbrk. And it is optional for embedded systems with a memory section for heap. This is one huge difference I feel. And usually when writing on top of an OS, we deal with files and not with registers or memory. In case of embedded systems, there is optionally a filesystem and usually peripheral registers and memory addresses.
@JacobSorber
@JacobSorber 2 года назад
Good point (maybe material for a future video). The styles, interfaces, and patterns definitely vary.
@benhetland576
@benhetland576 2 года назад
Yes! And exactly this is probably the key difference in using C on an embedded platform vs on a full-fledged OS. The standard has a whole list of requirements that either don't apply to embedded implementations, or that are more lenient or adaptable in those environments. All the startup code and whether or how main gets invoked is one such topic, and the other is the reduced set of standard headers one can rely on to be there. Otherwise it is C and nothing but C.
@ranjithmkumar
@ranjithmkumar 2 года назад
@@benhetland576 Yes The startup code and bootstrap code is one more set of differences.
@jorgeferreira6727
@jorgeferreira6727 Год назад
Microchip compilers for the PIC32 family of micro.controllers are GCC based.
@rick_er2481
@rick_er2481 2 года назад
Nice video! Yes please more on linker scripts :)
@JacobSorber
@JacobSorber 2 года назад
Thanks. I'll see what I can do.
@rohityadav-ss8wx
@rohityadav-ss8wx 7 месяцев назад
If possible would you please explain linker scripts in details
@samgarg5228
@samgarg5228 Год назад
Useful for filling up sheets in exams (experienced).
@chiraghadiya3817
@chiraghadiya3817 2 года назад
In my mind I got first question is that does c and embedded c are same ?
@daguich
@daguich 2 года назад
As someone who is doing embedded software development for a living, I am almost offended by this article... Thanks for the clarification!
@nikolatotev
@nikolatotev 2 года назад
I'm just starting out in the field, I love programming devices that do something in the real world. How would you recommend for a newbie to start, are there any good books on the subject?
@daguich
@daguich 2 года назад
​@@nikolatotev I guess you are a hobbyist. I don't like to read books so much, in my opinion you will learn the most by trying things out by yourself. Most of the time you will find really well written articles and wiki pages about so many topics with a quick and simple google search. I'd say think about an easy project. I'd recommend to start with something like an arduino, as it is easy to setup and you don't need to think about your own boards and whatnot. There are a lot of arduino projects out there and especially a lot of (good) videos on youtube. There lots of ready to use libraries for arduinos, so you don't have to bother about writing all the "drivers" by your own. Certainly your "easy" project will turn out to be more complex than you thought, but this is fine as you will learn more and more about different topics. Once you have played with arduinos and ESPs, you can design your own boards, you will read lots of datasheets of different microcontrollers and other components, you will read about different communication interfaces (I2C, SPI, ...).
@smit17xp
@smit17xp 2 года назад
coming form rust's no_std, I always thought Embedded C is just C without standard library also many indian collages teach with turbo C cause old teachers refuses to learn anything new and cant accept the fact the c++ is evolved but they are not
@hightlightlol2106
@hightlightlol2106 2 года назад
So should I learn for C or C++ to learn embeded systems. I'm new here
@gauravsingh3007
@gauravsingh3007 2 года назад
@Smit Patil I haven't heard a lot of Turbo C/C++ being used in colleges, but that's what was being used in my intermediate school (11th-12th). And I am not so sure if teachers are the main reason for that.
@not_ever
@not_ever 2 года назад
​@@hightlightlol2106 At university we learned Assembler (PIC), C and C++ for embedded systems programming, in that order. However if you are self-taught learn whatever you like. Don't listen to people who tell you, nobody uses C++ in embedded systems or you should only learn Assembly code, C or whatever language. These people are wrong. Since embedded systems is a big field, if you are going to teach yourself, it will be hard to know where to start, pick one platform, language and dev environment and stick with it for a while.
@berekethaddis239
@berekethaddis239 Год назад
Thank u .
@tech-preneurshipwithjeff5745
@tech-preneurshipwithjeff5745 2 года назад
please can you be my mentor. I am currently learning c and embeded c for chip programming. I would love to have someone i can talk to and share my concerns during my learning journey.
@aneeshyr
@aneeshyr 2 года назад
4:19 the website is indian, and in indian schools (at least mine, high/elementary) they still teach c++ using turbo c compiler. It's really outdated its main function type is void, there is no std namespace and its soo different from the standard c compilers I use. Really sad , my classmates don't even know how the standard modern c++ looks like although they are studying computer science
@JacobSorber
@JacobSorber 2 года назад
Interesting. Do you think it's just institutional/instructional inertia, or do you think there are other reasons why they don't use more current freely-available tools?
@lewiscole5193
@lewiscole5193 2 года назад
Not that it's really all that relevant to the subject at hand or matters in the slightest if it is, but once upon a time, _Circuit Cellar INK_ magazine used to be a wonderful source of information on embedded systems work. But that was back before most of its regular contributors departed and the magazine devolved into the Jeff Child equipment review and offline blog. When that happened I dropped my subscription and haven't looked back since. Still, many of the old _Circuit Cellar INK_ articles are still available online, and I at least still think they are a good introduction to doing things embedded and just happen to show what "embedded C" looks like compared to non-embedded C. So if anyone out there has nothing better to do, may I suggest you try Googling articles from some of the old regular contributors like Ed Nisley ("Above the Ground Plane"), Jeff Bachiochi ("From the Bench") and Robert Lacoste ("The Darker Side"). And if Professor Sorber or someone else out there as other sources they'd like to mention, I for one would be interested in hearing what they'd be.
@alainterieur5004
@alainterieur5004 2 года назад
something offtopic but: how to know when we are good enough to contribute to an open source project ?
@JacobSorber
@JacobSorber 2 года назад
Good question. One answer might be: when the maintainers start accepting your proposed fixes/updates.
@alainterieur5004
@alainterieur5004 2 года назад
@@JacobSorber it's a big brain answer lol
@m4l490n
@m4l490n 2 года назад
@@JacobSorber lol I came here to say exactly that. You beat me to it. There is really no other way of knowing.
@minaessam2039
@minaessam2039 6 месяцев назад
I need to see more videos about Linker script
Далее
Debugging Embedded Systems With GDB?
13:51
Просмотров 43 тыс.
How To Become An Embedded Software Engineer?
10:30
Просмотров 121 тыс.
小路飞被臭死啦!#海贼王#路飞
00:27
Просмотров 2,1 млн
МАЛОЙ И РЕЧКА
00:36
Просмотров 296 тыс.
How different are C and C++? Can I still say C/C++?
10:25
10 years of embedded coding in 10 minutes
10:02
Просмотров 379 тыс.
C++ vs Rust: which is faster?
21:15
Просмотров 378 тыс.
When Zig Outshines Rust | Prime Reacts
23:31
Просмотров 134 тыс.
How C++ took a turn for the worse
5:03
Просмотров 257 тыс.
Defining Constants. Should I use CONST or #DEFINE?
7:59