CWCC is a lightweight C compiler designed for audr32 following acwj. CWCC supports a reasonable subset of C and can compile most programs for audr32.
Running make in the root of the repo will build audr32-cwcc and install to your ~/.local/bin/ directory, whilst also installing the standard headers to /tmp/include/ (will definitely change in the future, probably take the GCC approach by embedding headers into the ~/.local/audr32-cwcc/include/ directory or something) so take caution to rebuild whenever /tmp/ will end up cleared (reboots, etc.).
Run make clean; bear -- make to build the compile_commands.json for clangd in the root of the repo.
-vtoggle verbose-Sgenerate assembly output only-Tdump AST tree-Mdump symbols-o outselect the output file for executable-b offsetselect the base offset (relocating)-s sizebase size for output binary-a fileadd an assembly file to the list of files to compile against
Kernels and other binaries that require offsetting as they're loaded at different locations other than the default 0x40330000 (ROM) require compilation whilst passing in the -b option with a required base offset argument in hexadecimal.
Example: audr32-cwcc -b 330000 -o ramstart.bin ramstart.c (Compile C file so that it will act like everything is loaded at 0x00330000 (RAMSTART))
CWCC is licensed under the MIT license. As such the code is free to use in commercial, private and public use as long as credit to the contributors and the original MIT license is preserved.