Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
ecb40265
Commit
ecb40265
authored
May 06, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'build-kconfig-fixes'
parents
6f271ec4
21c7c354
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
206 additions
and
143 deletions
+206
-143
.gitignore
.gitignore
+0
-1
Kconfig
Kconfig
+143
-92
Makefile
Makefile
+10
-15
boards.mk
boards/boards.mk
+0
-1
board.h
boards/svec/board.h
+0
-0
etherbone_defconfig
configs/etherbone_defconfig
+10
-8
ppsi_defconfig
configs/ppsi_defconfig
+18
-7
spec_defconfig
configs/spec_defconfig
+10
-8
wrnic_defconfig
configs/wrnic_defconfig
+11
-9
board.h
include/board.h
+0
-0
printf.mk
pp_printf/printf.mk
+2
-2
menu.c
scripts/kconfig/menu.c
+2
-0
No files found.
.gitignore
View file @
ecb40265
...
...
@@ -5,7 +5,6 @@
*.mif
*.*~
*~
include/board.h
tools/zpu-loader
tools/vuart_console
tools/genraminit
...
...
Kconfig
View file @
ecb40265
mainmenu "WR PTP Core software configuration"
# most options with no prompt here are prompted-for in the "advanced" section
config RAMSIZE
int "Size of the RAM in the FPGA for this program"
default 90112
help
The usual configuration for wrpc-sw is 0x16000 bytes
(i.e. 88kB = 90112 bytes) but if your project has less or
more features you may want to adjust the FPGA size and
choose your preferred value here.
int
default 90112
choice
prompt "Choose your preferred ptp engine"
default PTP_NOPOSIX
config STACKSIZE
int
default 2048
config PRINT_BUFSIZE
int
default 128
config PRINTF_XINT
boolean
default y
config PTP_NOPOSIX
boolean "ptp-noposix"
help
Select this option for the ptp-noposix engine
boolean
default y
config PPSI
boolean "ppsi"
help
Select this option for the ppsi engine. Warning: this option is
work in progress, may not work or not compile at all.
config UART
boolean
default !UART_SW
endchoice
config SOCKITOWM
boolean
default y
# The other ones can be set by non-developers
config ETHERBONE
boolean "Compile Etherbone support in wrpc-sw"
help
This allows to run LM32 code that is aware of Etherbone.
You need to run a gateware file that includes Etherbone support.
If in doubt, say No.
config CMD_CONFIG
boolean "Include configuration in the output binary"
help
This options adds the "config" command to the shell, which
reports the current configuration. This adds half a kilobyte
to the binary size (100b for the code plus the .config file).
#
# This is a set of configuration options that should not be changed by
# normal users. If the "developer" menu is used, the binary is tainted.
comment "wrpc-sw is tainted if you change the following options"
config DEVELOPER
bool "Advanced configurations, only for developers"
help
The following options are new features under testing, or
special customizations not normally useful for people not
directly working on this package. Please don't use unless
you are a developer of wrpc-sw.
config RAMSIZE
depends on DEVELOPER
int "Size of the RAM in the FPGA for this program"
default 90112
help
The usual configuration for wrpc-sw is 0x16000 bytes
(i.e. 88kB = 90112 bytes) but if your project has less or
more features you may want to adjust the FPGA size and
choose your preferred value here.
config STACKSIZE
depends on DEVELOPER
int "Size of the stack area needed by this program"
default 3584 if PPSI
default 2048
help
The linker complains if the code doesn't fit into RAM, but
we must also consider the stack, or the program will crash
at run time. (However, we have a detector for overflows).
config PRINT_BUFSIZE
depends on DEVELOPER
int "Size for the temporary output string of pp_printf"
default 128
help
This buffer is constant storage (i.e. wasted space), but it
also constraints the maximum lenght of text that can be written
in a single call to printf.
config CHECK_RESET
depends on DEVELOPER
bool "Print a stack trace if reset happens"
help
If the CPU is following a NULL pointer, the program will
...
...
@@ -35,62 +100,28 @@ config CHECK_RESET
detects that it is re-executed and dumps a stack trace; it
then clears the stack (for next time) and restarts again.
config PPSI_VERBOSITY
depends on PPSI
int "Default verbosity for PPSI"
help
This option makes you select the verbosity of PPSI at startup:
0 means silent
1 means normal verbosity messages
2 means more verbose messages
default 0
range 0 2
config PPSI_RUNTIME_VERBOSITY
depends on PPSI
boolean "Enable runtime verbosity setting"
default y
help
If set, this option permits to change the verbosity of PPSI engine
runtime. This causes a bigger RAM occupation, so it is suggested
to set it only for debugging purpose.
config STACKSIZE
int "Size of the stack area needed by this program"
default 3584 if PPSI
default 2048
help
The linker complains if the code doesn't fit into RAM, but
we must also consider the stack, or the program will crash
badly at run time.
config PP_PRINTF
boolean
default y
choice
prompt "Implementation of pp_printf"
depends on PP_PRINTF
default PRINTF_XINT
depends on DEVELOPER
config PRINTF_XINT
bool "hex-and-int"
help
This selects a printf that can only print decimal and hex
numbers, without obeying the format modifiers. %c and %s are
supported too, and %p is equivalent to %x.
See pp_printf/README for details.
config PRINTF_FULL
bool "full"
bool "full"
help
This selects an implementation that supports all standard
formats with modifiers, like "%08X" and "%.5s". It costs
around 2k of compiled code more than XINT.
See pp_printf/README for details.
config PRINTF_XINT
bool "hex-and-int"
help
This selects a printf that can only print decimal and hex
numbers, without obeying the format modifiers. %c and %s are
supported too, and %p is equivalente to %x.
See pp_printf/README for details.
config PRINTF_MINI
bool "minimal"
bool "minimal"
help
This selects a printf that prints all integers as hex,
without obeying the format modifiers. %c and %s are
...
...
@@ -98,46 +129,65 @@ config PRINTF_MINI
This is not probably what you want for wrpc-sw.
config PRINTF_NONE
bool "empty"
bool "empty"
help
This selects a printf that prints the format string
alone and ignores all further arguments. Minimal size,
but not suited for wrpc-sw. See pp_printf/README for details.
endchoice
choice
prompt "Choose your preferred ptp engine"
depends on DEVELOPER
config P
RINT_BUFSIZE
depends on PP_PRINTF
int "Size for the temporary output string of pp_printf"
default 128
config P
TP_NOPOSIX
boolean "ptp-noposix"
help
Select this option for the ptp-noposix engine
config
ETHERBONE
boolean "
Compile Etherbone support in wrpc-sw
"
config
PPSI
boolean "
ppsi
"
help
This allows to run LM32 code that is aware of Etherbone.
You need to run a gateware file that includes Etherbone support.
If in doubt, say No.
Select this option for the ppsi engine. Warning: this option is
work in progress, may not work or not compile at all.
config DETERMINISTIC_BINARY
boolean "Build a binary that is the same every time"
help
This option is used to #ifdef __DATE__ and __TIME__ strings
out of the compiled WRC binary. If you set it you'll get the
same binary bit-by-bit at each rebuild. I am using this
option to hack the build procedure and use a simple "diff"
between the old and new output to verify I didn't introduce
changes.
endchoice
config PPSI_VERBOSITY
depends on PPSI && DEVELOPER
int "Default verbosity for PPSI"
help
This option makes you select the verbosity of PPSI at startup:
0 means silent
1 means normal verbosity messages
2 means more verbose messages
default 0
range 0 2
If in doubt, say No.
config PPSI_RUNTIME_VERBOSITY
depends on PPSI && DEVELOPER
boolean "Enable runtime verbosity setting"
default y
help
If set, this option permits to change the verbosity of PPSI engine
runtime. This causes a bigger RAM occupation, so it is suggested
to set it only for debugging purpose.
config CMD_CONFIG
boolean "Include configuration in the output binary"
config DETERMINISTIC_BINARY
depends on DEVELOPER
boolean "Build a binary that is the same every time"
help
This options adds the "config" command to the shell, which
reports the current configuration. This adds half a kilobyte
to the binary size (100b for the code plus the .config file).
This option is used to #ifdef __DATE__ and __TIME__ strings
out of the compiled WRC binary. If you set it you'll get the
same binary bit-by-bit at each rebuild. I am using this
option to hack the build procedure and use a simple "diff"
between the old and new output to verify I didn't introduce
changes.
If in doubt, say No.
config UART_SW
depends on DEVELOPER
boolean "Use software uart (not the hardware one)"
help
The software uart is made up of two circular buffers. They
...
...
@@ -145,10 +195,11 @@ config UART_SW
uarts can be accessed using tools/wrpc-uart-sw.
config UART
boolean
default !UART_SW
boolean
default !UART_SW
config W1
depends on DEVELOPER
boolean "Rewritten OneWire Code"
help
This selects a rewritten code base for onewire, meant to be
...
...
@@ -156,4 +207,4 @@ config W1
config SOCKITOWM
boolean
default !W1
\ No newline at end of file
default !W1
Makefile
View file @
ecb40265
# Tomasz Wlostowski for CERN, 2011,2012
# choose your board here.
BOARD
=
spec
# and don't touch the rest unless you know what you're doing.
CROSS_COMPILE
?=
lm32-elf-
CC
=
$(CROSS_COMPILE)
gcc
...
...
@@ -32,9 +28,8 @@ obj-y += softpll/softpll_ng.o
$(CC)
-include
$(AUTOCONF)
-E
-P
$*
.ld.S
-o
$@
cflags-y
=
-ffreestanding
-include
$(AUTOCONF)
-Iinclude
-I
.
-Isoftpll
cflags-$(CONFIG_PP_PRINTF)
+=
-I$(CURDIR)/pp_printf
cflags-y
=
-ffreestanding
-include
$(AUTOCONF)
-Iinclude
-I
.
-Isoftpll
cflags-y
+=
-I
$(CURDIR)
/pp_printf
cflags-$(CONFIG_PTP_NOPOSIX)
+=
\
-DPTPD_FREESTANDING
\
...
...
@@ -149,14 +144,8 @@ config.o: .config
$(AUTOCONF)
:
silentoldconfig
$(OBJS)
:
include/board.h
include/board.h
:
ln
-sf
../boards/
$(BOARD)
/board.h include/board.h
clean
:
rm
-f
$(OBJS)
$(OUTPUT)
.elf
$(OUTPUT)
.bin
$(OUTPUT)
.ram
include/board.h
rm
-f
$(OBJS)
$(OUTPUT)
.elf
$(OUTPUT)
.bin
$(OUTPUT)
.ram
$(MAKE)
-C
$(PPSI)
clean
%.o
:
%.c
...
...
@@ -178,8 +167,14 @@ silentoldconfig:
@
mkdir
-p
include/config
$(MAKE)
-f
Makefile.kconfig
$@
scripts_basic config %config
:
scripts_basic config
:
$(MAKE)
-f
Makefile.kconfig
$@
%config
:
$(MAKE)
-f
Makefile.kconfig
$@
defconfig
:
$(MAKE)
-f
Makefile.kconfig spec_defconfig
.config
:
silentoldconfig
boards/boards.mk
deleted
100644 → 0
View file @
6f271ec4
OBJS_BOARD = $(BOARD)/board.o
\ No newline at end of file
boards/svec/board.h
deleted
100644 → 0
View file @
6f271ec4
configs/etherbone_defconfig
View file @
ecb40265
...
...
@@ -2,14 +2,16 @@
# Automatically generated make config: don't edit
#
CONFIG_RAMSIZE=90112
CONFIG_PTP_NOPOSIX=y
# CONFIG_PPSI is not set
CONFIG_STACKSIZE=2048
CONFIG_PP_PRINTF=y
# CONFIG_PRINTF_FULL is not set
CONFIG_PRINTF_XINT=y
# CONFIG_PRINTF_MINI is not set
# CONFIG_PRINTF_NONE is not set
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINTF_XINT=y
CONFIG_PTP_NOPOSIX=y
CONFIG_UART=y
CONFIG_SOCKITOWM=y
CONFIG_ETHERBONE=y
# CONFIG_DETERMINISTIC_BINARY is not set
# CONFIG_CMD_CONFIG is not set
#
# wrpc-sw is tainted if you change the following options
#
# CONFIG_DEVELOPER is not set
configs/
spec_
ppsi_defconfig
→
configs/ppsi_defconfig
View file @
ecb40265
...
...
@@ -2,15 +2,26 @@
# Automatically generated make config: don't edit
#
CONFIG_RAMSIZE=90112
# CONFIG_PTP_NOPOSIX is not set
CONFIG_PPSI=y
CONFIG_PPSI_VERBOSITY=0
CONFIG_STACKSIZE=2048
CONFIG_PP_PRINTF=y
# CONFIG_PRINTF_FULL is not set
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINTF_XINT=y
# CONFIG_PTP_NOPOSIX is not set
CONFIG_UART=y
CONFIG_SOCKITOWM=y
# CONFIG_ETHERBONE is not set
# CONFIG_CMD_CONFIG is not set
#
# wrpc-sw is tainted if you change the following options
#
CONFIG_DEVELOPER=y
# CONFIG_CHECK_RESET is not set
# CONFIG_PRINTF_FULL is not set
# CONFIG_PRINTF_MINI is not set
# CONFIG_PRINTF_NONE is not set
CONFIG_PRINT_BUFSIZE=128
# CONFIG_ETHERBONE is not set
CONFIG_PPSI=y
CONFIG_PPSI_VERBOSITY=0
CONFIG_PPSI_RUNTIME_VERBOSITY=y
# CONFIG_DETERMINISTIC_BINARY is not set
# CONFIG_UART_SW is not set
# CONFIG_W1 is not set
configs/spec_defconfig
View file @
ecb40265
...
...
@@ -2,14 +2,16 @@
# Automatically generated make config: don't edit
#
CONFIG_RAMSIZE=90112
CONFIG_PTP_NOPOSIX=y
# CONFIG_PPSI is not set
CONFIG_STACKSIZE=2048
CONFIG_PP_PRINTF=y
# CONFIG_PRINTF_FULL is not set
CONFIG_PRINTF_XINT=y
# CONFIG_PRINTF_MINI is not set
# CONFIG_PRINTF_NONE is not set
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINTF_XINT=y
CONFIG_PTP_NOPOSIX=y
CONFIG_UART=y
CONFIG_SOCKITOWM=y
# CONFIG_ETHERBONE is not set
# CONFIG_DETERMINISTIC_BINARY is not set
# CONFIG_CMD_CONFIG is not set
#
# wrpc-sw is tainted if you change the following options
#
# CONFIG_DEVELOPER is not set
configs/wrnic_defconfig
View file @
ecb40265
...
...
@@ -2,14 +2,16 @@
# Automatically generated make config: don't edit
#
CONFIG_RAMSIZE=90112
CONFIG_PTP_NOPOSIX=y
# CONFIG_PPSI is not set
CONFIG_STACKSIZE=3072
CONFIG_PP_PRINTF=y
# CONFIG_PRINTF_FULL is not set
CONFIG_PRINTF_XINT=y
# CONFIG_PRINTF_MINI is not set
# CONFIG_PRINTF_NONE is not set
CONFIG_STACKSIZE=2048
CONFIG_PRINT_BUFSIZE=128
CONFIG_PRINTF_XINT=y
CONFIG_PTP_NOPOSIX=y
CONFIG_UART=y
CONFIG_SOCKITOWM=y
# CONFIG_ETHERBONE is not set
# CONFIG_DETERMINISTIC_BINARY is not set
# CONFIG_CMD_CONFIG is not set
#
# wrpc-sw is tainted if you change the following options
#
# CONFIG_DEVELOPER is not set
boards/spec
/board.h
→
include
/board.h
View file @
ecb40265
File moved
pp_printf/printf.mk
View file @
ecb40265
# This is included from ../Makefile, for the wrc build system.
# The Makefile in this directory is preserved from the upstream version
obj-
$(CONFIG_PP_PRINTF)
+= pp_printf/printf.o
obj-
y
+= pp_printf/printf.o
ppprintf-$(CONFIG_PRINTF_FULL) += pp_printf/vsprintf-full.o
ppprintf-$(CONFIG_PRINTF_MINI) += pp_printf/vsprintf-mini.o
...
...
@@ -10,6 +10,6 @@ ppprintf-$(CONFIG_PRINTF_XINT) += pp_printf/vsprintf-xint.o
ppprintf-y ?= pp_printf/vsprintf-xint.o
obj-
$(CONFIG_PP_PRINTF)
+= $(ppprintf-y)
obj-
y
+= $(ppprintf-y)
scripts/kconfig/menu.c
View file @
ecb40265
...
...
@@ -327,9 +327,11 @@ void menu_finalize(struct menu *parent)
if
(
!
menu
->
prompt
)
menu_warn
(
menu
,
"choice value must have a prompt"
);
for
(
prop
=
menu
->
sym
->
prop
;
prop
;
prop
=
prop
->
next
)
{
#if 0 /* Actually, it works */
if (prop->type == P_DEFAULT)
prop_warn(prop, "defaults for choice "
"values not supported");
#endif
if
(
prop
->
menu
==
menu
)
continue
;
if
(
prop
->
type
==
P_PROMPT
&&
...
...
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