Commit Graph

17 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
Michael Jung 0a37744826 Fix jlink-nuttx build with GCC 10.2
The packed-attribute on the tcb_info_s type was misplaced, which caused
incompatible memory layout between host and target.  According to
current GCC documentation:

> You may specify type attributes in an enum, struct or union type
> declaration or definition by placing them immediately after the struct,
> union or enum keyword.  You can also place them just past the closing
> curly brace of the definition, but this is less preferred because
> logically the type should be fully defined at the closing brace.

I also added jlink-nuttx.so to the .gitignore list and updated nxstyle
to ignore the camel case function names required by JLinkGDBServer.

Signed-off-by: Michael Jung <mijung@gmx.net>
2022-02-15 13:48:52 +01:00
Gregory Nutt 981734e577 tools/Makefile.host: Add incdir binary to Makefile.host
This was missed in PR 1148
2020-05-30 01:05:34 +01:00
Xiang Xiao dd61d3d9f9 build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Alin Jerpelea 338bc46f5e Merged in alinjerpelea/nuttx (pull request #1088)
add mkspk tool for cxd56 devices

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-03 22:17:31 +00:00
Alin Jerpelea a9be5eb6e7 Merged in alinjerpelea/nuttx (pull request #941)
Mastertools: add spk binary format and entry point for mpy

* tools: add spk binary format

    The .spk binary format is used on spresense and other boards
    based on the cxd56 arch.

    to enable this binary format please set in your config
    CONFIG_CXD56_BINARY=y

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* configs: spresense: buils nuttx.spk images

    Enable nuttx.spk binary image that can be flashed on spresense board.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* configs: spresense: add entry point for mpy

    The entry point is needed for the downstream projects based
    on spresense.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-08 12:38:21 +00:00
David Sidrane 6d0d712b9c tools/.gitignore: Ignore rmcr binary 2019-02-27 14:22:32 -06:00
David Sidrane 754b485ce9 tools/.gitignore: Ignore new tool binaries. 2019-01-24 06:58:26 -06:00
Alan Carvalho de Assis 69f32fb5c2 tools: Add gencromfs and logparsert to .gitignore 2018-05-26 09:53:26 -06:00
Alan Carvalho de Assis b1801f3fd3 tools: Add tools/initialconfig to .gitignore 2018-05-26 09:22:57 -06:00
Gregory Nutt 5da37ba164 Fix .gitignore 2016-01-15 13:40:52 -06:00
Gregory Nutt 8a3033643e Add cnvwindeps to .gitignore 2016-01-14 16:38:47 -06:00
Gregory Nutt 7e9f569ac6 Add build support for ELF modules. Useless at the moment because there is no x86 relocation logic 2014-08-25 06:09:09 -06:00
Gregory Nutt 4748599a43 .dSYM only needs to be in the same .gitignore files as .exe 2013-05-30 15:02:04 -06:00
Gregory Nutt 27e4bcdd0c Updated .gitignore files 2013-04-23 19:05:59 -06:00
Gregory Nutt db78b76102 Mostly updates and corrections to .gitignore files 2013-04-04 15:39:50 -06:00
Gregory Nutt 23db0682b7 Clone svn:ignore directory atributed to .gitignore files 2013-04-04 14:27:29 -06:00