Xiang Xiao
dbf01d12b7
Assertions: Identify the running task correctly when dumping task state information. It takes time to switch to the target task after g_readytorun has been modified. If panic/assert happen during this period, the dump will contain the incorrect and confusing information due to the difference between the real running task and the return value of this_task(). This change resolve this problem by adding g_running_task to track the real running task through the context switch.
2018-11-15 07:11:51 -06:00
Xiang Xiao
543f4ed8ec
arch/ all assertion functions: up_assert move the register dump to first make the more important info first
2018-11-11 12:53:59 -06:00
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