8000 zephyr: Initial Zephyr RTOS port, Zephyr part. · ptone/circuitpython@9d9efc0 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 9d9efc0

Browse files
committed
zephyr: Initial Zephyr RTOS port, Zephyr part.
1 parent cff9f02 commit 9d9efc0

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

zephyr/Kbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#subdir-ccflags-y += -I$(SOURCE_DIR)/../mylib/include
2+
3+
obj-y += src/

zephyr/Makefile.zephyr

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# Copyright (c) 2016 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
KERNEL_TYPE = nano
18+
# BOARD must be passed on command line from main Makefile
19+
#BOARD =
20+
CONF_FILE = prj.conf
21+
22+
#export SOURCE_DIR = $(ZEPHYR_BASE)/samples/static_lib/hello_world
23+
export LDFLAGS_zephyr += -L$(CURDIR)
24+
export ALL_LIBS += micropython
25+
26+
include ${ZEPHYR_BASE}/Makefile.inc

zephyr/prj.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_STDOUT_CONSOLE=y
2+
CONFIG_CONSOLE_HANDLER=y
3+
CONFIG_NEWLIB_LIBC=y
4+
CONFIG_FLOAT=y

zephyr/src/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2016 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
obj-y += zephyr_start.o zephyr_getchar.o

zephyr/src/zephyr_start.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <zephyr.h>
2+
#include "zephyr_getchar.h"
3+
4+
int real_main(void);
5+
6+
void main(void) {
7+
zephyr_getchar_init();
8+
real_main();
9+
}

0 commit comments

Comments
 (0)
0