Commit Graph

82 Commits

Author SHA1 Message Date
GC2020
f633d11b63 examples/pipe:removes useless data from test cases 2024-04-10 23:12:10 +08:00
wurui3
4981dbe32b apps/examples/pipe:can't print info to screen after calling redirect_test func.
reason:stdin/stdout was redirected and closed in redirect_test.c.
measures:change all printf() to fprint(stderr,...) in pipe_main.c,
and modify fflush(stdout) to fflush(stderr) in line 231.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
2023-08-30 13:56:33 +08:00
xuxin19
32b417a8f7 cmake:refine cmake build for apps/examples
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-17 01:15:17 +08:00
chao an
4d79a5cbaf add initial cmake build system
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
Tiago Medicci Serrano
0a9b983e90 apps/examples/pipe: check POSIX-compliant behavior of NuttX's FIFOs
Adjust the test considering the POSIX-compliant behavior of the
NuttX's FIFO (mkfifo), which should block `open` for read-only
and write-only. This test's result is expected to be the same with
any other POSIX-compliant system.

This commit also:

 * Fix redirect test;
 * Use pthread instead `task_create` to be able to run this test
on POSIX-compliant systems;
 * General fixes regarding formatting and error messages;
2023-04-22 01:28:25 +08:00
Gustavo Henrique Nihei
efb4e0bc91 Add another batch of missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
ligd
9fcb58fb8a pipe: fix pipe test case failed
pipe shouldn't use /tmp folder, /tmp maybe mounted to tmpfs

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 23:39:12 +08:00
Xiang Xiao
b659f0fbdf Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
nietingting
6e3b402cf4 examples: clean warning of pipe
transfer_test.c:66:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_writer':
transfer_test.c:122:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_test':
transfer_test.c:169:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&readerid, NULL, transfer_reader, (pthread_addr_t)fdin);
                                                          ^
transfer_test.c:179:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&writerid, NULL, transfer_writer, (pthread_addr_t)fdout);
                                                          ^
transfer_test.c:202:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       ret = (int)value;
             ^
transfer_test.c:216:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       tmp = (int)value;
             ^

Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-11 19:49:45 +08:00
Petro Karashchenko
9480c0ec12 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 17:36:21 +08:00
Jiuzhu Dong
7d457b4d0b pipe: modify default stack size to fix stack overflow
Change-Id: I16910ff216db6b915d7c1cc4084c0b79228769a5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-12 20:27:39 -07:00
Alin Jerpelea
2ac8589a25 examples: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
6bc7a448de examples: author: Gregory Nutt: update licenses to Apache
Gregory Nutt is has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-15 05:16:58 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05: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
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
YAMAMOTO Takashi
c304624fab Replace "STACKSIZE = 2048" with CONFIG_DEFAULT_TASK_SIZE
For now, I left the following instances because it isn't
clear to me why they are using the different values.
Maybe they need one-by-one inspection.

    examples/igmp/Makefile:STACKSIZE = 1024
    examples/powerled/Makefile:STACKSIZE = 1024
    examples/powermonitor/Makefile:STACKSIZE = 768
    examples/relays/Makefile:STACKSIZE = 512
    examples/smps/Makefile:STACKSIZE = 1024
    graphics/screenshot/Makefile:STACKSIZE = 4096
    system/flash_eraseall/Makefile:STACKSIZE = 1024
    testing/cxxtest/Makefile:STACKSIZE = 4096
    testing/smart_test/Makefile:STACKSIZE = 4096
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08: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
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
Gregory Nutt
4a140f70d0 apps/examples/pipes: Fix some kruft left in last commit; Also clean up some coding standard problems. 2017-11-29 15:27:20 -06:00
Gregory Nutt
1956f66ee6 apps/examples/pipes: Eliminate some warnings. 2017-11-29 15:19:29 -06:00
Gregory Nutt
6624917285 Add some dependencies on new settings in apps/examples/pipe 2016-08-04 13:23:31 -06:00
Gregory Nutt
7d517413cb Things that use mkfifo() and pipe() depend on CONFIG_PIPES 2016-07-20 10:46:05 -06:00
Sebastien Lorquet
d2aa24ad88 Make sure that APPNAME is defined in all Makefiles that generate applications 2016-06-09 10:51:04 -06:00
Gregory Nutt
6125e9376e Standardize some naming in code section comments 2016-02-21 18:15:00 -06:00
Gregory Nutt
e9447c6058 Standardize nameing of the pre-processor definitiongs group header 2015-10-02 14:06:11 -06:00
Paul A. Patience
85a2cecb99 Simplify apps/ Makefiles by combining common logic into the Makefile fragment Application.mk 2015-09-05 15:13:03 -04:00
Gregory Nutt
d5b6949c9f Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:14:53 -06:00
Gregory Nutt
3e16e0a0f9 apps/examples: Modify/simpify apps/examples build files. From Roman Saveljev. 2015-05-06 08:19:54 -06:00
Gregory Nutt
045c01c7b3 More fixes to issues noted by cppcheck 2014-11-25 11:45:00 -06:00
Gregory Nutt
0a4258db6d MAINOBJ needs to be added to object list in many Makefile 2014-09-11 06:48:11 -06:00
Gregory Nutt
4f14d3b8c4 Changes to many Makefiles. For kernel buil object containing main cannot go into library because of name collisions. The object file must be handled as a special case in every Makefile 2014-09-07 08:43:01 -06:00
Gregory Nutt
043d6898db Determine the main object name from the main source name in every kernel build Makefile 2014-09-07 07:19:19 -06:00
Gregory Nutt
2881b73f3d Add an nm command after every kernel build link to show if there are any undefined symbols 2014-09-07 07:15:59 -06:00
Gregory Nutt
70765b94fc Add the main object to the list objects to link in every kernel build link command 2014-09-07 07:12:55 -06:00
Gregory Nutt
22720d5eb3 Add the main object to the dependencies for the kernel build 2014-09-07 07:09:22 -06:00
Gregory Nutt
b65500c289 If now a kernel build, then add the main object in with all of the rest 2014-09-07 07:05:54 -06:00
Gregory Nutt
22eb5d5c46 Update apps/examples/helloxx/Makefile 2014-09-07 06:59:30 -06:00
Gregory Nutt
181b75301f Customize the program name in the generic setup that was added to each makefile that installs a program 2014-09-06 13:30:44 -06:00