Posts

Showing posts with the label flashing

PX4 development - building, flashing and debugging with debugger (like a PRO)

Image
 This is the next tutorial that brings a bit more expertise into PX4 Autopilot debugging from an embedded software developer perspective. It will explain how to use J-Link debugger to debug PX4 Autopilot code in Eclipse IDE. If you didn't already see the previous tutorial, please go there, first phase of PREPARING is mandatory to be done so we can continue here. Link to previous tutorial: https://igor-misic.blogspot.com/2022/06/px4-development-building-flashing-and.html Everything in this tutorial is tested and reproduced at Kubuntu 22.04 LTS (It works the same for Ubuntu as well).

PX4 development - building, flashing and debugging without debugger (Arduino developers style)

Image
 This is a short tutorial that will explain how to build PX4 Autopilot, flash and debug it at the PX4 FMU (Flight Management Unit) without a debugger. Everything in this tutorial is tested and reproduced at Kubuntu 22.04 LTS (It works the same for Ubuntu as well). Preparation Let's start with cloning PX4 Autopilot > git clone https://github.com/PX4/PX4-Autopilot.git After the repository is cloned make sure you initialize all submodules. You would like to keep using this GIT commands when you jump between branches in PX4, otherwise, you can experience issues like missing modules while building. > cd PX4-Autopilot > git submodule sync > git submodule update --init --recursive And that is it we are almost ready to build our PX4 firmware. You need to know what board (FMU) you possess. Let's guess you have Pixracer. Pixracer is fmu-v4 board. Figure 1 - px4_fmu-v4 board source tree

Bootloader + Flashing App + Led blink example (opensource)

Image
Since almost every Embedded project needs a bootloader and application for flashing firmware, I've decided to open-source my solution. The idea is to have a universal bootloader for all microcontrollers and a single flasher application. Another idea is to have a flashing application that can run on all operating systems. This is where I open-sourced  IMBootloader ,  IMFlahser  together with the  IMLedBlink  example.  Let shortly explain them. IMBootloader Adapter functions For anyone who wants to port this bootloader, it needs to do it through adapter functions. The source file of adapter functions is here:  firmware_update_adapter.c Magic key IMBootlaoder is running at interrupt events from USB. In the beginning, it will check if firmware exists by checking the special part of flash and it will looking for the magic key. If the magic key exists bootloader will jump to the firmware. It is to keep booting time short as possible. If the magic key is not ...

Winbond NAND flash W25N01GV - problem while flashing one page multiple times

Image
 I run into a problem while using W25N01GV. Since I couldn't find an answer on the internet I contacted Winbond support. Here is my conversation so maybe it will help you as well.  Question 1  : Hi, I am using W25N01GV on different projects and recently I found a problem while writing multiple data on the same page. With command Load Program Data (02h) I am loading data to Data Buffer and then I store it to flash with Program Execute (10h). Each time I am writing to a different column address on the same page. After around 200 writes on the same page some old data seems to change, even I didn't write anything at their location. Any chances there is a limit to how much time could be one page used before erasing the whole block? or this could be a faulty sample of flash? Best regards, Igor Misic (2020-11-29 19:06:17) Answer 1  : Hi Igor: Thank you for contacting Winbond. About the SPI NAND flash, there are two limitation for page program operation. 1. There are 4 ...

Flashing/debugging/running code at external memory in the memory-mapped mode

Image
  STM32 microcontrollers have special capabilities running code directly from external flash. To make it possible STM32 made a special set of instructions called memory-mapped mode where the microcontroller is reading instructions from the external flash. Since to read data from an external flash can take some time there is QSPI protocol witch basically four wires used as SPI MISO (Master Input Slave Output) to make throughput 4x time faster than classical SPI.   Figure 1 - Illustration of STM32H750 connected to W25Q128JV