Commit Graph

75 Commits

Author SHA1 Message Date
Matheus Catarino França
cdb04f6172 Zig hello-example
rename example - fix

confusion-rename fixed

zigflags added

rm zigflag single-threaded

zig rules added
2022-03-16 12:18:01 +08:00
Alin Jerpelea
0208f6469b apps: examples: Omni Hoverboards Inc. update licenses to Apache
Gregory Nutt has submitted the SGA
Omni Hoverboards Inc. has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Xiang Xiao
bc5d1165aa Replace cygpath with CONVERT_PATH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 16:08:10 +01:00
Piet
df6b892c4b apps: Enable Rust based application. 2022-02-19 17:59:13 +08:00
YAMAMOTO Takashi
09d778558c Application.mk: Link the compiler runtime for ELF modules
An alternative is to have symbols like __udivdi3 in
the symbol table explicitly when loading the module.
But I feel it's too cumbersome to maintain.
2022-02-04 04:05:44 +08:00
Ville Juven
d1bcd2977c Fix link error due to missing libapps.a in KERNEL build
The import target for kernel build now fails, due to setting libapps.a
as the default value for the BIN variable.

The fail happens when the ELFLD function passes the LDLIBS parameter
(which contains BIN / libapps.a) for the linker. There is no rule to
create libapps.a in the case of the kernel build, so the linker gives
an error due to it being missing.

This commit patches this behavior so that BIN is not appended to
LDLIBS. Another option would be to implement a dummy rule to create
libapps.a, but looking at the git history this is no longer wanted
behavior, thus the error is patched like this.
2021-12-29 06:54:36 -06:00
ligd
b72b4e4bad Application.mk: correct depends file generated
wrong: file.c => file.dir.o
right: file.c => file.c.dir.o

Change-Id: I5dff2c05c88d4c5d7678acdcce15e87caa23bdaf
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-12 17:52:10 -03:00
ligd
b831e1192e Application.mk: correct depends file generated
wrong: file.c => file.dir.o
right: file.c => file.c.dir.o

Change-Id: I5dff2c05c88d4c5d7678acdcce15e87caa23bdaf
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-06 07:03:03 -05:00
Xiang Xiao
9b7fe15bfb Generate c source code dependence with c compiler and flags
It's wrong to invoke the c++ compiler with c++ flags

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2536daa764275221ca530fd5abfc7568af921570
2021-07-06 07:03:03 -05:00
ligd
4f68f43cc2 apps/Application.mk: support compile same prefix file in one folder
example:
one folder has aa.s aa.c aa.cpp, then only compile one file.

fix:
add .s/S/c/cxx/cpp to $(SUFFIX)

Change-Id: I6dbc66dda2c10415a698513285313f59f7dda054
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-03 01:50:42 -05:00
Xiang Xiao
7e983490e8 build: Remove the redundant check from Applicaiton.mk
it's better to report error if user forget set PRIORITY or STACKSIZE

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-06 08:26:21 +01:00
Gustavo Henrique Nihei
a1df2c634f build: Fix deplist regeneration after config update 2021-03-25 10:23:33 +01:00
Xiang Xiao
d656982f7a build: Remove the null assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-24 18:38:04 +01:00
ligd
df389bc332 apps/Application.mk: fix compile assmbely error
Change-Id: Ia611ed0753dbfd861cc8f5e2bff71bc305a47657
2020-09-21 09:16:02 +02:00
dongjiuzhu
d635fcb2d8 application.mk: fix multi MAINSRC match suffix in single Makefile
Change-Id: I998defe7208e4f3a9ae6aede33c54297ee27bd5f
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-19 08:05:47 -07:00
ligd
3c4089ef30 apps/MAKE: Add register staging to context
context -> context
           register

Change-Id: Ief13064cd2faac31fbaf7140ae2e144d0881b2a1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-19 10:44:17 -03:00
Huang Qi
e5e3c36b35 build: Support both .s & .S files
Change-Id: I61d213f28e542d7a5df388312281b7601af2f86a
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-15 15:07:27 +08:00
Matias N
18137c0fec Fix: ensure archive files do not carry object files from prior builds
This is the corresponding change to the one on main NuttX repo. In this
case this involves splitting the build of libapps.a into: a) building
all applications (which is safely parallelizable), b) adding each
application's object files to the archive in turns (serial by nature).

This removes the need for the flock used to protect the parallel build.
2020-09-14 15:55:06 +08:00
SPRESENSE
63cd701958 Makefile: Unify ROOTDEPPATH into DEPPATH
DEPPATH is commonly used in nuttx repo, so it to be the same with them.
2020-07-29 15:22:20 +02:00
SPRESENSE
bc4b6a8894 Application.mk: Fix minor bugs
- Add .config to depend to update Make.dep by config changed
- Fix mkdep error in some Makefiles

Originally, ROOTDEPPATH should be used, but DEPPATH has been already
written in some Makefiles such as littlevgl and pdcur34. This commit
allows the description of DEPPATH instead of ROOTDEPPATH.
2020-07-29 15:22:20 +02:00
Ouss4
1dae12ba05 Don't run preconfig, clean or distclean when it's not necessary. 2020-07-25 07:50:28 -06:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
liuhaitao
dbfa8d5f13 Make programs under apps/bin executable to generate symtab file rightly
Make programs under apps/bin executable since tools/mksymtab.sh called with
'find $dir -type f -perm -a=x 2>/dev/null'. So generate symtab file rightly.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-06-26 14:20:13 +09:00
chao.an
4ae186d89a apps/makefile/implicit rules: completion the obj path
Change-Id: I2587a9e8de0852707fe6c775d487cc3a7849aef9
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-24 14:02:52 +01:00
liuhaitao
33c794ad60 Application.mk: update .depend dependency for SRCS with VPATH
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-25 08:13:33 -06:00
liuhaitao
b64d3533ba Application.mk: fix generated empty Make.dep for SRCS with VPATH
https://github.com/apache/incubator-nuttx-apps/pull/250 resulted in generated empty
Make.dep for SRCS with VPATH.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-21 13:22:13 +01:00
Xiang Xiao
d232823e63 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:37:24 -06:00
chao.an
224c4767fe apps: correct the program name to avoid invalid dependent targets
Change-Id: Iec6ca1b04a25afee16a4b600ee496620fec97577
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 09:51:09 -06:00
liuhaitao
0c60624276 Update make dependency for elf/module/nxflat/posix_spawn/sotest/thttpd
Update make dependency for elf/module/nxflat/posix_spawn/sotest/thttpd examples which make use of
mksymtab.sh. This could avoid them built twice in 'make depend' and 'make all' which would result
in file truncated build break. Now only build once by 'make all'.

Change-Id: I5d8f1ebbf73e3b12d7d2118f1f51b4233d0ed007
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-15 13:36:05 +08:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
f074d7f376 Makefile: let install depend on the target binary
to ensure the binary get built and install once
2020-03-22 22:42:13 +00:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Xiang Xiao
d614ee8efa
Strip the debug information if CONFIG_DEBUG_SYMBOLS isn't enable. 2020-03-22 14:46:58 +00:00
Xiang Xiao
f774e8ee72 build: Use flock to serialize ar steps as workaround
Use flock to serialize ar steps to avoid parallel build break
sometimes.
2020-02-22 07:43:06 -06:00
David Sidrane
119f81f30a Revert "Avoid calling ARCHIVE in multiple places"
This reverts commit 52222cb020.
2020-02-21 11:31:34 -06:00
YAMAMOTO Takashi
52222cb020 Avoid calling ARCHIVE in multiple places
Because it isn't safe to run multiple instances to libapps.a
concurrently.
2020-02-21 07:37:51 -06:00
YAMAMOTO Takashi
698f0edbaa Revert "build: Use flock to serialize ar steps as workaround"
This reverts commit 6707bfae86.
2020-02-21 07:37:51 -06:00
Xiang Xiao
6707bfae86 build: Use flock to serialize ar steps as workaround
Use flock to serialize ar steps to avoid parallel build break
sometimes.
2020-02-20 13:14:53 -06:00
patacongo
8e21be5223 apps/Application.mk: Fix path calculation. (#22)
The GNU make CURDIR will always be a POSIX-like path with forward slashes as path segment separators.  If we know that this is a native build, then we need to fix up the path so the DELIM will match the actual delimiter.
2020-01-17 23:44:46 +01:00
Xiang Xiao
6a65664ce4 Application.mk remove _main suffix from REGLIST
since the file generated by REGISTER macro don't have such suffix

Change-Id: I6814f5bd257563f897c63d9698f8892d9649dcef
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 21:44:57 +08:00
chao.an
e48a74f358 apps/Application.mk: Convert object names to guarantee uniqueness. 2019-12-13 08:27:45 -06:00
Xiang Xiao
1b2880ba46 apps/Application.mk: Fix main redefine warning by using per file CFLAGS/CXXFLAGS. 2019-10-19 12:49:56 -06:00
Xiang Xiao
75cd1dfd74 apps/: Move the common variable definitions from other build-related files into apps/Make.defs. 2019-10-17 11:40:39 -06:00
Xiang Xiao
c901181a39 Makefile, Application.mk: Clean up cygpath usage
1.Remove cygpath from the related path since the conversion isn't necessary
2.Call cygpath inplace for the absolute path to avoid the confusion
2019-10-07 02:55:44 -06:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Gregory Nutt
ddd5a18b0c Application.mk: Correct an error in PATH usage. Use of toolchain path causes make errors. 2019-10-04 09:53:53 -06:00
Xiang Xiao
4b49362719 apps/Makefile: Make libapps overwritable. 2019-10-03 14:07:17 -06:00
Xiang Xiao
1342426431 Application.mk: Support the ability to change the CFLAGS for the compilation of a single file. Set special compiler options as follows the rule:
sourcefile + fixed suffix "_[A|C|CPP|CXX]FLAGS"

apps/examples/hello/Makefile:
  $(SRCDIR)/hello_main.c_CFLAGS = -DTEST
2019-10-03 06:52:25 -06:00
Xiang Xiao
c73af9c3c8 apps/Makefile: Change BIN_DIR to BINDIR to follow nuttx style. 2019-10-01 11:43:40 -06:00
Chao An
c64ede319c apps/Applicatin.mk: Fixe some build issues. (1) Unable to found target 'context' when CONFIG_NSH_BUILTIN_APPS disabled. (2) Unable to generate multiple programs. 2018-09-12 06:09:20 -06:00