Midnight C
The Midnight C platform, often referred to in the past as the "Makefile", is a cross-platform method of compiling native C code for the VEX Cortex.
Last updated
Was this helpful?
The Midnight C platform, often referred to in the past as the "Makefile", is a cross-platform method of compiling native C code for the VEX Cortex.
Last updated
Was this helpful?
Midnight C is for the older VEX Cortex which is no longer supported
Features -
Not VEX-Supported
Native code compilation
32- and 64-bit types
Partial multitasking
Uses IDE
Interrupt control
Pointer and control
Purdue Robotics OS
The Midnight C platform, often referred to in the past as the "Makefile", is a cross-platform method of compiling native C code for the . It supplanted during VEX Gateway as the primary language for programming the Cortex. Initial versions used the EasyC runtime library to interface with VEX parts, making it fully compatible; the development of the Purdue Robotics OS brought a more powerful API compatible with a variety of existing environments.
Midnight C is compatible with Windows, Mac OS X, and Linux.
Firmware (Mastercode) reflashing for Midnight C is performed using the same procedure as reflashing EasyC firmware.
Uses the GNU GCC compiler for ARM
Can use any standard C syntax, library, data type, or function
Powerful, high-speed library implementation surpasses I/O and interrupt performance of even the EasyC library
Midnight-C IDE (based on the Eclipse IDE) handles routine compilation and upload tasks
Vast improvements in size and speed
Initial setup still needs work
Not supported by VEX
C++ support is also available; if a file is created with a .cpp extension, it will be compiled using arm-none-eabi-g++. The code used must have entry points from one of the built-in C files through a C++ function exposed via extern 'C' { ... }. Otherwise, any standard C++ construct or syntax can be used; the API header files have the appropriate declarations for use of the standard C functions. Beware of code size - while using C++ itself imposes only a small penalty, any function in the C++ standard library (e.g. new, std::) will often add 50-100 KB to the hex file.
Please note that object-oriented principles tend to encourage practices such as dynamic memory allocation and excessive indirection which may conflict with the embedded system goals of speed and program size. When possible, use C code.
Low-level access available to system registers, allowing the implementation of protocols such as or
(Purdue SIGBots)