pulpino soc has custom-extended riscv ISA that is accounted
for if CONFIG_RISCV_GENERIC_TOOLCHAIN is not set.
(ex: bit manipulation asm opcodes)
Change-Id: I4dafc4ebc2fedcc4eb6a3dedd0412816afea6004
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
Default 256 bytes stack size for idle task is not enough, as
stack grows/shrinks by a multiple of 16-bytes in the
RISC-V architecture.
Increase it to 512 bytes for RISCV32 architecture
Change-Id: I8321c48e4c1a877b252ba5561f3cbdd1fe475fc7
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
added _MOVE_INSTR for RISCV32 architecture
The store instruction has a different syntax in RISC-V,
compared to the other architectures. Hence, for each
architecture, specify the entire load instruction within
the _MOVE_INSTR variable.
Change-Id: Iedc421e73411876abd8b698f7d4b46081b473d79
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
RISC-V is an open-source instruction set architecture.
Added support for the 32bit version of RISC-V to Zephyr.
1) exceptions/interrupts/faults are handled at the architecture
level via the __irq_wrapper handler. Context saving/restoring
of registers can be handled at both architecture and SOC levels.
If SOC-specific registers need to be saved, SOC level needs to
provide __soc_save_context and __soc_restore_context functions
that shall be accounted by the architecture level, when
corresponding config variable RISCV_SOC_CONTEXT_SAVE is set.
2) As RISC-V architecture does not provide a clear ISA specification
about interrupt handling, each RISC-V SOC handles it in its own
way. Hence, at the architecture level, the __irq_wrapper handler
expects the following functions to be provided by the SOC level:
__soc_is_irq: to check if the exception is the result of an
interrupt or not.
__soc_handle_irq: handle pending IRQ at SOC level (ex: clear
pending IRQ in SOC-specific IRQ register)
3) Thread/task scheduling, as well as IRQ offloading are handled via
the RISC-V system call ("ecall"), which is also handled via the
__irq_wrapper handler. The _Swap asm function just calls "ecall"
to generate an exception.
4) As there is no conventional way of handling CPU power save in
RISC-V, the default nano_cpu_idle and nano_cpu_atomic_idle
functions just unlock interrupts and return to the caller, without
issuing any CPU power saving instruction. Nonetheless, to allow
SOC-level to implement proper CPU power save, nano_cpu_idle and
nano_cpu_atomic_idle functions are defined as __weak
at the architecture level.
Change-Id: I980a161d0009f3f404ad22b226a6229fbb492389
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
Compiling Zephyr with an external riscv32 toolchain would
require the following env variables to be exported:
export ZEPHYR_GCC_VARIANT=riscv32
export RISCV32_TOOLCHAIN_PATH=/PATH/TO/TOOLCHAIN/BINARY
Change-Id: I2072ed9079a4cabd27837ab39b947bc0a0a1a8b4
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
Be nice and inform user about unsupported and dropped frames.
Change-Id: Iaf0e7ed660a926c45dac9fc36b788c4c786eac11
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This makes it possible to setup a Bluetooth connection using net_bt shell
commands.
Change-Id: Ie4ae7e61345315ef987a00b6b5a28c0419f6b1c8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds NET_REQUEST_BT_DISCONNECT which can be used to disconnect
IPSP in case it is connected.
Change-Id: I8da00b02ee08611bef5f4c0708936b2d31fd2a93
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds NET_REQUEST_BT_SCAN which can be used to scan peripherals
advertising IPSS UUID.
Change-Id: I2463079d182b4da080e6ef94d883c7c1e24a454c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a shell module called "net_bt" that exposes Bluetooth L2
management commands.
Change-Id: Ia6da1d38cfd51502119758a8f6abbb6d1cd31743
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Connect command can be used to initiate a connection, which in IPSP
terminology refer to a router role.
Change-Id: I12b9428924c88a9c68d3adbfe9016a0dd690aade
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Including logging/sys_log.h before net_core.h prevents SYS_LOG_LEVEL,
etc, to be set properly.
Change-Id: Iaa7aa98110aa455162836be1d9560fbfc03569df
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the interface is not UP wait for MGMT event if that is enabled.
Change-Id: I4866c23d1e6f5b1a7cf212434d794673d7e756ce
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
CONFIG_NETWORKING_WITH_BT no longer exist, instead
CONFIG_NET_L2_BLUETOOTH shall be used.
Change-Id: Ide353b7620228e431c535768b37749994caf8e8b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This decodes the event layer, code and type when debugging is enabled.
Change-Id: I23c6fb200f3287a138e46df9f472c9982898675d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
They should return the same value as in NET_MGMT_LAYER and
NET_MGMT_LAYER_CODE.
Change-Id: Ia95adcd3b6b6aaf0ed29f3260bc54784ca532d8f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
It was missing for arduino_101.
Jira: ZEP-1574
Change-Id: I08fc0961b94f5f7b1b787ebf52e7d9922e38006c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
When CONFIG_NET_MGMT_EVENT is not set, it will still be able to compile
code using net_mgmt_event related functions.
Change-Id: I6824c57093636867ea4228338aa6c02913975510
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
net_context_put() forgot to release the conn_handler field causing
subsequent failures in net_conn_register() when they ran out.
Change-Id: I0d306b5035199422fa8788338ac9da8d1900d5f9
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
TCP didn't actually have a way to signal synchronous receipt of a FIN
packet. Extend the recv_cb API to allow a NULL buf argument with
status==0 (by analogy to Unix's zero-length read) to signal EOF.
Update docs too, and also echo_server which wasn't prepared to handle
this situation.
Change-Id: I7dc08f9e262a81dcad9c670c6471898889f0b05d
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
In icmpv4, after calling setup_ipv4_header() function,
only calculate ICMP chksum, not calculate ipv4 header chksum,
ipv4 header chksum still 0, the other side will drop this pack.
Change-Id: I1550a4c8c7ab63132d70ba6ce19a7caf78ad84e6
Signed-off-by: li zj <279939902@qq.com>
When router receive dhcpv4 request with ciaddr not 0.0.0.0,
some router reply NAK, dhcpv4 never successful.
Change-Id: I4b66b18f7d30ad5a1b638fdca0bb204ed078d551
Signed-off-by: li zj <279939902@qq.com>
The tcp_synack_received() function ends with a call to send_ack().
However, if we don't update the sequence and ACK values, we'll send back
headers with 0 values and the destination will try resending over and
over.
Fix this by saving the seq and ack values when a TCP_SYN is flagged
in the header (which should be the case almost any time this function
is used as a callback).
Change-Id: I57f07ce719f2b6e2fb34c96c867d2e1c37f342ba
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Once SYNACK has been received for a TCP connection, we need to set the
net context state to NET_CONTEXT_CONNECTED or else calls to sendto()
will fail with -ENOTCONN.
Change-Id: Idd78e1dcdd5ac0bca5d3fba40b59ab8fde6b8729
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When calling net_context_connect, the local address family
is never set prior to calling net_tcp_register. This generates
an error:
"Local address family not set." (-EINVAL)
Let's set the local address family prior to this call.
Change-Id: Ic5f2edf684d14f9bb77019c49c95e5524a406417
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When TCP SYNACK is received we register the connection via the
net_tcp_register function. During this call several errors are
generated concerning local and remote address information not
being set.
Let's copy the local and remote address data prior to this call.
Change-Id: I17cd83f7b4b7e65e45fec1810fb38f745653bdc7
Signed-off-by: Michael Scott <michael.scott@linaro.org>
In other portions of the code we use the sys_put_be* function
to shift the values from the current system endian to big
endian array of bytes. Let's be consistent and do that in
the prepare_segment function as well.
Change-Id: I5a1a4c30ddf313c9e978be98fd969899f5de6190
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The state of a net context is checked as a whole value (not individual
bits). Currently, the net_context_set_state function is adding the
passed in flags to the existing value. This is incorrect.
Change-Id: Ieba6b9dfc35537745b14c50a2ccb115c6976c001
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The NET_SLIP Kconfig choice option doesn't really do anything for us,
plus we get warnings related to setting CONFIG_NET_SLIP=y in prj.conf
files.
Warnings like:
warning: override: reassigning to symbol NET_SLIP
warning: override: NET_SLIP_TAP changes choice state
So remove NET_SLIP choice and remove CONFIG_NET_SLIP=y in the prj.conf
files.
Change-Id: Ibccf9cf167f4c8a4df480ca0396bf83fcf60df1e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename cc2520 directory to hw and use it as generic
test application for the 802154 hardware driver.
Change-Id: I1c21505b7eb295279190f011a99c80e762178730
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add common log level for all IEEE802154 drivers.
Change-Id: If92c96b14e630d4482aadf9cacb25662d6663399
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Reformat and consolidate the samples/net/README and dns_client/READMExxx
files according to the RST spec.
Change-Id: I735190245204854ac5527e18971cc4c6478423e5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Update the zperf/README.rst file with the following information:
- Homogenize the usage of "zperf", "iPerf" and "Zephyr"
- Update the Supported Boards section
- Clarify some instructions
- Add the Requirements section
Change-Id: Idfb29e2a5db9a78c19a6a27923f134583ebe5822
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Rename the project configuration files to pass the build.
The Makefile specifies the following format for the conf file:
prj_BOARD_PROF.conf. However, there are two files with the
following format: prj_BOARD_IFACE_PROF.conf. So, rename them
to avoid build errors.
Change-Id: I75e0d4169db881583b5f9a2b67deee46f66b6c97
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove commented line in the zperf/Makefile file.
Change-Id: Id869f21e923d3bb39fc31c5216ce29d78a0e1805
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove the reference to CONFIG_NET_UIP in src/Makefile.
Change-Id: I960413c17496c4b70b9c171a54ccfca4951b858b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>