-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zephyr federated project #3
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
application/src-gen | ||
application/bin | ||
application/build | ||
application/*/src-gen | ||
application/*/fed-gen | ||
application/*/bin | ||
application/*/build | ||
application/*/include | ||
application/*/*build/** | ||
|
||
.vscode | ||
scripts/__pycache__ | ||
build/ | ||
|
||
deps/ | ||
deps/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# This file is the application Kconfig entry point. All application Kconfig | ||
# options can be defined here or included via other application Kconfig files. | ||
# You can browse these options using the west targets menuconfig (terminal) or | ||
# guiconfig (GUI). | ||
|
||
menu "Zephyr" | ||
source "Kconfig.zephyr" | ||
endmenu |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# This is a Kconfig fragment which can be used to enable debug-related options | ||
# in the application. See the README for more details. | ||
|
||
# compiler | ||
CONFIG_DEBUG_OPTIMIZATIONS=y | ||
|
||
# Network shell | ||
CONFIG_NET_SHELL=y | ||
CONFIG_SHELL=y | ||
|
||
# Logging | ||
CONFIG_NET_LOG=y | ||
CONFIG_LOG=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This overlay file (name: <BOARD>_<FEDERATE_NAME>.overlay) will override | ||
* default hardware configurations in <BOARD>.dts. The overlay file must | ||
* specify a unique MAC address when there are more than one board federate | ||
* to be depolyed. | ||
*/ | ||
|
||
&{/leds} { | ||
compatible = "gpio-leds"; | ||
led-2 { | ||
gpios = < &gpio9 0x19 GPIO_ACTIVE_HIGH >; | ||
label = "User LED D34, GPIO9 AD 26"; | ||
status = "okay"; | ||
}; | ||
}; | ||
Comment on lines
+8
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isnt this part of the DTS of the dev-kit? |
||
|
||
&enet { | ||
local-mac-address = [00 0a 35 00 00 01]; | ||
status = "okay"; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This overlay file (name: <BOARD>_<FEDERATE_NAME>.overlay) will override | ||
* default hardware configurations in <BOARD>.dts. The overlay file must | ||
* specify a unique MAC address when there are more than one board federate | ||
* to be depolyed. | ||
*/ | ||
|
||
&{/leds} { | ||
compatible = "gpio-leds"; | ||
led-2 { | ||
gpios = < &gpio9 0x19 GPIO_ACTIVE_HIGH >; | ||
label = "User LED D34, GPIO9 AD 26"; | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
&enet { | ||
local-mac-address = [00 0a 35 00 00 02]; | ||
status = "okay"; | ||
}; | ||
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have any idea how this is done for other boards? Do you have a link to where you found info about this? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This federate-specific configuration file (name: prj_<FEDERATE_NAME>.conf) | ||
# will be merged with `prj_lf.conf` in the generated source directory `src-gen`. | ||
# Be careful to not set configuration parameters that are conflicting with | ||
# the default required parameters found in `prj_lf.conf` | ||
|
||
# General config | ||
CONFIG_MAIN_STACK_SIZE=4096 | ||
CONFIG_TEST_RANDOM_GENERATOR=y | ||
CONFIG_INIT_STACKS=y | ||
CONFIG_POSIX_API=y | ||
CONFIG_POSIX_MAX_FDS=32 | ||
|
||
# Generic networking options | ||
CONFIG_NETWORKING=y | ||
CONFIG_NET_UDP=y | ||
CONFIG_NET_TCP=y | ||
CONFIG_NET_IPV4=y | ||
CONFIG_NET_SOCKETS=y | ||
CONFIG_NET_L2_ETHERNET=y | ||
CONFIG_NET_CONNECTION_MANAGER=y | ||
CONFIG_NET_MAX_CONN=32 | ||
|
||
CONFIG_COUNTER_MCUX_GPT=y | ||
|
||
# Network buffers | ||
CONFIG_NET_PKT_RX_COUNT=32 | ||
CONFIG_NET_PKT_TX_COUNT=32 | ||
CONFIG_NET_BUF_RX_COUNT=128 | ||
CONFIG_NET_BUF_TX_COUNT=128 | ||
CONFIG_NET_BUF_FIXED_DATA_SIZE=y | ||
CONFIG_NET_BUF_DATA_SIZE=1024 | ||
|
||
# Network socket timeout | ||
CONFIG_NET_CONTEXT_RCVTIMEO=y | ||
CONFIG_NET_CONTEXT_SNDTIMEO=y | ||
|
||
# Network application options and configuration | ||
CONFIG_NET_CONFIG_SETTINGS=y | ||
CONFIG_NET_CONFIG_NEED_IPV4=y | ||
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems all parameters except this one, is common for both. Could they be extracted in a single common config file? |
||
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.0" | ||
CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.