Programmiersprache C (C95, C99, C11, C18)

C99 Definition
NULL Pointer
C Programming/stdint.h

inttypes.h – fixed size integer types
stdint.h – integer types

Include

NULL stddef.h
size_t stddef.h
uint32_t stdint.h
stddef.h NULL, size_t
stdbool.h bool, true, false
stdint.h uint32_t
limits.h INT_MIN, UINT_MAX
inttypes.h PRId32, PRIx32

Varianten der Programmiersprache C

Präprozessor

C preprocessor

Stop on Preprocessor

Can gcc output C code after preprocessing?

$ gcc -E test.c

Concatenation

Concatenation

struct command
{
  char *name;
  void (*function) (void);
};

#define COMMAND(NAME)  { #NAME, NAME ## _command }

struct command commands[] =
{
  COMMAND (quit),
  COMMAND (help),
  …
};

/* === RESULT === */
struct command commands[] =
{
  { "quit", quit_command },
  { "help", help_command },
  …
};

Variadic macro __VA_ARGS__

Variadic Macros
Variadic macro

#define MYLOG(FormatLiteral, ...)  \
        fprintf (stderr, "%s(%u): " FormatLiteral "\n", \
        __FILE__, __LINE__, __VA_ARGS__)

Structs

struct (C programming language)

Struct initialization

Designated Initializer

Designated Initializers
Why does C++11 not support designated initializer lists as C99?

/* Forward declare a type "point" to be a struct. */
typedef struct point point;
/* Declare the struct with integer members x, y */
struct point {
   int    x;
   int    y;
};

/* Define a variable p of type point, and
   initialize its first two members in place */
point p = {
    1,
    2
};

/* Define a variable p of type point, an
   set members using designated  initializers*/
point p = { 
    .y = 2,
    .x = 1
};

Zephyr Project – Linux Foundation Project

Project Ressources – Videos
Zephyr: Thoughts and First Steps, Erich Styger @McuOnEclipse

Documentation

Zephyr Project Documentation
Getting Started Guide

Application Development – Building an Application
Application Development – Run an Application
LVGL

Boards

ESP32
STM32 Minimum Development Board (Blue Pill Board, Black Pill Board)
ST Nucleo F103RB
ST Nucleo F411RE
ST Nucleo G474RE

Device Tree

github.com/zephyrproject-rtos/zephyr/blob/master/dts/arm/st/g4/stm32g4.dtsi
github.com/zephyrproject-rtos/zephyr/blob/master/dts/arm/st/g4/stm32g474.dtsi

GoMCU

GoMCU – Zephyr
YouTube Playlist

Swedish Embedded Group

How To Learn Embedded Systems And Go From Idea To Product Using Hardware And Firmware Design In 12 Weeks Or Less

Java 3D OpenGL

com.jogamp.opengl (OpenGL 3.x?)
vs.
javax.media.opengl (OpenGL 2.x?)

LWJGL 3 vs JOGL

Processing – Advanced OpenGL

javax.media.opengl

Where can I find the package javax.media.opengl?
jogamp.org/deployment/jogamp-current/archive/

Maven

Javax Media OpenGL
JOGL Windows AMD64

LWJGL

LWJGL – Lightweight Java Game Library 3
github.com/LWJGL/lwjgl3, LWJGL is a Java library that enables cross-platform access to popular native APIs
github.com/LWJGLX/lwjgl3-awt, AWT support for LWJGL3

LWJGL3 based on GLFW
GLFW
Wikipedia: GLFW, small C library that allows the creation and management of windows with OpenGL contexts (like FreeGLUT or SDL)

How to use OpenGL in JavaFX?
JFXGL, Glue code that allows you to use JavaFX in your OpenGL/LWJGL3 app.

JOGL

Java OpenGL (JOGL)
JogAmp

YouTube

JOGL

JavaWebAndMore

#23 Java und OpenGL Tutorial – culling und depth-test

LWJGL

GamesWithGabe

Coding a 2D Game Engine in Java

freeCodeCamp.org

Code a 2D Game Engine using Java – Full Course for Beginners
Code a 2D Game Engine using Java [Part 2]
github.com/codingminecraft/MarioYoutube/tree/master

ThinMatrix

OpenGL 3D Game Tutorial (02.08.2014)
Starting Work on my New Farming Game! (30.01.2022)
OpenGL 3D Game Tutorials (Playlist)

mr frozen97-OSG•noob

Java 3D game using LWJGL, OPENGL, OPENAL, e.t.c
github.com/mrfrozen97/Java-3D-game-engine-with-basic-game

Java Swing Custom Graphics

Java Programming Tutorial – Custom Graphics
Performing Custom Painting

yet another insignificant… programming notes

  • Before Getting Started…
  • IM1003/SP0058 Object-oriented Programming
  • IM2073 Web Programming
  • IM2073 Mobile Programming
  • How to Install & Get Started…
  • Android
  • Arduino
  • Power User Software Notes
  • ICPC
  • Java Programming – Part I
  • Power Programmers
  • Java Programming – Part II
  • Java Game Programming
  • Client-Side Programming
  • Database Programming
  • Server-side Programming
  • Webapps
  • Web Protocols
  • 3D Graphics & OpenGL
  • C/C++ Programming

Google Guava (Java Library)

  • RangeMap

Guide to Guava RangeMap
Guava & Java 8

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>santa</groupId>
    <artifactId>SantaJava</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>27.0.1-jre</version>
        </dependency>
    </dependencies>
</project>