[staging/branch]: CdePkg - C Development Environment Package

Minnow Ware

Hi UEFI community,


I’d like to introduce the CdePkg to edk2-staging.


The package is not yet completed but ready to demonstrate it’s power, probably also for modernFW.


A couple of years ago, after an UEFI BIOS project on AMD platform I decided to write my own ANSI C Library for UEFI Shell and POST.


My design goals were:

  1. to rewrite the whole thing from scratch, without using any public source code from GNU, BSD, Watcom or Intel EDK2 / tiano core
  2. completeness: full blown C90 + C95 support, no C99, no non-specified extensions at all , e.g. itoa(), stricmp()...
  3. small code size, for UEFI-POST-driver uses a C-Library-Driver, that contains core/worker functions for realloc() ==  malloc() and free(),

entire printf-family, entire scanf-family.

UEFI-POST-driver just uses small wrapper functions to run the C-Library-Driver code.

  1. stable, exact, chipset independent (w/o ACPI timer) "clock()” with CLOCKS_PER_SEC == 1000
  2. complete set of the Microsoft C-compiler intrinsic functions
  3. ROM-able! Runs with stack but w/o any static storage duration in .data segment, e.g. for rand(), strtok(), tmpfile()

This is required for early PEI before memory sizing, when PEI-images run directly out of flash.

  1. Microsoft bug compatible (as far as possible)
    1. to save my lifetime writing a documentation  https://github.com/JoaquinConoBolillo/torito-C-Library/blob/master/implemented.md
    2. use original Microsoft header files for UEFI Shell Apps created in VS2017/19
    3. “debug”-mode for UEFI Shell executable in VS2017/19, that truly runs on Windows (that works

when using library functions only, no HW access, not UEFI-API use) to debug the library

itself – but this just links the same .OBJ module with the WinNT-EntryPoint instead of UEFI-EntryPoint

(The entry point module pulls in the appropriate OS-interface branch dispatcher)

  1. all that in one single C-Library CdeLib.lib


The Readme.MD is here: https://github.com/MinnowWare/CdePkg#cdepkg


CdePkg shall be adjusted to other compilers/tool chains too, once it is feature complete and accepted by the UEFI community,

as long as it is for Microsoft VS2017/19 only.


The CdePkg is integrated into the “vUDK2018”-EDK2, which in turn runs in a MinnowBoard build.

It can be emulated in the Nt32Pkg, since EmulatorPkg in “vUDK2018” doesn’t support Windows…


I would like to move the “vUDK2018”-EDK2 to the edk2-staging branch CdePkg, but need to have access granted.


Can anyone kindly grant access rights to me?


Best Regards,




Join devel@edk2.groups.io to automatically receive all group messages.