C

C programming language

Standard Peripherals Library vs CMSIS vs HAL vs Low Level Library

Tags: ARM, C, Electronics, Embedded, Programming

The STM32 line of microcontrollers offer a bunch of features in a nice package at reasonable cost, something I like. What I don't like as much are the development libraries around it provided by ST. For this reason, most of the time I stick to writing code using the 'Cortex Microcontroller Software Interface Standard' (CMSIS) and the datasheet, and this works nicely but can be slow to develop. While it's still my personal favorite, I recently checked out the other options to see where things are going to do the prep work for some ports of older projects built using the 'Standard Peripherals Library' to newer processors such as the STM32L4.

 

Microcontroller

 

On Processes and Threads

Tags: C, Computer Architecture, Linux, Programming

Some time ago I followed an interesting discussion on a board where people were discussing multi-core software development. During the course of the discussion it became apparent that there is a lot of confusion and misconceptions about a 'process' and a 'thread' as they exist on e.g., a Linux system. Both are applicable to make use of multi-core systems, but they do so in different ways. Even though the exact distinction while compared to early definitions of the terms has perhaps become somewhat blurred, the two remain separate entities which can complement each other perfectly. In this post I'm going to try and illustrate the similarities and differences, and show you some real life scenarios of both. Keep in mind that we will be making some generalizations - and there are lots of examples where these generalizations do not directly apply, or where there are other possible implementations of the cited examples. Going into these would turn this blog entry into an entire book...

Multiprocess

A Ray Tracer - Part 2

Tags: C, Graphics, Mathematics, Programming, Ray Tracing

Last time we build up the basics of the raytracer: some essential math and the corresponding function implementations and structures in the C programming language. We will expand the ray tracer this time to generate actual graphics and to generate these images with multiple spheres, light sources, and reflections.

Painter

A Ray Tracer - Part 1

Tags: C, Graphics, Mathematics, Programming, Ray Tracing

I've always been fascinated with computer graphics. One of the first things I learned to code when I was a kid was a ray tracer. It was a simple and straight-forward assembly implementation on an early home computer, but it taught me a lot about how computers deal with graphics and just programming in general and its connection to mathematics.

Raytrace Scene

C: Structs and Pointers

Tags: C, Programming

This blog entry covers parts of a recent C programming exam I held for my course C programming at VAMK. I know some of my students read this blog, so it might be of help to them, or anyone else interested in some more, dare I say, 'advanced' C stuff. It is by no means intended to be a complete tutorial, but it might provide a starting point for further study.

Syndicate content