Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
3da020ee
Commit
3da020ee
authored
Apr 11, 2018
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:rt: use framework config items via Kconfig
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
67957803
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
164 additions
and
72 deletions
+164
-72
Makefile
demos/alarm_clock/firmware/fw-01/Makefile
+0
-6
mt_defconfig
demos/alarm_clock/firmware/fw-01/configs/mt_defconfig
+4
-0
Kconfig
demos/data_generator/firmware/fw-01/Kconfig
+6
-0
Makefile
demos/data_generator/firmware/fw-01/Makefile
+0
-6
mt_defconfig
demos/data_generator/firmware/fw-01/configs/mt_defconfig
+17
-0
Kconfig
demos/hello_world/firmware/fw-01/Kconfig
+6
-0
Makefile
demos/hello_world/firmware/fw-01/Makefile
+0
-6
mt_defconfig
demos/hello_world/firmware/fw-01/configs/mt_defconfig
+17
-0
Kconfig
demos/hello_world_framework/firmware/fw-01/Kconfig
+6
-0
Makefile
demos/hello_world_framework/firmware/fw-01/Makefile
+0
-6
mt_defconfig
...hello_world_framework/firmware/fw-01/configs/mt_defconfig
+17
-0
Kconfig
demos/profiling/firmware/fw-01/Kconfig
+6
-0
Makefile
demos/profiling/firmware/fw-01/Makefile
+0
-6
mt_defconfig
demos/profiling/firmware/fw-01/configs/mt_defconfig
+17
-0
Kconfig
demos/profiling/firmware/fw-02/Kconfig
+6
-0
Makefile
demos/profiling/firmware/fw-02/Makefile
+0
-6
mt_defconfig
demos/profiling/firmware/fw-02/configs/mt_defconfig
+13
-0
Kconfig
demos/profiling/firmware/fw-03/Kconfig
+6
-0
Makefile
demos/profiling/firmware/fw-03/Makefile
+0
-6
mt_defconfig
demos/profiling/firmware/fw-03/configs/mt_defconfig
+13
-0
mockturtle-common.h
software/include/mockturtle-common.h
+1
-1
Kconfig.mt
software/rt/Kconfig.mt
+13
-0
Makefile
software/rt/Makefile
+8
-22
mockturtle-framework.h
software/rt/framework/mockturtle-framework.h
+1
-0
mockturtle-frm-action.c
software/rt/framework/mockturtle-frm-action.c
+4
-4
mockturtle-frm-debug.c
software/rt/framework/mockturtle-frm-debug.c
+3
-3
No files found.
demos/alarm_clock/firmware/fw-01/Makefile
View file @
3da020ee
...
...
@@ -8,11 +8,5 @@ EXTRA_CFLAGS += -DFPGA_APPLICATION_ID=0x0
EXTRA_CFLAGS
+=
-DRT_APPLICATION_ID
=
0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
1
include
$(TRTL_SW)/rt/Makefile
demos/alarm_clock/firmware/fw-01/configs/mt_defconfig
View file @
3da020ee
...
...
@@ -11,3 +11,7 @@
# Mock Turtle configuration
#
CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE=y
# CONFIG_MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE is not set
CONFIG_MOCKTURTLE_FRAMEWORK_32BIT_ALIGN=y
demos/data_generator/firmware/fw-01/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "data_generator demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/data_generator/firmware/fw-01/Makefile
View file @
3da020ee
...
...
@@ -10,11 +10,5 @@ EXTRA_CFLAGS += -DRT_APPLICATION_ID=0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
MOCKTURTLE_LIBRARY_PRINT_DEBUG_ENABLE
:=
1
MOCKTURTLE_LIBRARY_PRINT_ERROR_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
1
include
$(TRTL_SW)/rt/Makefile
demos/data_generator/firmware/fw-01/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# data_generator demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE=y
CONFIG_MOCKTURTLE_FRAMEWORK_32BIT_ALIGN=y
demos/hello_world/firmware/fw-01/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "hello_world demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/hello_world/firmware/fw-01/Makefile
View file @
3da020ee
...
...
@@ -9,11 +9,5 @@ EXTRA_CFLAGS += -DRT_APPLICATION_ID=0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
0
include
$(TRTL_SW)/rt/Makefile
demos/hello_world/firmware/fw-01/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# hello_world demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
# CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_32BIT_ALIGN is not set
demos/hello_world_framework/firmware/fw-01/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "hello_world_framework demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/hello_world_framework/firmware/fw-01/Makefile
View file @
3da020ee
...
...
@@ -8,11 +8,5 @@ EXTRA_CFLAGS += -DFPGA_APPLICATION_ID=0x0
EXTRA_CFLAGS
+=
-DRT_APPLICATION_ID
=
0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
1
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
1
include
$(TRTL_SW)/rt/Makefile
demos/hello_world_framework/firmware/fw-01/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# alarm_clock demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE=y
# CONFIG_MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE is not set
CONFIG_MOCKTURTLE_FRAMEWORK_32BIT_ALIGN=y
demos/profiling/firmware/fw-01/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "Profiling 1 demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/profiling/firmware/fw-01/Makefile
View file @
3da020ee
...
...
@@ -12,11 +12,5 @@ EXTRA_CFLAGS += -DRT_APPLICATION_ID=0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
MOCKTURTLE_LIBRARY_PRINT_DEBUG_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
0
include
$(TRTL_SW)/rt/Makefile
demos/profiling/firmware/fw-01/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# Profiling 1 demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
# CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE is not set
# CONFIG_MOCKTURTLE_FRAMEWORK_32BIT_ALIGN is not set
demos/profiling/firmware/fw-02/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "alarm_clock demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/profiling/firmware/fw-02/Makefile
View file @
3da020ee
...
...
@@ -12,11 +12,5 @@ EXTRA_CFLAGS += -DRT_APPLICATION_ID=0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
MOCKTURTLE_LIBRARY_PRINT_DEBUG_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
0
include
$(TRTL_SW)/rt/Makefile
demos/profiling/firmware/fw-02/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# alarm_clock demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
# CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE is not set
demos/profiling/firmware/fw-03/Kconfig
0 → 100644
View file @
3da020ee
mainmenu "alarm_clock demo configuration"
comment "Project specific configuration"
source "Kconfig.mt"
demos/profiling/firmware/fw-03/Makefile
View file @
3da020ee
...
...
@@ -12,11 +12,5 @@ EXTRA_CFLAGS += -DRT_APPLICATION_ID=0x0
MOCKTURTLE_LIBRARY_PRINT_ENABLE
:=
1
MOCKTURTLE_LIBRARY_PRINT_DEBUG_ENABLE
:=
1
# Firmware Libray configuration
MOCKTURTLE_FRAMEWORK_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
:=
0
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
:=
0
include
$(TRTL_SW)/rt/Makefile
demos/profiling/firmware/fw-03/configs/mt_defconfig
0 → 100644
View file @
3da020ee
#
# Automatically generated file; DO NOT EDIT.
# alarm_clock demo configuration
#
#
# Project specific configuration
#
#
# Mock Turtle configuration
#
# CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE is not set
software/include/mockturtle-common.h
View file @
3da020ee
...
...
@@ -145,7 +145,7 @@ static inline struct trtl_proto_header *rt_proto_header_get(void *raw_msg)
static
inline
void
rt_proto_header_set
(
void
*
raw_msg
,
struct
trtl_proto_header
*
header
)
{
#if MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
#if
CONFIG_
MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
struct
trtl_proto_header
)
/
4
;
++
i
)
...
...
software/rt/Kconfig.mt
View file @
3da020ee
...
...
@@ -2,3 +2,16 @@ comment "Mock Turtle configuration"
config MOCKTURTLE_FRAMEWORK_ENABLE
bool "Enable Mock Turtle framework"
config MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
bool "Enable debugging in Mock Turtle framework"
config MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
bool "Enable variable in Mock Turtle framework"
config MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
bool "Enable buffer in Mock Turtle framework"
config MOCKTURTLE_FRAMEWORK_32BIT_ALIGN
bool "Enable 32bit align in Mock Turtle framework"
software/rt/Makefile
View file @
3da020ee
...
...
@@ -61,21 +61,6 @@ CFLAGS += -DLIB_PRINT_ERROR
endif
endif
ifeq
($(MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE),
1)
CFLAGS
+=
-DMOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
endif
ifeq
($(MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE),
1)
CFLAGS
+=
-DMOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
endif
ifeq
($(MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE),
1)
CFLAGS
+=
-DMOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
endif
ifeq
($(MOCKTURTLE_FRAMEWORK_32BIT_ALIGN),
1)
CFLAGS
+=
-DMOCKTURTLE_FRAMEWORK_32BIT_ALIGN
endif
CFLAGS
+=
$(EXTRA_CFLAGS)
...
...
@@ -89,13 +74,14 @@ OBJS += lib/vsprintf-xint.o
OBJS
+=
lib/printf.o
OBJS
+=
lib/mockturtle-rt-common.o
ifeq
($(MOCKTURTLE_FRAMEWORK_ENABLE),
1)
OBJDIR
+=
framework
OBJS
+=
framework/mockturtle-frm-core.o
OBJS
+=
framework/mockturtle-frm-debug.o
OBJS
+=
framework/mockturtle-frm-action.o
OBJS
+=
framework/mockturtle-frm-mqueue.o
endif
OBJDIR-$(CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE)
+=
framework
OBJS-$(CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE)
+=
framework/mockturtle-frm-core.o
OBJS-$(CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE)
+=
framework/mockturtle-frm-debug.o
OBJS-$(CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE)
+=
framework/mockturtle-frm-action.o
OBJS-$(CONFIG_MOCKTURTLE_FRAMEWORK_ENABLE)
+=
framework/mockturtle-frm-mqueue.o
OBJDIR
+=
$
(
OBJDIR-y
)
OBJS
+=
$
(
OBJS-y
)
OBJS_BUILD
=
$
(
addprefix
$(BUILDDIR)
/,
$(OBJS)
)
...
...
software/rt/framework/mockturtle-framework.h
View file @
3da020ee
...
...
@@ -14,6 +14,7 @@
#ifndef __TRTL_FW_FRM_H__
#define __TRTL_FW_FRM_H__
#include <generated/autoconf.h>
#include "mockturtle-rt.h"
#include "mockturtle-frm-action.h"
#include "mockturtle-frm-mqueue.h"
...
...
software/rt/framework/mockturtle-frm-action.c
View file @
3da020ee
...
...
@@ -48,7 +48,7 @@ int rt_version_getter(struct trtl_proto_header *hin, void *pin,
* it overwrite a data structure with the one contained in the input
* payload. If the message is syncrnous it will copy back the data structure.
*/
#ifdef MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
int
rt_buffer_setter
(
struct
trtl_proto_header
*
hin
,
void
*
pin
,
struct
trtl_proto_header
*
hout
,
void
*
pout
)
{
...
...
@@ -97,7 +97,7 @@ int rt_buffer_setter(struct trtl_proto_header *hin, void *pin,
* This is an @ref action_t function type. Accorind the message request,
* it copies one of the declared data structure to the output payload.
*/
#ifdef MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_BUFFER_ENABLE
int
rt_buffer_getter
(
struct
trtl_proto_header
*
hin
,
void
*
pin
,
struct
trtl_proto_header
*
hout
,
void
*
pout
)
{
...
...
@@ -146,7 +146,7 @@ int rt_buffer_getter(struct trtl_proto_header *hin, void *pin,
* it writes a number of declared variables. If the message is synchronous
* it copies back the values in the output payload.
*/
#ifdef MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
int
rt_variable_setter
(
struct
trtl_proto_header
*
hin
,
void
*
pin
,
struct
trtl_proto_header
*
hout
,
void
*
pout
)
{
...
...
@@ -199,7 +199,7 @@ int rt_variable_setter(struct trtl_proto_header *hin, void *pin,
* This is an @ref action_t function type. Accorind the message request,
* it copies a number of declared variables.
*/
#ifdef MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_VARIABLE_ENABLE
int
rt_variable_getter
(
struct
trtl_proto_header
*
hin
,
void
*
pin
,
struct
trtl_proto_header
*
hout
,
void
*
pout
)
{
...
...
software/rt/framework/mockturtle-frm-debug.c
View file @
3da020ee
...
...
@@ -18,7 +18,7 @@
* @param[in] n_values number of variadic arguments
* @return 0 on success. -1 on error
*/
#ifdef MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
int
rt_send_debug
(
int
mq_in
,
int
n_values
,
...)
{
va_list
ap
;
...
...
@@ -62,7 +62,7 @@ int rt_send_debug(int mq_in, int n_values, ...)
* It prints on the serial interface the given message header
* @param[in] h message header to print
*/
#ifdef MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
void
rt_print_header
(
struct
trtl_proto_header
*
h
)
{
pr_debug
(
" app_id 0x%x | msg_id %d | slot_io 0x%x | seq %"
PRIu32
"d
\n\r
"
,
...
...
@@ -85,7 +85,7 @@ void rt_print_header(struct trtl_proto_header *h)
* @param[in] d buffer data
* @param[in] count number of 32bit words to show
*/
#ifdef MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
#ifdef
CONFIG_
MOCKTURTLE_FRAMEWORK_DEBUG_ENABLE
void
rt_print_data
(
uint32_t
*
d
,
unsigned
int
count
)
{
int
i
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment