Commit 9603a711 authored by Alessandro Rubini's avatar Alessandro Rubini

Kconfig: complete reshuffle, using an "advanced" section

This introduced an "advanced" menu, only for developers, and most
questions are grouped in there, because we cannot support users
playing with experimental features or work in progress (like the new
onewire code, or the new ptp daemon) until they are the officially
supported option.

The commit also removes changes in stack size, because the new
calibration code by tom is not stack-hungry like the previous one:
wrnic_defconfig is now the same as spec_defconfig and ppsi doesn't
select a bigger stack any more.

Finally, ppsi_defconfig replaces spec_ppsi_defconfig, since we only
support the "spec" hardware configuration (other implementations we know
of are still very much spec-alike).

Unfortunately, this spits two warnings:

    Kconfig:25:warning: defaults for choice values not supported
    Kconfig:29:warning: defaults for choice values not supported

even if such defaults actually works. The next commit removes them.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 152111a8
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 PP_PRINTF
boolean
default y
config PRINT_BUFSIZE
depends on PP_PRINTF
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
config CHECK_RESET
bool "Print a stack trace if reset happens"
# The other ones can be set by non-developers
config ETHERBONE
boolean "Compile Etherbone support in wrpc-sw"
help
If the CPU is following a NULL pointer, the program will
be restarted. If this option is activated, the main function
detects that it is re-executed and dumps a stack trace; it
then clears the stack (for next time) and restarts again.
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 PPSI_VERBOSITY
depends on PPSI
int "Default verbosity for PPSI"
config CMD_CONFIG
boolean "Include configuration in the output binary"
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
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).
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.
#
# 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
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.
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 PP_PRINTF
boolean
default y
config PRINT_BUFSIZE
depends on PP_PRINTF && 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
be restarted. If this option is activated, the main function
detects that it is re-executed and dumps a stack trace; it
then clears the stack (for next time) and restarts again.
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 +134,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 PRINT_BUFSIZE
depends on PP_PRINTF
int "Size for the temporary output string of pp_printf"
default 128
config PTP_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 +200,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 +212,4 @@ config W1
config SOCKITOWM
boolean
default !W1
\ No newline at end of file
default !W1
......@@ -2,14 +2,17 @@
# 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
......@@ -2,15 +2,27 @@
# 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
......@@ -2,14 +2,17 @@
# 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
......@@ -2,14 +2,17 @@
# Automatically generated make config: don't edit
#
CONFIG_RAMSIZE=90112
CONFIG_PTP_NOPOSIX=y
# CONFIG_PPSI is not set
CONFIG_STACKSIZE=3072
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment