C pointers

February 12, 2021
C, programming

tags Programming Computer Science For understanding how pointers work, consider the following simplified memory layout. the memory address starts in 0x1 and goes up to address 0xA. The value row holds the current data stored in that memory cell. Address 0x1 holds a pointer to address 0x6, which in turn 0x6 holds the value s. Address 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA Value 0x6 s e d s \0 Variable name hostname hostname hostname + 1 hostname + 2 hostname + 3 hostname +4 . ...

Modeling C-based systems with UML

November 14, 2020
programming, C, methodologies

tags Software Engineering Methodologies Introduction # The Unified Modeling Language (UML) is used almost exclusively for Object Oriented Programming (OOP). Since embedded system design has become increasingly more complex, designers have been searching for new methodologies to manage these complexities and allowing higher productivity. Due to the exclusivity of UML for OOP, it makes it difficult for functional programmers to integrate UML concepts into the modeling because the transformation of many UML concepts to C is difficult and confusing (Wang 2009). ...

C programming

May 31, 2020
C, programming

Tags Computer Science Programming C project architecture guidelines # Functions exposed in the header are like public methods # Think of each module like a class. The functions you expose in the header are like public methods. Only put a function in the header if it part of the module’s needed interface. Avoiding circular module dependencies # Avoid circular module dependencies. Module A and module B should not call each other. ...

Understanding key concepts before writing a Kernel

May 3, 2020
blog, kernel
C, riscv

In this series of posts, I intend to document my re-go on writing a small, portable kernel for the RISC-V architecture. I developed a micro-kernel for the RISC-V ISA in my bachelor thesis, however, due to the time it takes on developing a kernel, and the time I had on writing a bachelor’s thesis, I choose on writing the kernel for the Sifive’s HiFive1 Rev B development board due to their well written bare metal compatibility Library for the board, low cost and most importantly, RISC-V. ...