Quantum Leaps, LLC
Quantum Leaps, LLC
  • 75
  • 3 408 638
#51 Traceable Documentation with Doxygen & Spexygen
This lesson explains how to create traceable formal specifications, such as requirements, architecture, design, and many others, mandated by functional safety standards. The lesson starts with explaining the critical requirement for traceability, as mandated in the IEC 61508 standard. You learn how to use the Doxygen source code documentation system. Finally, you see the Doxygen extension, called Spexygen, which allows you to automate the creation of bidirectionally traceable documentation.
End Notes:
----------
Companion web page to this video course
www.state-machine.com/video-course/
Project download for this lesson:
www.state-machine.com/course/lesson-51.zip
GitHub repository for projects for this video course:
github.com/QuantumLeaps/modern-embedded-programming-course
Transcript of this lesson:
www.state-machine.com/course/lesson-51.txt
Referenced software:
--------------------
Doxygen - Code Documentation. Automated.
doxygen.nl
Spexygen - Traceable specifications based on Doxygen
github.com/QuantumLeaps/spexygen
Music credits:
--------------
The background music comes from:
www.bensound.com/royalty-free-music/track/straight
zhlédnutí: 2 007

Video

Using QP/Spy Software Tracing with STM32Cube IDE
zhlédnutí 1,2KPřed 2 měsíci
This video shows how to build a QP application with the QP/Spy software tracing system using the STM32Cube IDE. This will allow you to trace, troubleshoot, optimize, and monitor your QP applications. QP/Spy tracing is also a cornerstone of testing event-driven QP applications. This video is a continuation of our previous one, where we explored using the QP framework with STM32Cube IDE. Links to...
Using QP Framework with STM32 Cube IDE
zhlédnutí 1,9KPřed 2 měsíci
This video shows how to use the QP real-time embedded framework with the STM32Cube IDE. This will allow you to apply modern embedded programming with active objects, hierarchical state machines, modeling, and powerful software tracing in this popular STM32 development environment. Links to resources: - QuantumLeaps on GitHub: github.com/QuantumLeaps - cmsis-packs repo: github.com/QuantumLeaps/c...
#50 To block or NOT to block, that is the question!
zhlédnutí 3,1KPřed 5 měsíci
"To block or not to block?" is the single, most fundamental question determining the architecture of your embedded software. In fact, the issue of blocking is the most important discussion we can have in embedded programming, even though many embedded developers don't realize that. A traditional blocking RTOS is still the dominant approach, but this is changing. There is much more innovation in...
#49 Embedded Unit Testing #embedded_systems #embeddedsoftware #testing
zhlédnutí 10KPřed 8 měsíci
This is the first lesson about embedded software testing and its central role in software development. You will also see some ways of testing embedded software on the host computer and embedded targets and how to obtain the necessary tools. Contents with Timestamps: 🕑 0:45 Evolutionary principles for creating complex systems 🕑 2:00 On the Origin of Software by Artificial Selection :-) 🕑 3:00 Wa...
#0 Modern Embedded Systems Programming: Getting Started
zhlédnutí 112KPřed 10 měsíci
This is an updated version of "lesson-zero" of the "Modern Embedded Systems Programming" video course. The updates include new development toolsets, new structure of the code projects, and new resources for the course. Timeline: 🕑 0:07 *Introduction:* In this course, you'll learn how to program embedded microcontrollers the modern way, from the basics all the way to the contemporary modern embe...
Super-Simple Tasker -- The Hardware RTOS for ARM Cortex-M, Part-2
zhlédnutí 5KPřed rokem
Super-Simple Tasker (SST) is a preemptive, priority-based RTOS kernel fully compatible with Rate Monotonic Analysis/Scheduling (RMA/RMS). It was initially published in 2006. This video presents a unique hardware implementation of a modern version of SST for ARM Cortex-M (M0, M0 , M3, M4, M7, etc.). This is Part-2 of the talk delivered at Embedded Online Conference 2023, see: embeddedonlineconfe...
Super-Simple Tasker -- The Hardware RTOS for ARM Cortex-M, Part-1
zhlédnutí 10KPřed rokem
Super-Simple Tasker (SST) is a preemptive, priority-based RTOS kernel fully compatible with Rate Monotonic Analysis/Scheduling (RMA/RMS). It was initially published in 2006. This video presents a unique hardware implementation of a modern version of SST for ARM Cortex-M (M0, M0 , M3, M4, M7, etc.). This is Part-1 of the talk delivered at Embedded Online Conference 2023, see: embeddedonlineconfe...
#48 Assertions and Design by Contract, Part-2
zhlédnutí 5KPřed rokem
In this second lesson about assertions and Design by Contract (DBC), you'll see how to practically apply them in embedded systems. Contents with Timestamps: 0:45 Agenda for the previous Part-1 and today's Part-2 1:00 Embedding assertions (the qassert.h header file) 1:45 qassert.h code review (using Doxygen documentation) 2:35 Q_ASSERT_ID() macro implementation 3:53 Q_ASSERT_ID() macro use 4:34 ...
#47 Assertions and Design by Contract, Part-1
zhlédnutí 6KPřed rokem
In this lesson, you'll learn about software assertions and, more formally, the Design by Contract methodology in the context of embedded programming. This is part-1 of the two-part series on this subject. Contents with Timestamps: 1:25 What are software assertions? 1:46 Standard assertions in C 3:07 Demonstration of standard assertions on a desktop 4:37 Disabling standard assertions 5:49 Softwa...
#46 Software Tracing with Binary Protocols
zhlédnutí 9KPřed rokem
This lesson explains modern software tracing based on binary protocols instead of ASCII formatting with printf. To focus the discussion, you will see a mature software tracing system called QP-Spy, which is much more suitable for real-time systems than the primitive printf method. Contents with Timestamps: 1:25 The main problems of printf-style tracing 1:50 Firefighter analogy of printf-style t...
#45 Software Tracing with printf
zhlédnutí 12KPřed rokem
This lesson explains "debugging by printf" as the most common software tracing technique. You'll learn how to implement printf on the TivaC LaunchPad board, as well as NUCLEO-L152. You'll also explore some shortcomings of this primitive technique. Contents with Timestamps: 3:18 Adding printf tracing to the BSP code 4:25 Attempts to run and the hardcoded breakpoints 6:00 MicroLIB and the fputc()...
Channel Trailer
zhlédnutí 5KPřed 2 lety
The channel features in-depth videos explaining key aspects of modern embedded software. This trailer video shows fragments of a representative lesson "What is Real-Time Operating System (RTOS)" from the "Modern Embedded Systems Programming" video course.
Testing of Event-Driven Embedded Software with Python Part-2
zhlédnutí 4,5KPřed 2 lety
This is part-2 of the talk "Testing of Event-Driven Embedded Software with Python" that Miro Samek presented at the [Embedded Online Conference in May 2022](embeddedonlineconference.com/session/Testing_of_Event_Driven_Embedded_Software_with_Python) NOTE: All code presented in this video is available on GitHub in the qpc repository: github.com/QuantumLeaps/qpc/tree/master/examples/qutest The vid...
Testing of Event-Driven Embedded Software with Python Part-1
zhlédnutí 12KPřed 2 lety
This is part-1 of the talk "Testing of Event-Driven Embedded Software with Python" that Miro Samek presented at the [Embedded Online Conference in May 2022](embeddedonlineconference.com/session/Testing_of_Event_Driven_Embedded_Software_with_Python) This part starts with the general strategy for testing event-driven software. Next, at 5:35, you'll get a clear explanation of the traditional appro...
Hierarchical State Machines Persevere on Mars
zhlédnutí 4,5KPřed 2 lety
Hierarchical State Machines Persevere on Mars
Hierarchical State Machines Persevere on Mars
zhlédnutí 3,5KPřed 2 lety
Hierarchical State Machines Persevere on Mars
#44 Active Objects in Real-Time Part-2: Mutable Events
zhlédnutí 18KPřed 2 lety
#44 Active Objects in Real-Time Part-2: Mutable Events
#43 Active Objects in Real-Time Part-1: Run-to-Completion and RMS/RMA
zhlédnutí 12KPřed 2 lety
#43 Active Objects in Real-Time Part-1: Run-to-Completion and RMS/RMA
#42 State Machines Part-8: Semantics of Hierarchical State Machines
zhlédnutí 17KPřed 2 lety
#42 State Machines Part-8: Semantics of Hierarchical State Machines
Active Objects, Hierarchical State Machines and Modeling in Practice
zhlédnutí 9KPřed 2 lety
Active Objects, Hierarchical State Machines and Modeling in Practice
#41 State Machines Part-7:Automatic Code Generation
zhlédnutí 11KPřed 2 lety
#41 State Machines Part-7:Automatic Code Generation
#40 State Machines Part-6: What is a Hierarchical State Machine?
zhlédnutí 23KPřed 3 lety
#40 State Machines Part-6: What is a Hierarchical State Machine?
#39 State Machines Part-5: Optimal Implementation in C
zhlédnutí 23KPřed 3 lety
#39 State Machines Part-5: Optimal Implementation in C
Modern Arduino Programming with QP and QM
zhlédnutí 8KPřed 3 lety
Modern Arduino Programming with QP and QM
#38 State Machines Part-4: State Tables and Entry/Exit Actions
zhlédnutí 13KPřed 3 lety
#38 State Machines Part-4: State Tables and Entry/Exit Actions
Why Attend Embedded Online Conference?
zhlédnutí 2KPřed 3 lety
Why Attend Embedded Online Conference?
#37 State Machines Part-3: Input-Driven State Machines
zhlédnutí 16KPřed 3 lety
#37 State Machines Part-3: Input-Driven State Machines
#36 State Machines Part-2: Guard conditions
zhlédnutí 15KPřed 3 lety
#36 State Machines Part-2: Guard conditions
#35 State Machines Part-1: What is a state machine?
zhlédnutí 47KPřed 3 lety
#35 State Machines Part-1: What is a state machine?

Komentáře

  • @GlennZamudio
    @GlennZamudio Před dnem

    Gonzalez Sharon Anderson Scott White Jose

  • @PyJu80
    @PyJu80 Před 2 dny

    Can I use either my Pi 4b, Arduino UNO or Node MCU, this I also have an ESP whatever its called...

    • @StateMachineCOM
      @StateMachineCOM Před 2 dny

      The question "Can I use XYZ board for this course?" is by far the most frequently asked in this course. The answer is NO. To follow along and benefit the most, you need to use one of the supported boards. This strong hardware dependence is precisely the very nature of embedded systems. Embedded software runs on a specific CPU and controls a specific set of peripherals (input/output pins, timers, communication, etc.) Please just watch a few lessons of this course to get a feel of what's all about. --MMS

    • @PyJu80
      @PyJu80 Před dnem

      @@StateMachineCOM no problem, I will buy one anyway. Do you need the red one or white or both, sorry I was confused. Also, I get this sometimes, when speak say 'coding language' we use certain terminologies which we personally take for granted. However when talking to a total noob, its best to try to not use those terms, and simplify it a little. Like buy the red one, plug it it, then follow..... Sorry, its just I want to continue the course and get a cert, just the terms are overwhelming in the beginning. Love your content though and will stick with it till the end.

  • @gc7655
    @gc7655 Před 2 dny

    Thanks for your exceptional work on this. I have a question that I don't know what is the right way to make a proper transition to the non-blocking paradigm or event-driven programming. If I have three active objects created and each one is linked to a hardware resource for example AO1-Battery Monitor IC, AO2-Actuators, AO3-Battery Charger IC. Of course no active object can access the hardware resource of another active object directly the only way is through events between one active object and another. But it turns out that the hardware resources of each active object are connected to the same I2C bus despite being seen independently in the end they share the same resource which is the I2C bus traditionally a mechanism like the mutex would be used to prevent access but this would cause a temporary block How should this problem be addressed from your experience?

    • @StateMachineCOM
      @StateMachineCOM Před 2 dny

      Indeed, the traditional RTOS solution for a shared resource like the I2C bus would be to protect it with a mutex. Unfortunately, this sweeps a lot of problems under the rug. Among others, the behavior of all contending threads (BatteryMonitor, Actuators, BatteryCharger) is no longer "real-time" in the sense that it is impossible to analyze (e.g., with RMS/RMA method). I2C is not particularly fast, so the mutex might be blocking for a very long time. The non-blocking event-driven approach forces you to confront such implicit coupling directly. One option would be to create a dedicated I2C_Broker AO, which would encapsulate the I2C bus so that all other AOs would post events to the I2C_Broker. The I2C_Broker then can resolve any potential conflicts around the shared resource but must be careful to process the incoming events quickly so that its event queue and event pools don't overflow. Here, the "Deferred Event pattern" is quite useful (please google for it). Another option would be to create only one AO that would encapsulate the I2C bus and contain other functionality (BatteryMonitor, Actuators, BatteryCharger) as the "Orthogonal Component pattern" (again, please google for it). With this design, you acknowledge that an AO is really a real-time priority level. Since all the components are only as "real-time" as the I2C bus allows, they all should run at the same priority as assigning different priorities doesn't help in "real-time".

  • @hamzaaslam1999
    @hamzaaslam1999 Před 3 dny

    The background music was cool why you have removed that ? :(

  • @JorgeButler-k4q
    @JorgeButler-k4q Před 3 dny

    White Richard Wilson Matthew Brown John

  • @JulianMeredith-q9p
    @JulianMeredith-q9p Před 3 dny

    Jones Joseph Moore Michael Moore Shirley

  • @hamzaaslam1999
    @hamzaaslam1999 Před 3 dny

    kindly tell what logic analyzer you used in testing your RTOS and what software

    • @StateMachineCOM
      @StateMachineCOM Před 3 dny

      Please visit the companion web page to this video course at www.state-machine.com/video-course . Among others, you can find there links to very inexpensive USB logic analyzers and free software. --MMS

  • @sanvimanikommukuri268

    excuse me sir ,,how to understand your codes 😔😔😔😔

  • @aubinpougnant8691
    @aubinpougnant8691 Před 7 dny

    Thanks for the awesome lesson. Wouldn't it be better to always use &r1.super rather than upcasting (Shape *)&r1 to prevent misalignement and/or allow MI ? If I have SI and MI in my project, it would look inconsistent to sometimes access super classes methods with upcasting or not. What would you consider best practice in this case ?

    • @StateMachineCOM
      @StateMachineCOM Před 6 dny

      The best practice is to avoid casting, so use something like &r1.super or &me->super. However, sometimes generic code (e.g., library code) must deal with deeper class hierarchies, where it's unknown whether you need &x1.super or perhaps &x1.super.super. In such a generic code, an explicit upcast is sometimes unavoidable. But in any case, no misalignment should happen as discussed at 7:15. Finally, you mention MI (Multiple Inheritance), which is an entirely different discussion. The simple method presented here obviously works only for Single Inheritance (SI) and does NOT work for MI. And since you ask for best practices, I recommend staying the hell out of MI and don't open that can of worms at all. --MMS

    • @aubinpougnant8691
      @aubinpougnant8691 Před 6 dny

      @@StateMachineCOM Thanks for the great recommandations !

  • @shivprakashyadav6906
    @shivprakashyadav6906 Před 23 dny

    What is the difference between LR and SP ? Please explain

    • @StateMachineCOM
      @StateMachineCOM Před 23 dny

      LR stands for "Link Register". At 6:15 you can see that the BL instruction saves the PC (Program Counter) into LR so that the function can return back to the place it was called from. SP stands for "Stack Pointer". It is explained at 7:45. You can also watch the next couple of lessons that explain the call stack and the SP in more detail. --MMS

    • @shivprakashyadav6906
      @shivprakashyadav6906 Před 23 dny

      @@StateMachineCOM Thanks

  • @FurahaBaraka
    @FurahaBaraka Před 24 dny

    HELLO! i did all the procedure by downloading the Stellaries driver, and then it's extension by also considering there path. i did this in windows 10 and windows 11pro but yet the stellaries is not there in selector of debugger in keil mdk.

    • @StateMachineCOM
      @StateMachineCOM Před 23 dny

      You need to download the Tiva/Stellaris Extension for KEIL Vision "MDK_Stellaris_ICDI_AddOn.exe" and then you need to install it (run the exe file). The download is available from the companion web page to this course at: www.state-machine.com/video-course

  • @hamzaaslam1999
    @hamzaaslam1999 Před 26 dny

    i wanted to support this page how? this knowledge isn't available anywhere

    • @StateMachineCOM
      @StateMachineCOM Před 26 dny

      I'm really glad to hear that you appreciate the course. This whole video channel does not use "monetization" to avoid wasting the viewer's time. The CZcams algorithm might be actually punishing such videos by limiting their exposure because they don't bring advertising revenue. Therefore, if you *really* want to help this channel and keep such content, please consider spreading the word about this course in the comments to other CZcams videos, in various embedded forums (e.g., www.reddit.com/r/embedded/ ), and by word of mouth. Thank youi! --MMS

  • @phile7420
    @phile7420 Před měsícem

    hell this one is hard

  • @Lanmind01
    @Lanmind01 Před měsícem

    Now What’s the next video in this series?

  • @kamilkrezoek3319
    @kamilkrezoek3319 Před měsícem

    I respect your work but I disagree with the title - there is nothing modern in using IAR or Keil in embedded systems these days. Using tools such as Make, Cmake or generally not being depended on specific properiaty software is the way to go. Do we even are able to build such project on CI when using keil uVision without some unnecessary work? For the bare metal embedded project all you need is GCC compiler, some makefile and code editor - let's spread this approach, and not introduce some dinosaur technology like keil uVision

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      The unique approach of this course is to step down to the machine level frequently and *show* you exactly what happens inside your embedded microcontroller (see the video description). For this teaching method, this course needs a robust, easy-to-use, single-step, source-level *debugger* that provides various views, such as disassembly view, CPU register view, stack view, memory view, watch view, etc. The free, command-line tools you mention are great, but they precisely lack a professional, visual *debugger*. A debugger has been also missing in platforms such as Arduino. The closest free and open tools to the requirements of this course are still Eclipse-based toolsets (e.g., STM32Cube) or VSCode extensions. The debugging in Eclipse is generally slow, not particularly reliable, and idiosyncratic ("Debug configurations"). VSCode extensions with OpenOCD are similar in nature and just not for beginners. If you know anything better, by all means, please share.

  • @zero2717
    @zero2717 Před měsícem

    8:19 Unless you BUY a certain version of Keil uVision, you don't receive a PSN. And without it, you can't request a license. And since you can no longer get a free trial of the IAR, these tutorials are pretty useless for a free-based user. I genuinely hope I'm wrong, in which case, please feel free to correct me, but up until now, I haven't found a solution.

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      Arm Keil MDK-Community Edition does NOT require a PSN "product serial number." The procedure for registering the "Community Edition" is described at www.keil.arm.com/mdk-community/ . "Community Edition" is adequate for all projects of this video course. In fact, all of them have been prepared and tested with an ARM Keil MDK-Community Edition. --MMS

    • @zero2717
      @zero2717 Před měsícem

      @@StateMachineCOM Entirely my fault then, truly sorry. Thank you very much for clarification!

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      @@zero2717 Quick update: As an exercise, I just performed an update of my Keil MDK-Community from version 5.39 to 5.40. The Keil website seems a bit messed up, reporting some "issues", but after some poking around, I landed at the website www.keil.com/demo/eval/arm.htm , where they have a short registration form, but then eventually they allow you to download the MDK540.exe installer (5.40 is the latest version at this time). I was able to successfully install 5.40, and my existing "Keil MDK Community (non-commercial free of charge)" license has survived. The tool seems to work correctly. --MMS

    • @zero2717
      @zero2717 Před měsícem

      @@StateMachineCOM Thank you very much! Seems like I had to do a little more digging, my fault.

  • @FurahaBaraka
    @FurahaBaraka Před měsícem

    i found debuggin error " i downloaded Tiva driver from site and still i can't get it in the selection of debugger "

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      There are two separate pieces of software here: (1) Tiva/Stellaris USB Drivers for Windows and (2) Tiva/Stellaris Extension for KEIL uVision. Both are available from the companion web page to this course at: www.state-machine.com/video-course#Resources . After downloading the Tiva/Stellaris Extension for KEIL, you need to *install* it also. --MMS

    • @hackingtoolstv675
      @hackingtoolstv675 Před 27 dny

      I install all of them but still when I'm trying to find Debuger in selection it's not yet there. ​@StateMachineCOM

    • @FurahaBaraka
      @FurahaBaraka Před 27 dny

      @@StateMachineCOM I DID ALL THE PROCEDURE AND STILL IS STILL NOT THERE

    • @hackingtoolstv675
      @hackingtoolstv675 Před 27 dny

      ​@@StateMachineCOMBut the procedure are the Same and I did them to a different laptop one which have windows 10 and other 11 pro but yet is same problem

    • @hackingtoolstv675
      @hackingtoolstv675 Před 27 dny

      Meaning I download Drivers and it's Extension.

  • @user-tw9oi7od9k
    @user-tw9oi7od9k Před měsícem

    What configurations would you need to use with the Logic Analyzer for the STM32?

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      The project download for lesson #27 has been updated to include project stm32c031-qxk-keil (STM32 NUCLEO-C031, QXK kernel, KEIL IDE). The download is located in the usual place: www.state-machine.com/course/lesson-27.zip --MMS

    • @user-tw9oi7od9k
      @user-tw9oi7od9k Před měsícem

      @@StateMachineCOM Thank you

  • @askinc102
    @askinc102 Před měsícem

    I still dont get why the assertion returned False. I it because the Button press thread preempted the current thread during Read-Modify-Write operation when it was executing moveby() function ??

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      The assertion shown in the video at 29:20 can fire for many reasons all related to the fact that the same object (s1) is *shared* between two concurrent threads (blinky1 and blink2). One such scenario is that blinky2 gets preempted by blinky1 inside the Shape::distance() operation. Specifically, consider preemption during the calculation of dx = x - other->x (after loading the first x into a register but before loading the other->x into a register). Then blinky1 will call s.moveby(7,8) and *change* the other->x. When blinky2 resumes, it will load other->x into a register and calculate a non-zero difference! Strictly speaking, this situation is called a "data race". But the main point is that such ticking bombs are in the code in spite of "encapsulating" the s1 object because C++ encapsulation (or Java encapsulation for that matter) don't encapsulate anything in terms of *concurrency*. --MMS

  • @bhavaysen754
    @bhavaysen754 Před měsícem

    @StateMachineCOM why you wrote the data at 0x400253FC? I checked in datasheet it says that the data register is at 0x40025000, offset : 0x000. Confused with this.

  • @justalightworker
    @justalightworker Před měsícem

    love you

  • @zahatikoff
    @zahatikoff Před měsícem

    God I wish my company _had_ documentation in the first place. My modules are amongst the few that are documented AT ALL

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      I realize that documentation is not a very "sexy" subject. However, the embedded software development industry is under increasing pressure to deliver safety-related products. In such cases, documentation is not negotiable. Moreover, it must comply with the applicable functional safety standards, and all of them require *traceability*. You can purchase complex and costly requirement management tools (or generally ALM tools, which generally don't include source code traceability), or you can try a free and open-source alternative (like Spexygen). --MMS

  • @wliterow
    @wliterow Před měsícem

    again thank you

  • @Bestcuriosity_1
    @Bestcuriosity_1 Před měsícem

    Sir respect and love from India

  • @bhavana6217
    @bhavana6217 Před měsícem

    How do I follow this course on my Mac ? 😭

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      I don't know. Maybe you could install Windows? Seriously, for better or worse, embedded community has chosen Windows as the primary host OS for embedded development. Therefore most tools (e.g., KEIL uVision, IAR, etc.) are available on Windows, so if you want to enter this market you should adapt to the established practices. Now, there are ways to do embedded development on Linux and macOS (e.g., VSCode + additions), but the installation is more advanced and not suitable for beginners. The tool installation issues already are the biggest problem as it is, please just check the comments in this video course. --MMS

  • @caleb7799
    @caleb7799 Před měsícem

    how about stop smacking your mouth. jesus christ

  • @StateMachineCOM
    @StateMachineCOM Před měsícem

    The code uploads for this lesson #23 as well as #24, #25, and #26 have been updated for the STM32 NUCLEO-C031. The updates were necessary because the STM32C031 is a Cortex-M0+ CPU, for which the provided assembly didn't compile (ARMv6-M architecture is limited compared to ARMv7-M like in Cortex-M4). The provided code now should compile for both ARMv6-M and ARMv7-M architectures. --MMS

  • @tylerhazleton4227
    @tylerhazleton4227 Před měsícem

    Hey brother, quick heads up Keil changed the directory structures around again, and I don't want any other students to get stuck banging their heads against this. They are now (I believe since 5.39) installing Keil into the user's appdata directory, so when I installed Keil and then installed the Stellaris ICDI it had to be installed into C:\Users\<user>\AppData\Local\Keil_v5 NOT C:\KeilV5 (this is the default I believe). This also is not in line with their instructions, their instructions say it should be able to be installed into C:\Users\<user>\AppData\Local\AddOns but that does not work on Windows 10 or 11 (tested each), only installing straight into that Keil_v5 directory in appdata seems to work. Thank you for the tutorials, I'll be sure to let you know of anything else I find along the way.

  • @Bits32
    @Bits32 Před měsícem

    Hi Miro, This looks incredibly useful. Thank you very much.

  • @larrypage6635
    @larrypage6635 Před měsícem

    Hi Miro! I'm a beginner in Embedded systems. Here I could understand that all the local values are pushed into stack also the return address but I am wondering where those instructions are all loaded? Inside RAM? if so how does the control flow changes to part which belongs to the function. Does the instructions are stored sequentially ? or it maintains the address of each function blocks? I'm messing up here a bit.

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      I recommend that you watch two more lessons (#9 and #10) about the functions and the call stack because this might clarify a lot of things for you. And also, you now have all the tools to investigate your questions yourself! Just open the debugger and single step through the instructions in disassembly right before the function call, inside the function, and after it returns. When you do this, you'll see that code is always in ROM (adresses staring with 0x0000xxxx on TivaC and close to 0x0800xxxx on STM32). Data, including the stack is in RAM (addresses starting with 0x2000xxxx). The instructions are stored sequentially, but there are branch instructions that change the flow of control. One of these branch instructions is function call BL <function-address-in-ROM>. The other branch is function return BX lr. Please watch them as you step through the code. --MMS

    • @larrypage6635
      @larrypage6635 Před měsícem

      @@StateMachineCOMThanks for replying back❤️ Thought to do so. Proceeding with lesson 9...

  • @Erkan-bv5nt
    @Erkan-bv5nt Před měsícem

    Excelllent!

  • @theesavior
    @theesavior Před měsícem

    Anyone know how to switch the call stack variables to binary in uVision?

  • @Erkan-bv5nt
    @Erkan-bv5nt Před měsícem

    All your videos are excellent!

  • @rommelvillon6811
    @rommelvillon6811 Před měsícem

    I tried commenting out " // SYSCTL_RCGCGPIO_R |= (1U << 5); " since we are using the AHB. It compiled without error or warning but it doesn't work anymore

  • @DYoshe
    @DYoshe Před měsícem

    For some reason the following software packs are missing from Keil and cannot be installed by the pack installer, I get error #541: ARM::CMSIS Keil::TM4C_DFP Also encounter similar problems with not finding the Stellaris ICDI option even after installing the extension.

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      I'm really not sure what's going on with your KEIL uVision installation. I've just double checked, and the CMSIS packs are available from the ARM webstie (see www.keil.arm.com/packs/ . For TivaC, please search for TM4C_DFP : www.keil.arm.com/packs/tm4c_dfp-keil/boards/ ). The ARM::CMSIS is available at ARM.CMSIS.6.1.0.pack . Regarding the Stellaris ICDI extension, it should also be still available at: www.state-machine.com/course/MDK_Stellaris_ICDI_AddOn.exe . In summary, it appears that your KEIL uVision installation seems to be broken. --MMS

    • @DYoshe
      @DYoshe Před měsícem

      @@StateMachineCOM Thank you for the reply, Miro. I will try these, thanks.

  • @SpaceSurferGod
    @SpaceSurferGod Před měsícem

    Thank you very much, this is indispensable. I have an interview coming up and this is really great!

  • @user-tw9oi7od9k
    @user-tw9oi7od9k Před měsícem

    How would this be done with the STM32?

    • @StateMachineCOM
      @StateMachineCOM Před měsícem

      This is precisely the subject of the *next* lesson "How interrupts work on ARM Cortex-M?". Please watch czcams.com/video/O0Z1D6p7J5A/video.htmlsi=ILDEFJRX6C3S_qAx

    • @user-tw9oi7od9k
      @user-tw9oi7od9k Před měsícem

      @@StateMachineCOM Thank you

  • @user-tw9oi7od9k
    @user-tw9oi7od9k Před 2 měsíci

    Can following this course with the STM32 still be applicable or recommended?

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      Yes, the STM32 NUCLEO-C031 can be used for this course. Specifically, most of the project downloads (see www.state-machine.com/quickstart ) now also include versions for the NUCLEO board. However, if you want to follow the lessons exactly as they are presented in the videos, the original TivaC LauchPad is also still available. --MMS

  • @jhanvisaraswat6976
    @jhanvisaraswat6976 Před 2 měsíci

    I knew how race conditions occur but looking at disassembly view gave a better perspective.. Sometimes its really hard to spot them or predict that the code will lead to race condition.. Cant really use locks and semaphore everywhere , so looking at disassembly is really a good idea..

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      That's precisely why I step down to the disassembly level. But the real lesson from this video should be to avoid *sharing* because sharing is at the root of all evil. And actually, the pure race conditions as shown here are just the tip of the iceberg. Even more common are various data races, where some complex data gets changed while preemption happens. After the preemption, the data is partially old and partially new (it's corrupted). Again, without sharing such a frequent problem wouldn't happen. --MMS

  • @rommelvillon6811
    @rommelvillon6811 Před 2 měsíci

    In your code example you use the address 0x20000002U, I tried changing the address to 0x40000002 and it didn't work. I ran it using a simulator. Are pointers limited to what they can access for protection?

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      The simulator applies address ranges that are typical for Cortex-M microcontrollers. Addresses starting from 0x2000000 are allocated to RAM. Addresses starting from 0x4000000 are typically used for external devices. Please see the Cortex-M memory model: developer.arm.com/documentation/dui0552/a/the-cortex-m3-processor/memory-model

  • @user-tw9oi7od9k
    @user-tw9oi7od9k Před 2 měsíci

    How could we see the startup code on the STM32?

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      This lesson #13 uses the standard startup code generated by KEIL uVision. To get this code, you need to open the provided project in KEIL uVision. The act of opening the project will cause the generation of additional directories in your project folder. Among others, you will get the RTE folder (Run-Time Environment). Inside this directory, you need to go to RTE\Device\STM32C031C6Tx. Deep inside there, KEIL has generated the startup file startup_stm32c031xx.s, which is in assembly (not in C), but you can study this file. In the subsequent lessons (#14 and higher), you will use the customized startup code written in C. Please watch the subsequent lessons. --MMS

    • @user-tw9oi7od9k
      @user-tw9oi7od9k Před 2 měsíci

      @@StateMachineCOM Thank you for the quick reply.

  • @mateoarv
    @mateoarv Před 2 měsíci

    First of all, thank you for the great content. I've been learning event-driven programming from your videos, and I'm convinced it's the better way to approach these systems. However, I've been having trouble trying to solve some "sequential" problems using this method. In particular, I tried implementing a driver for a GSM module that communicates through serial AT commands. The problem is that I found myself trying to model the solution in a sequential way. For example, let's say you need to configure the module and for that you need to send a series of N commands. Normally, I would've done something like this: send_cmd1(); wait_response(); // blocking send_cmd2(); wait_response(); // blocking ... My understanding is that to model this behavior in an event-driven way, one has to create a state machine in which each step is a state. The problem I encountered is that my state machines started to grow a lot and there was a lot of repetition. I'm pretty sure this can be done in a better way. What would your advice be for these kinds of scenarios where there are a lot of predefined sequential steps to achieve something?

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      Your experience is very common during the transition from sequential (the "intuitive" way) to event-driven ("backward!"). I assure you that the transition *is* worth it. Regarding the repetitions in the state machine, they reflect the nature of the problem. It's not like your sequential problem is not repetitious (just at it!) But the traditional "flat" state machines have also another class of repetitions, which can be eliminated by using *hierarchical* state machines. This course has several lessons about all sorts of state machines. Here is the playlist: czcams.com/play/PLPW8O6W-1chxym7TgIPV9k5E8YJtSBToI.html

  • @leohuang990
    @leohuang990 Před 2 měsíci

    Thanks for a great lecture! When I disassemble ARM Cortex-M firmware, they often have "Reset_Handler" in the IVT entry of "__iar_program_start" in this lecture. I guess it's due to different vendors or development kits.

  • @rockababy
    @rockababy Před 2 měsíci

    whenever I install the missing Stellaris ICDI in KEIL, it doesn't seem to add it to the debug tab

    • @ironmanatee5949
      @ironmanatee5949 Před měsícem

      Change the install directory to: C:\Users\<user>\AppData\Local\Keil_v5 or wherever you have Keil_v5 install located.

    • @rockababy
      @rockababy Před měsícem

      @@ironmanatee5949 Yeah, I figured it was this. I was working with three different directories, and I only tried two of them at first. Then I went back and tried the last one, and it worked.

  • @justinushartoyo2370
    @justinushartoyo2370 Před 2 měsíci

    EDIT: I got my project to work! In case anyone is having a similar issue, the fix is to modify the CLOCK_SETUP macro to 0 in the device system file: \RTE\Device\{device_name}\system_{device_name}.c Quantum Leaps left a comment inside the course file that this has to be done to allow debugging in Keil Simulator (bypass the default clock configuration). I located this issue by comparing the project folder I created with the course project folder using WinMerge. Hi, I was trying to recreate the KEIL lesson-01 from scratch, but I'm running into the following error when I start debugging: *error 65: access violation at 0x400FE070 : no 'write' permission* This error doesn't appear when I run the provided project. I've tried to reverse-engineer the project: - Create a new project and select TM4C123GH6PM device - Check CMSIS Core and Device Startup for Run-Time Environment - Add a main.c file to Source folder, and write the counter script - Check the 'Use Simulator' debug option - Build target (F7) Everything works so far, including a successful build. But then I ran into the error when I hit 'Start Debug Session'. Which project creation step did I miss? Thank you so much!

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      You're approaching it wrong. The most important fact to remember is that "in embedded programming, nothing works until everything works" ( I discuss this in the video czcams.com/video/kcpHuuEt1xs/video.htmlsi=NuerVMfiTBsExGxg ). Therefore, if your system doesn't work, you cannot make it work by tweaking it aimlessly. Even less chance has an outsider, like me, to diagnose your problems. Instead, you should take advantage of something that already works (the provided project). Then, you can *compare* it to your version and the differences will show you the problem. A good free differencing tool is essential. I use the free WinMerge tool (google for it). Please note that you *can* compare the uVision project files also (they are in XML). In the end, the purpose of this course is not to give you a fish, but to teach you how to fish. I hope you see my point. --MMS

    • @justinushartoyo2370
      @justinushartoyo2370 Před 2 měsíci

      @@StateMachineCOM thank you for the inputs. I was essentially doing the comparison between my file and the course download manually (comparing 2 windows) - didn't know something like winMerge exists, it's a game changer!

  • @MrTurtleAIDS
    @MrTurtleAIDS Před 2 měsíci

    Not sure if anyone else is having these issues. Currently have the c031c6, found the ref man, datasheet, usermanual, and some sort of schematics on google. I notice that none of them really have schematics like the like shown on the video for the Tiva, so I can't really find the ports needed for the led. I may just follow the course with the Tiva board since most of the comments / documentation seem to lean towards that for now.

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      If you wish to follow this course exactly as it was presented, TivaC LaunchPad is nice to have. However, the newer NUCLEO-C031C6 board should also be sufficient for this course. Regarding the schematics, a simplified version is available in the document "STM32 NUCLEO-C031C6 Board" available on the companion website: www.state-machine.com/video-course#STM32C031 . Also, the projects for the NUCLEO-C031C6 are available (such as for this lesson-04) so, you should be able to build and run them on your board: www.state-machine.com/course/lesson-04.zip . --MMS

  • @MrTurtleAIDS
    @MrTurtleAIDS Před 2 měsíci

    I wanted to follow along with IAR initially for the first few lessons, but they need an actual business email to get into the evaluation version, was it always like this?

    • @StateMachineCOM
      @StateMachineCOM Před 2 měsíci

      IAR Systems had been offering the free, size-limited "KickStart" version of their IAR toolset for decades. Only recently, the management of the company has changed and the free licensing of any kind has disappeared. Things were different when this video course was starting, but frankly, I don't blame IAR. There is just too much piracy and disregard for licensing. Everybody suffers because of this: both vendors and developers. --MMS

  • @BerthaProt
    @BerthaProt Před 2 měsíci

    Great video as always, big thanks

  • @Deepak9aagri
    @Deepak9aagri Před 2 měsíci

    You are doing great Job 😊

  • @e.bugajski
    @e.bugajski Před 2 měsíci

    Hi Miro! Nice to hear you again!