Commit Graph

12 Commits

Author SHA1 Message Date
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
Petro Karashchenko 8d3bf05fd2 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea b5d4a01821 libs: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-03 18:52:53 -08:00
Gregory Nutt 2b5ff17a85 setlogmask(): Add comments
In include/syslog.h and libs/libc/syslog/lib_setlogmask.c, add comments indicating tht setlogmask() is not thread-safe.
2020-05-11 11:32:55 -04:00
Nakamura, Yuuichi 46baccb521 Remove unnecessary enter/leave_critical_section() in setlogmask() because it is MT-unsafe. 2020-05-11 08:06:29 -06:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao 948c566e39 libs/libc/syslog/lib_syslog.c: Bring back the commit 2e8eba35ff 'libs/libc/syslog/lib_syslog.c: Fix syslog crash on 64bit simulation'. This has more detailed information:
https://stackoverflow.com/questions/10807310/platform-inconsistencies-with-vsprintf-and-va-list.
2019-12-05 07:17:55 -06:00
Gregory Nutt 4e98980045 Add initial support for the MakerLisp eZ80 board. Ref: https://makerlisp.com/
Squashed commit of the following:

    configs/makerlisp:  Update comments about use of serial console.

    configs/makerlisp:  Add LED support, remove vestiges of button support (the board has no user buttons).  Add support for SPI-based MMC/SD card slot.

    arch/z80/src/ez80:  Fix some link problems.

    libs/libc/syslog/lib_syslog.c:  The ZDS-II toolchain does not declare va_coy in stdarg.h.  I think that the use of va_copy in vsyslog() is no necessary.

    configs/makerlisp:  Initial configuration directories cloned from ez80f910200zco with little more than naming changes.
2019-06-04 11:12:17 -06:00
Gregory Nutt 2dae0ef0db mm/mm_heap/mm_sem.c: Fix error that occurs when CONFIG_CPP_HAVE_VARARGS is not defined. In that case, the arguments to the debug macro will all be evaluated even though they are not used any variables that are references must at least be defined. 2019-06-03 09:02:55 -06:00
anchao 2e8eba35ff libs/libc/syslog/lib_syslog.c: Fix syslog crash on 64bit simulation. 2018-08-26 06:50:47 -06:00
Gregory Nutt cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00