Thank you. This was cathartic for me to watch as someone who also bucks the convention of "C only" for microcontrollers. Also thanks for the introduction to Boost.SML. Watching that next.
Terrific talk. Was laughing out loud a few times. BTDT frequently on most of what you said. Did the startup code for a Moto 68332 in early 90s. Wrote pages of #defines for every bit and its position in the registers. Created #define macros for every register which merged the bits and wrote to the register. One of the best compliments I've gotten from a hardware guy was, "I think I could create the startup code using Rud's work." Wrote some articles on using C++ for embedded systems. Mainly was for Arduino and some Pi but the concepts are the same for other systems. hackaday.io/project/8238-embedding-c Especially like the comment around 55:00 that if your reaching for the debugger you've already got a problem. One embedded system I created had 24 LEDs: 8 red for error status and 16 green for operating status. You could diagnosis the system using the LEDs. But 8 green ones were only used by developers for debugging. I always prided myself on debugging skills. I could think through the system flow and would then realize the bug had to be in a specific section. Walking through the code usually found the problem. On some of the first systems I did we had In Circuit Emulators (ICE) that allowed step by step execution on the hardware. Find it funny that embedded developers apparently don't trust the compiler and need to step through code. In all my decades that is not something I've worried about and can't recall ever finding a bug caused by bad compiler code generation.
3:10 it's actually because of the insane crowd of gasoline engines sitting in traffic or speeding on the highway that causes that noticeable smog, diesels are generally heavily filtered and don't produce much carbon emissions, their nox emissions are higher, so the exhaust is technically worse for humans but doesnt effect the environment so much
Two years late but for anybody reading by: It’s the Logitech Spotlight Presenter - If the target computer has the spotlight app installed, the gyro position of the device is send while the top button is pressed. The highlighted area can be styled yourself, like he did here.
so count_if with value as filter and a const list which contains the item, will calculate the answer at compiletime, massively reducing compute time!! NICE
I'm interested in knowing more about embedded. In this matter, all I have worked with is using timers and other peripherals in Atmega328p. I uploaded the code to the board by clicking "upload" in Atmel Studio 7. I didn't really configure anything other than selecting the board and tht's pretty much all I know. How would I go about learning how to do this more manually, as I think is the case presented in this talk? I'm referring to CMake files and Linker scripts, and also how to implement a good abstraction layer API for Timers, ADCs etc. It does seem a little overwhelming and I would appreciate any guidance :)
Talking about state machines, have you ever tried to use QP/C++ (www.state-machine.com/)? Maybe it doesn't use as much of the modern C++ tecniques as Boost.SML, but it seems to me a more mature piece of SW.
Why? The 'end' iterator is not used in the algorithm and 'data+sizeof(data)' points to the next int right after 'data'. So it goes through the array and when the internal iterator equals the 'end' iterator, it stops without. Am I missing something?
bktero Yes, you are missing the (inherited from C) fact, that pointer±integer scales the integer by sizeof(*pointer) before the addition. Correct method: #define ELEMS(a) (sizeof(a)/sizeof((a)[0])) end=data+ELEMS(data); Like the version in the video, this only works if data has not decayed from array to pointer, i.e. is not a function parameter.
You are absolutely write. My bad... I often write code like the one in the video but with byte arrays and it works in that case. But that's a special case. And I also std::array and it's size() member function. I also misunterstood 'factor' in your sentence. I was thinking 'it is a going on step too far' but no, it is going a lot of steps too far.
Indeed. Embarrassing. In an effort to make some of the code more familiar to people with little C++ experience I decided to not use std::begin and std::end. It should have just been written : std::count_if(std::begin(data), std::end(data) ...
Regarding getting c developers to switch to c++, check this blog.kareldonk.com/convincing-c-programmers-to-switch-to-c-a-look-at-human-thinking-behavior/
42:40 "the good stuff starts at time mark 45"
Thank you. This was cathartic for me to watch as someone who also bucks the convention of "C only" for microcontrollers. Also thanks for the introduction to Boost.SML. Watching that next.
this looks like a Renesas mpu RZ/T1
I can so feel you, having suffered the same struggle when making C++ work on our product
Terrific talk. Was laughing out loud a few times. BTDT frequently on most of what you said.
Did the startup code for a Moto 68332 in early 90s. Wrote pages of #defines for every bit and its position in the registers. Created #define macros for every register which merged the bits and wrote to the register. One of the best compliments I've gotten from a hardware guy was, "I think I could create the startup code using Rud's work."
Wrote some articles on using C++ for embedded systems. Mainly was for Arduino and some Pi but the concepts are the same for other systems. hackaday.io/project/8238-embedding-c
Especially like the comment around 55:00 that if your reaching for the debugger you've already got a problem. One embedded system I created had 24 LEDs: 8 red for error status and 16 green for operating status. You could diagnosis the system using the LEDs. But 8 green ones were only used by developers for debugging.
I always prided myself on debugging skills. I could think through the system flow and would then realize the bug had to be in a specific section. Walking through the code usually found the problem. On some of the first systems I did we had In Circuit Emulators (ICE) that allowed step by step execution on the hardware.
Find it funny that embedded developers apparently don't trust the compiler and need to step through code. In all my decades that is not something I've worried about and can't recall ever finding a bug caused by bad compiler code generation.
Excellent talk.
3:10 it's actually because of the insane crowd of gasoline engines sitting in traffic or speeding on the highway that causes that noticeable smog, diesels are generally heavily filtered and don't produce much carbon emissions, their nox emissions are higher, so the exhaust is technically worse for humans but doesnt effect the environment so much
Where do I buy a smart pointer like that?
Two years late but for anybody reading by: It’s the Logitech Spotlight Presenter - If the target computer has the spotlight app installed, the gyro position of the device is send while the top button is pressed. The highlighted area can be styled yourself, like he did here.
That was an amazing talk. Thank you.
Thank you John. I'm glad you found it useful.
so count_if with value as filter and a const list which contains the item, will calculate the answer at compiletime, massively reducing compute time!! NICE
Starting an embedded job as a fresh CompE grad soon; not sure if this was encouraging or intimidating, but a good talk nonetheless!
Good luck with the new job! Don't be intimidated. If you are ever at a conference and I'm there, find me and let me know how it is going.
I'm interested in knowing more about embedded. In this matter, all I have worked with is using timers and other peripherals in Atmega328p. I uploaded the code to the board by clicking "upload" in Atmel Studio 7. I didn't really configure anything other than selecting the board and tht's pretty much all I know. How would I go about learning how to do this more manually, as I think is the case presented in this talk? I'm referring to CMake files and Linker scripts, and also how to implement a good abstraction layer API for Timers, ADCs etc. It does seem a little overwhelming and I would appreciate any guidance :)
did you ever take on this challenge to try and learn how to really program the chip?
Talking about state machines, have you ever tried to use QP/C++ (www.state-machine.com/)? Maybe it doesn't use as much of the modern C++ tecniques as Boost.SML, but it seems to me a more mature piece of SW.
any thoughts on : Keynote: What can C++ do for embedded systems developers? - Bjarne Stroustrup"" ?
Thanks for this talk. Ladon library seems interesting, is it open source ? I hardly found it searching google and github
Ladon is not open sourced ... yet. We are considering how to proceed with making the library available.
I feel so included in this talk
Where is the source code for this presentation?
C++ on Arduino or RaspPie is so unaccesssible as well. Who can help to bring the TTHW down to 1 minute instead of 1 month?
ssh into raspberry pi. touch HelloWorld.cpp then Nano HelloWorld.cpp write helloworld code save and compile with GCC and run.
Bug in example code at 52:02, sizeof(data) is too large by a factor of sizeof(int).
Why? The 'end' iterator is not used in the algorithm and 'data+sizeof(data)' points to the next int right after 'data'. So it goes through the array and when the internal iterator equals the 'end' iterator, it stops without. Am I missing something?
bktero Yes, you are missing the (inherited from C) fact, that pointer±integer scales the integer by sizeof(*pointer) before the addition.
Correct method:
#define ELEMS(a) (sizeof(a)/sizeof((a)[0]))
end=data+ELEMS(data);
Like the version in the video, this only works if data has not decayed from array to pointer, i.e. is not a function parameter.
You are absolutely write. My bad... I often write code like the one in the video but with byte arrays and it works in that case. But that's a special case. And I also std::array and it's size() member function.
I also misunterstood 'factor' in your sentence. I was thinking 'it is a going on step too far' but no, it is going a lot of steps too far.
Indeed. Embarrassing. In an effort to make some of the code more familiar to people with little C++ experience I decided to not use std::begin and std::end.
It should have just been written : std::count_if(std::begin(data), std::end(data) ...
What is meant with the remark about the use of header-only libraries? At ruclips.net/video/c9Xt6Me3mJ4/видео.htmlm
a library/code that you made to reuse but all of your code is just in one header file
boost sml is too expert for me
Regarding getting c developers to switch to c++, check this blog.kareldonk.com/convincing-c-programmers-to-switch-to-c-a-look-at-human-thinking-behavior/
58:30 i would clap as well :)
1:30:37 rare noticed truth
for this kind of bare metal system, you should just try D or Rust, those two just works better than cpp.
Can you also give some good solide arguments for that? rather then just say "works better" but actually give arguments why?