Welcome to my thecnical blog

Welcome to my thecnical blog

Welcome to my thecnical blog

This blog is about technical stuff like: Linux, embedded, RT, algorithm, web, etc'


Using SVD file in GDB for Cortex-m debugging

Published at June 12, 2021 ·  2 min read

Using SVD files during debugging session of a cortex-m microcontroller allows easy access to system registers value. The SVD file is an XML file that contains the necessary information about the register’s name and address. Using SVD, the IDE can read the value of system registers and display it during the debugging session. I will show here how to use SVD during GDB debug session. Installation Download and install the following project from PyCortexMDebug....

301 Redirect of web site

Published at May 17, 2021 ·  1 min read

I had created a simple nodejs script to implement 301 redirects of a website. Three hundred-one (301) redirections are needed when a website name is changed. The old website should respond in a message like Moved Permanently. Redirecting to https:://new.web.addr . It is meant for the search engines to maintain the website credit. I have used heroku to host the script. Here is how to create a simple redirection service:...

Simple Tab Widget For Hugo Blog

Published at May 10, 2021 ·  2 min read

I have create a simple tab widget to use in my hugo based blog. It is based on JQuery Tab widget and simpple hugo shortcode templae. The code template is in the shotcodes/tab-widget. {{ $title := "tabe widget" }} {{ if .IsNamedParams }} {{ with .Get "title" }} {{ $title = . }} {{ end }} {{ else }} {{ with .Get 0 }} {{ $title = . }} {{ end }} {{ end }} <link rel = "stylesheet" href = "https://code....

Zephyr RTOS BringUp on stm32

Published at May 7, 2021 ·  7 min read

The Zephyr RTOS is one of the best around. It makes me feel like working on embedded Linux in the sense of device integration, code styling, device tree (DTS), CMake build systems and more. It has many build-in stacks for USB, networking, BLE, file system, boot loader, DFU, and more. Its API reaches and has partial POSIX support with a custom build system that makes tiny footprints. This post is a tutorial on bringing up for STM32 board with USB and USART interfaces....

Linux Gadget Device.

Published at January 19, 2021 ·  4 min read

This post is an example of making a USB device from a Linux embedded machine where any HOST can control it. From Linux documention: Most Linux developers will not be able to use this API since they have USB host hardware in a PC, workstation, or server. Linux users with embedded systems are more likely to have USB peripheral hardware. To distinguish drivers running inside such hardware from the more familiar Linux “USB device drivers,” which are host-side proxies for the real USB devices, a different term is used: the drivers inside the peripherals are “USB gadget drivers....

Install embedded Linux toolchain on windows

Published at November 25, 2020 ·  2 min read

The toolchain for embedded Linux should be matched for the target image, and that is why we can’t just find and download it from somewhere. Therefore, we should be it. This is a tutorial on how to build and install YOCTO SDK on a windows machine. This allows developing embedded Linux on windows using eclipse or even visual studio. Setup YOCTO build If you already have a YOCTO build, you need to make the following simple steps:...

Debugging of cypress psoc6 in Linux terminal.

Published at November 5, 2020 ·  3 min read

I have used OpenOCD in my embedded projects, and here is a simple explanation how to work with OpenOCD with PSOC6 of cypress and here. Cypress has its own porting for OpenOCD for its interfaces: kitprog3 & kitprog4. Usually, I work on a Linux terminal using a command line with cgdb but, OpenOCD is already installed on modus, the default IDE of cypress. The PSOC6 is dual-core MCU: CM0+ and CM4, and when booting, it first powers on the CM0+, and if the CM4 is also needed, the CM0+ has to power it on....

Simple OpenAMP application for stm32mp157

Published at October 25, 2020 ·  3 min read

The stm32mp157 is SOC from STMicroelectronics , and it has within it a dual-core Cortex-A7 MPU and Cortex-M4 MCU. The Cortex-A7 is the application processor that operates Linux, and the Cortex-m4 runs RTOS or bare-metal application. The Cortex-M4 can be used for real-time tasks, such as creating a periodic and accurate control signal without jitter. In this kind of application, the Cortex-aA7 will run the master application and control the application of the Cortex-m4 using RPMsg Messaging Protocol....

Compile Linux kernel for zynq

Published at October 17, 2020 ·  2 min read

In previous post I shoed how to build and install Linux system on microzed board. When one tries to modify the kernel & u-boot, it is better to build and test it separately outside the Yocto build. I use Yocto’s kernel & u-boot sources and its SDK for the custom build. build the kernel To enable SDK , just type the following command. . /opt/poky/3.0.3/environment-setup-cortexa9t2hf-neon-poky-linux-gnueabi This script will define a series of enviement variables like $CC & $CXX that needed for the build....

Eclipse with CMake project on windows

Published at September 12, 2020 ·  5 min read

CMake is a powerful tool to manage c/c++ projects, and I prefer to use it in on my embedded projects also. Usually, the MCU has some communication with other processors (usually PC), and CMake also allows easy integration between both projects: MCU and HOST. For example, a shared source code that simultaneously able to recompile in both processors when any change occurs in these shared files. Usually, I work in a Linux environment in the terminal where everything is installed correctly in its place, and things work great....