Sunday, December 18, 2022

C11 (C standard revision) features

C11 revision

1 Overview

C11 is the informal name for ISO/IEC 9899:2011, the current standard for the C language that was ratified by ISO in December 2011.

It standardizes many features for safer programming, such as removal of gets() function.

Additionally, C11 adds concurrency support, type-generic expressions, alignment-related facilities, static assertion, unicode support, floating-point characteristic macros, no-return functions, anonymous structures and unions, and various bound-checking and reentrancy functions.

The following examples demonstrating C11 features can be compiled with options such as

clang -std=c11 ex.c

2 Multiple threading

C11 standardized multi-threading support.

It introduces new headers threads.h and stdatomic.h, supporting multiple threads of execution:

  • threads creation and management
  • mutexes
  • conditional variables
  • atomic objects
  • thread specific storage

Monday, December 12, 2022

STM32CubeIDE C++ the simplest example with cin and cout

Table of Contents

Refer to STM32CubeIDE Input/Output on STM32 Nucleo Board in advance for basics.

1 Create a new STM32 project

In STM32CubeIDE, create a new STM32 project.

In Setup STM32 project window, select C++ for the Targeted Language.


STM32CubeIDE Input/Output on STM32 Nucleo Board

Table of Contents

Step by step to use printf() and scanf() in STM32CubeIDE with Nucleo-L152RE board.

1 STM32CubeIDE installation

2 Create a new STM32 project

In STM32CubeIDE menu, click File | New | STM32 Project.