Xiang Xiao
dfe788be25
arch/ all assertion functinos: up_stackdump dump the full stack if stack overflow the stack info is very useful to find the backtrace
2018-11-11 12:52:36 -06:00
Gregory Nutt
2b3ec4172d
arch/: Add 'BOARD_ASSERT_RESET_VALUE' in config/Kconfig and replace reboot status '0' to 'CONFIG_BOARD_ASSERT_RESET_VALUE'.
2018-11-10 14:06:46 -06:00
Gregory Nutt
6d93658ff8
Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP.
2018-10-31 15:03:51 -06:00
Gregory Nutt
9bc951a335
Rename devif_loopback_out to devi_loopback
2018-08-25 08:33:21 -06:00
Xiang Xiao
0074afa0ac
net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire.
2018-08-24 09:21:33 -06:00
Xiang Xiao
e1202d2ed3
Replace all ASSERT with DEBUGASSERT to save the code space
2018-08-24 06:58:30 -06:00
Xiang Xiao
467d2a58ea
Replace non critical PANIC with DEBUGPANIC to save the code space
2018-08-24 06:21:15 -06:00
xuanlin
2c93467436
pthreads: Add support static pthread stack. Add standard pthread_attr_setstack() and pthread_attr_getstack(). In all cases where the stack is released, add check to see which allocator must be used to free the stack: The user or the kernel allocator.
2018-08-23 09:49:20 -06:00
Xiang Xiao
a465b6f0d4
configs/: Change CONFIG_BOARD_RESET_ON_CRASH to CONFIG_BOARD_RESET_ON_ASSERT, arch/: Implement call to board_reset() if in all implementations of up_assert() when CONFIG_BOARD_RESET_ON_ASSERT=y.
2018-08-22 17:04:39 -06:00
Gregory Nutt
22cd0d47fa
This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
...
This makes the user interface a little hostile. People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header). A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length. Instead, we define the packet buffer size then derive the MTU.
The MTU is not common currency in networking. On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP). Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes. So we should be all good and without the recurring 14 byte error in MTU's and MSS's.
Squashed commit of the following:
Trivial update to fix some spacing issues.
net/: Rename several macros containing _MTU to _PKTSIZE.
net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE. This is not the MTU which does not include the size of the link layer header. This is the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename the file d_mtu in the network driver structure to d_pktsize. That value saved there is not the MTU. The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header. The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
a94e3284b3
syslog: Enable is partial, crippled version of syslog_flush(); arch/: Call syslog_flush() from assertion handling logic.
2018-06-07 16:29:16 -06:00
Gregory Nutt
977d41d519
Based on a change recommended by Mark Shulte:
...
Signal handlers maybe run with interrupts enabled or disabled, depending on how the task the received the signal was blocked. (i.e.: If sem_wait() is called, then we disable interrupts, then block the currently running task). This could be dangerous, because user code would be running with interrupts disabled.
This change forces interrupts to be enabled in up_sigdeliver() before executing the signal handler calling up_irq_enable() explicitly. This is safe because, when we return to normal execution, interrupts will be restored to their previous state when the signal handler returns.
2018-06-06 09:54:30 -06:00
Gregory Nutt
9222f50e1c
arch/: Make sure the up_irq_enable() is available on all architectures. I will not be able to test all of these new versions of this function so this may break things for awhile.
2018-06-06 09:25:40 -06:00
Gregory Nutt
f2a89813f2
Build system: Remove fixed lib/ subdirectory and its content. Replace with new directory called staging/ that is created dynamically when building and removed when 'make clean' is done. This both improves the name and eliminates a garbage directory from the repository.
2018-05-29 11:36:21 -06:00
Gregory Nutt
b54ffe858a
Standardization of some function headers.
2018-03-13 09:52:27 -06:00
Gregory Nutt
de6b13b3ab
Per OpenGroup.org, syslog -- and, hence, nonstandard vsyslog, and debug wrappers -- does not return a value. Rename _vsyslog to nx_vsyslog. Use internal nx_vsyslog in the few cases where a return value is required.
2018-03-04 08:07:07 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
a8b6be4aaf
The existence of the network driver ioctl() method should depend on CONFIG_NETDEV_IOCTL rather than CONFIG_NETDEV_PHY_IOCTL. The former enables the method, the later enables a subset of possible driver IOCTLs. This change should be basically a no-operation. The affected ioctl methods only support those subset of driver IOCTLs selected by CONFIG_NETDEV_PHY_IOCTL and the network logic will tolerate a nul ioctl method.
2018-01-22 08:17:45 -06:00
Gregory Nutt
1c5ec07414
arch/: Remove dangling space at the end of lines.
2017-06-28 13:16:48 -06:00
Gregory Nutt
f5f1c73b54
Based on the last PR, review all serial driver vector attachment. Found one additional error and updated all relevant drivers to current interrupt parameter passing.
2017-06-12 06:22:35 -06:00
Gregory Nutt
7fe112fe4c
Kconfig/deconfigs: Add CONFIG_ARCH_TOOLCHAIN_GNU to indicate that the toolchain is based on GNU gcc/as/ld. This is in addition to the CPU-specific versions of the same definition.
2017-05-13 11:44:12 -06:00
Gregory Nutt
0de294a586
Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they.
2017-05-11 13:35:56 -06:00
Gregory Nutt
2043e1a114
IOBs: Move from driver/iob to a better location in mm/iob
2017-05-09 07:35:30 -06:00
Gregory Nutt
a55e937643
Correct mispelling
2017-04-22 17:03:34 -06:00
Gregory Nutt
79256573e1
net: network drver now retains Ethernet MAC address in a union so that other link layer addresses may be used in a MULTILINK environment.
2017-04-22 11:10:30 -06:00
Gregory Nutt
bfb93338f6
Move net/iob to drivers/iob so that the I/O buffering feature can be available to other drivers when networking is disabled.
2017-04-20 16:08:49 -06:00
Gregory Nutt
86239d4a73
Experimental change to STM32 Ethernet driver a success. Porting change to all other Ethernet drivers.
2017-03-03 14:45:09 -06:00
Mark Schulte
b3222bbc8a
irq_dispatch: Add argument pointer to irq_dispatch
...
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Gregory Nutt
8ee2e8d8b0
Most Ethernet drviers: Check if the poll timer is running before restarting it at the end of each TX.
2017-02-24 15:58:17 -06:00
Gregory Nutt
1d290c2b37
setvbuf: Add support for disabling I/O buffering. Initially cut; untested.
2017-02-09 09:24:44 -06:00
Gregory Nutt
62a1f6f110
up_timer_initialize() is named incorrectly. The prefix should be the architecture name, not up_ since it is private to the architecture. up_timerisr() is similarly misnamed and should also be private since it is used only with the xyz_timerisr.c files. Also updat TODO list.
2017-02-07 10:35:04 -06:00
Gregory Nutt
3ed091376c
In all implementations of _exit(), use enter_critical_section() vs. disabling local interrupts.
2017-01-13 11:08:24 -06:00
Gregory Nutt
13d00344c9
Add configuration to prevent selection of Windows native toolchains when using Ubuntu under Windows 10
2017-01-02 07:16:47 -06:00
Gregory Nutt
3a0413c048
Back out most of 34be3e7c3c
and update README again. Windows native tools cannot be used with Ubuntu under Windows 10 now. For Cygwin, that support depends on the 'cygpath -w' tool to convert POSIX paths to Windows paths. There is no corresponding tool for Ubuntu under Windows 10.
2017-01-01 16:29:03 -06:00
Gregory Nutt
34be3e7c3c
Add configuration support for builds with Ubuntu under Windows 10
2017-01-01 15:34:23 -06:00
Gregory Nutt
7467329a98
Eliminate CONFIG_NO_NOINTS. Lots of files changed -> lots of testing needed.
2016-12-03 16:28:19 -06:00
Gregory Nutt
43459fe75e
DM09x0 Ethernet now supports CONFIG_NET_NOINTS
2016-12-03 11:42:15 -06:00
Gregory Nutt
b29b77532f
Update some comments
2016-11-29 18:17:37 -06:00
Gregory Nutt
934aded293
arch/: Adapt all Ethernet drivers to work as though CONFIG_NET_MULTIBUFFER were set. Remove all references to CONFIG_NET_MULTIBUFFER
2016-11-29 16:06:48 -06:00
Ramtin Amin
137586f50a
Misoc LM32: Add logic to flush/invalidate caches
2016-11-29 09:09:28 -06:00
Gregory Nutt
1f9e3ae5f1
Misoc LM32: Make naming consistent, lm32_sigdeliver vs. up_sigdeliver.
2016-11-28 11:18:07 -06:00
Ramtin Amin
b568bfa813
Misoc LM3: Add Misoc Ethernet driver. Integrate network support into configs/misoc/hello. Remove configs/misoc/include/generated directory. I suppose the the intent now is that this is a symbolic link? DANGER! This means that you cannot compile this code with first generating these files a providing a symbolic link to this location!
2016-11-28 11:08:29 -06:00
Ramtin Amin
7568aaf213
Misoc LM32: Add signal handling logic
2016-11-24 12:58:23 -06:00
Ramtin Amin
b8754afb14
Misoc LM32: Make system timer configurable via CONFIG_USEC_PER_TICK.
2016-11-23 07:00:57 -06:00
Gregory Nutt
d95b8f64f5
sam4s-xplained-pro: Remove obsolete timer initialization logic
2016-11-22 12:25:57 -06:00
Gregory Nutt
054072d054
Misoc: Add commits and warnings about missing caculation of the timer reload value
2016-11-22 12:15:34 -06:00
Ramtin Amin
d1e84fb788
Misoc: Add timer driver
2016-11-22 12:10:11 -06:00
Ramtin Amin
31d9565f0f
Misoc LM32: Corrects a bug that never occured in qemu on simulation or real fpga. The error was that the r1 register was being modified out of context switching and not restoring it.
2016-11-14 07:18:33 -06:00
Ramtin Amin
693f8d743d
LM32: Move interrupt definitions from common irq.h to lm32/irq.h. Remove unused misoc_uart.c and .h
2016-11-07 10:13:53 -06:00
Gregory Nutt
424ffc76dc
LM32: Add missing _exit() logic (untested)
2016-11-07 07:31:15 -06:00
Gregory Nutt
86ef659ee5
LM32: Fix a typo in my many patching; eliminate some warnings
2016-11-07 07:16:53 -06:00
Ramtin Amin
fe2b755791
LM32: Correct some assembly language interrupt handling issues. Now the basic port seems functional.
2016-11-07 06:54:57 -06:00
Gregory Nutt
5ac9136b21
LM32: Implement some commented out logic in lm32_dumpstate
2016-11-06 10:46:11 -06:00
Gregory Nutt
45f549d2b8
LM32: Back out part of last change
2016-11-05 17:39:06 -06:00
Gregory Nutt
3f150daf96
LM32: Oops, missed one line of code in the manual application of a patch
2016-11-04 19:41:43 -06:00
Gregory Nutt
1c05eb651c
LM32: lm32_vectors.S needs to call lm32_doirq(), passing two parameters
2016-11-04 19:29:54 -06:00
Gregory Nutt
0b83e8afaa
LM32: Remove some extra spacing
2016-11-04 17:48:24 -06:00
Gregory Nutt
6cc73f0405
LM32: Fix a copy/paste error in lm32_vectors.S that I introduced.
2016-11-04 17:42:10 -06:00
Gregory Nutt
911e5abb2c
LM32: Fix various compilation errors that I introduced.
2016-11-04 17:37:10 -06:00
Gregory Nutt
5a9d3b20fa
LM32: Add README. Update hello defconfig and setenv.sh
2016-11-04 17:19:42 -06:00
Gregory Nutt
af0d7a96fe
LM32: More standard, common helper functions
2016-11-04 14:42:17 -06:00
Ramtin Amin
45caca804a
LM32: Progress on interrupt and serial driver.
2016-11-04 14:04:43 -06:00
Gregory Nutt
8fe916e133
Attach the software interrupt handler when interrupts are intialized.
2016-11-04 11:23:33 -06:00
Gregory Nutt
50efe4a906
LM32: Add a fake IRQ number for a software interrupt.
2016-11-04 11:17:12 -06:00
Ramtin Amin
b2126738cd
LM32: Fix implementation of up_irq_save() and up_irq_restore()
2016-11-04 10:54:10 -06:00
Gregory Nutt
ddd8716189
LM32: Ooops.. last version still in editor
2016-11-04 10:42:05 -06:00
Gregory Nutt
145ee2e6f1
LM32: Add prototype for lm32_decodeirq().
2016-11-04 10:39:57 -06:00
Gregory Nutt
8f3c59b0d6
LM32: Rename up_doirq() to lm32_doirq()
2016-11-04 10:21:55 -06:00
Gregory Nutt
e6435c28d0
Fix some name errors in port: RISC-V -> LM32
2016-11-04 09:58:27 -06:00
Gregory Nutt
cb96e632fa
LM32: Add toolchain configuration; Add Toolchain.defs.
2016-11-03 07:21:25 -06:00
Ramtin Amin
b5a94e255a
Misoc/LM32: Changes to get a clean compilation after initial review and commit
2016-11-02 12:07:52 -06:00
Gregory Nutt
1787a8143e
Misoc: Logic on common directory should not include ANY lm32 specific header file. The generic header file chip.h can be exported by all architectures and that is what should be included instead of lm32.h which is an inappropriate dependency.
2016-11-01 14:18:21 -06:00
Ramtin Amin
0088f24603
MISOC LM32: Add arch/src/common directory
2016-11-01 12:47:35 -06:00
Ramtin Amin
000e10470c
MISOC LM32: Add arch/src/lm32 directory
2016-11-01 11:35:27 -06:00
Ramtin Amin
62b394d06f
LM32: First of many LM32 source files
2016-11-01 08:10:14 -06:00
Ramtin Amin
6a78c0f113
LM32: Add Kconfig files
2016-11-01 07:20:44 -06:00