[Project: Embedded] Hands On RTOS with MCU’s Part 2

Part 2:

Part 2 will continues where part 1 left off.

See part 1 here: [Project: Embedded] Hands On RTOS with MCU’s Part 1

The focus will be on ‘Ozone’ a debugging software that is used after firmware is built. The dev hardware also needs to be connected to the computer for debugging for ‘Ozone’ to work. ‘Ozone’ can play and stop the program execution and allows line by line stepping into current code. It takes in ‘.elf’ (Executable Linkable Format) file that provides cross-referencing with with source code to debug the RTOS. The ELF contains enough info to program the MCU and also contains the links in the source code which is useful for debugging. There is another file that is already working behind the scenes called ‘.svd’ that is used to map registers and descriptions to the memory map of MCU. This can provide insights to i/o and more. ‘Ozone’ will use the SVD to visually map components on the MCU.

The step-by-step:

  1. Copy Repo address here: https://github.com/csalinasonline/Hands-On-RTOS-with-Microcontrollers.git, note this is different from part 1 because the Repo has changed. The original Repo was forked.
  2. Make directory ‘C:\projects’
C:\> cd C:\
C:\> mkdir projects
  1. Change directory to ‘projects’
C:\> cd projects
  1. Clone repo: git clone https://github.com/csalinasonline/Hands-On-RTOS-with-Microcontrollers.git
C:\projects> git clone https://github.com/csalinasonline/Hands-On-RTOS-with-Microcontrollers.git
  1. Open Application ‘STM32CubeIDE’
  2. Save to some workspace (not too critical where)…
  3. Go to File->Import
  4. Go to General->Existing Projects into Workspace
  5. Open and browse to ‘C:\projects…’ then click ‘Next’
  6. Right click on project RTOS_Example_1->properties
  7. Go to Resource->Linked Resources and click on ‘Linked Resources’ tab
  8. Resolve paths… and ‘Apply and Close’
  9. Right click on project RTOS_Example_1->Index->Rebuild
  10. Right click on project RTOS_Example_1->Build Project
  11. Open ‘Ozone’ and ‘Open Existing Project’ and select *.jdebug’ to load project
  12. Press the ‘power’ button to activate session, press ‘play’ to run. Note continue with prompts if asked.
  13. Press the ‘pause’ button to pause session.
  14. If possible go back into ‘STM32CubeIDE’ and observe the ‘main_taskCreation’. Notice the timing for each output.
  15. Notice the logic analyzer and periods of the generated outputs and how the code timings match closely.
  16. Also checkout the hardware hookup to scope signals.
  17. The schematic shows the pins which need to be hooked up too.
  18. DONE!

Then follow the illustrations (click to see full):


Discover more from deepHomeBrew

Subscribe now to keep reading and get access to the full archive.

Continue reading