Skip to content

Commit adca64f

Browse files
authored
Add Makefile
1 parent 830fb4a commit adca64f

File tree

5 files changed

+81
-1
lines changed

5 files changed

+81
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.depend
2+
Make.dep
3+
*.o

Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# For a description of the syntax of this configuration file,
3+
# see the file kconfig-language.txt in the NuttX tools repository.
4+
#
5+
6+
menuconfig EXAMPLES_NSHTASK
7+
tristate "NSH Task Demo"
8+
default n
9+
---help---
10+
Enable NSH Task Demo
11+
12+
if EXAMPLES_NSHTASK
13+
14+
config EXAMPLES_NSHTASK_PRIORITY
15+
int "nshtask task priority"
16+
default 100
17+
18+
config EXAMPLES_NSHTASK_STACKSIZE
19+
int "nshtask stack size"
20+
default 16384
21+
22+
endif # EXAMPLES_NSHTASK

Make.defs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
############################################################################
2+
# apps/examples/nshtask/Make.defs
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership. The
7+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance with the
9+
# License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
# License for the specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
############################################################################
20+
21+
ifneq ($(CONFIG_EXAMPLES_NSHTASK),)
22+
CONFIGURED_APPS += $(APPDIR)/examples/nshtask
23+
endif

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
############################################################################
2+
# apps/examples/nshtask/Makefile
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership. The
7+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance with the
9+
# License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
# License for the specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
############################################################################
20+
21+
include $(APPDIR)/Make.defs
22+
23+
PROGNAME = nshtask
24+
PRIORITY = $(CONFIG_EXAMPLES_NSHTASK_PRIORITY)
25+
STACKSIZE = $(CONFIG_EXAMPLES_NSHTASK_STACKSIZE)
26+
MODULE = $(CONFIG_EXAMPLES_NSHTASK)
27+
28+
# LVGL Terminal
29+
30+
MAINSRC = nshtask.c
31+
32+
include $(APPDIR)/Application.mk

nshtask_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// How to create a NuttX Task for NSH Shell
2-
#include <nuttx/sched.h>
32
#include <stdio.h>
3+
#include <nuttx/sched.h>
44
#include "nshlib/nshlib.h"
55

66
int main(int argc, char *argv[])

0 commit comments

Comments
 (0)