Gregory Nutt
3502425221
drivers/net/tun.c: Packet buffer size should include the configured GUARD_SIZE. And, given how the buffers are allocated, the allocation size must be an even number of 16-bit values to preserve alignment.
2019-02-24 09:52:18 -06:00
Gregory Nutt
4d3dd73e57
drivers/net/tun.c: Re-order all TUN/TAP driver state data. Not only was was with wasting memory due to alignement requirements, it was also causing network packet buffers to be improperly aligned causing problems because the network requires 16-bit packet buffer alignment for uint16_t accesses. This alignment problem was discovered by Alan Carvalho de Assis.
2019-02-24 09:43:30 -06:00
Gregory Nutt
11eb7ef4f8
Minor fixed to documents and C comments.
2019-02-23 17:46:43 -06:00
David Sidrane
8de101ca18
Merged in david_s5/nuttx-2/david_s5/imxrt_adcerror-in-offset-1550865183857 (pull request #828 )
...
imxrt_adc:Error in offset
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-22 19:58:39 +00:00
Gregory Nutt
a5183e3460
include/poll.h and include/nuttx/compiler.h: Update some comments; improved a conditional test.
2019-02-21 18:06:53 -06:00
Gregory Nutt
94fe5c8349
include/poll.h: Remove un-named union from 'struct pollfd'. It is not required by OpenGroup.org and violates the NuttX C coding standard because it is not C89 compatible.
2019-02-21 17:40:30 -06:00
Gregory Nutt
40889daf97
libs/libc/stdio/lib_libvsprintf.c and include/limits.h: Some minor corrections.
2019-02-21 14:52:44 -06:00
Gregory Nutt
d7586c27a5
libs/libc/stdio/Kconfig: Add 'range 9 999999' to CONFIG_LIBC_NL_ARGMAX. Per OpenGroup.org, the minimum value for NL_ARGMAX is 9.
2019-02-21 14:04:46 -06:00
Gregory Nutt
533fd0636e
libs/libc/lib_libvsprintf.c and Kconfig: Remove CONFIG_LIBC_PRINT_MINIMAL. The output in that configuration is unsatisfactory and inappropriate for use with NuttX. For example, the output from many NSH commands become corrupted and useless. Doesn't belong in this context.
2019-02-21 13:53:34 -06:00
Johannes
0059a5a88e
libs/libc/stdio/lib_vsprintf.c and Kconfig:
...
- Numbered arguments now work by using two pass parsing and an argument list.
The maximum number of numbered args is determined by CONFIG_LIBC_NL_ARGMAX
which is then copied into NL_ARGMAX.
- Size of pointer argument ('p') is determined before output.
include/limits.h: Define NL_ARGMAX (as well as some of the other 'invariant
values' per http://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html )
2019-02-21 13:26:33 -06:00
Gregory Nutt
146c398eff
libs/libc/stdio/lib_libvsprintf.c: Fix typo: PRINTF_LEVEL, not PRINT_LEVEL.
2019-02-20 08:40:27 -06:00
Gregory Nutt
05a68d175b
libs/libc/stdio/Kconfig: CONFIG_LIBC_NUMBERED_ARGS now depends on EXPERIMENTAL. Per Johannes: I tested numbered arguments on i.mx rt 1050, and it isn't working. Only on Linux/MSYS 64bit all relevant data types are size 8 bytes, and therefore my loop through the arg list is working. On 32bit systems, all is 4 bytes except floating point variables which is implicit 8 byte double.
2019-02-20 08:00:35 -06:00
Gregory Nutt
432f487581
arch/arm/src/stm32h7 and stm32l4: Apply David Sidrane's fix for the STM32F7 to the STM32L4 and STM32H7. The same change might be appropropriate to STMF0/LO and STM32, but the patch does not apply cleanly. It would have to be manually checked.
2019-02-19 14:47:27 -06:00
David Sidrane
44919b6723
arch/arm/src/stm32f7/stm32_i2c.c: Fix another memory access issue on a bus error.
2019-02-19 14:47:05 -06:00
Johannes
88130512b8
libs/libc/stdio/lib_libvsprintf.c: Cleaned naming and allow for leading zeros in argument number (which doesn't make sense but should be).
2019-02-19 13:08:54 -06:00
Anthony Merlino
840dab8c47
Merged in antmerlino/nuttx/elf-cplusplus-guard (pull request #826 )
...
include/nuttx/elf.h: Adds missing extern "C" __cplusplus guard.
Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-19 15:24:25 +00:00
Gregory Nutt
e982488e6c
include/nuttx/compiler.h: Important fix for C++ users. compiler.h was using the value of __STDC_VERSION__ to determine if inline functions are supported or not. If not then the keyword inline was defined out. Good for C but bad for C++ because C++ does not defined __STDC_VERSION__ at all. C++ applications may draw in compiler.h indirectly via other head files and this can result in C++ compiler problems since 'inline' is defined out. This fix is to ignore the (undefined) __STDC_VERSION__ if __cplusplus is defined.
2019-02-19 09:04:04 -06:00
Gregory Nutt
7f11a45895
Update README files.
2019-02-18 17:54:28 -06:00
Gregory Nutt
2fbec4cdf6
Doumentation/NuttxPortingGuide.html: Add description of board_early_initialize() and board_late_initialize().
2019-02-18 17:36:11 -06:00
Gregory Nutt
32a300806e
Let's rename board_driver_initialize() to board_early_initialize() to emphasize its relationship to board_late_initialize().
2019-02-18 16:25:08 -06:00
Gregory Nutt
a76e137ce2
Squashed commit of the following:
...
sched/init/nx_start.c: Add support for CONFIG_BOARD_DRIVER_INITIALIZE. If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().
Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.
Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Johannes
77aa1f1179
libs/libc/stdio/Kconfig: Need to guard LIBC_NUMBERED_ARGS against LIBC_LEGACY_PRINTF
2019-02-18 15:26:41 -06:00
Johannes
698d942f8d
libs/libc/stdio/lib_libvsprintf.c: Adds configurable support for numbered arguments.
2019-02-18 11:51:22 -06:00
Gregory Nutt
d9d2042f75
Revert "tools/check-hash.sh: Add a tool check hash on downloaded packages."
...
This tool was supposed to go to apps/tools, not nuttx/tools.
This reverts commit 41245f421e
.
2019-02-18 07:20:41 -06:00
Gregory Nutt
95746be5a2
arch/xtensa/src/esp32/esp32_timerisr.c: Fix backward comparison.
2019-02-17 18:02:26 -06:00
Gregory Nutt
a971171695
libs/libc/stdio/Make.defs: Make that else, not #else.
2019-02-17 16:07:54 -06:00
Gregory Nutt
3ff42a846e
libs/libc/stdio: Rename all nano_*.c and nano_*.h files to lib_*.c and lib_*.h to emphasize that these are now the defaults, not an optional implementation.
2019-02-17 12:29:50 -06:00
Gregory Nutt
f12eda8a05
libs/libc/stdio: Rename lib_dtoa.c to legacy_dtoa.c; rename lib_libvsprint.c to legacy_libvsprintf.c
2019-02-17 12:29:35 -06:00
Gregory Nutt
76a2f6c2a2
libs/libc/stdio: This commits makes the nano-printf the defualt logic for the printf family. The legacy printf is still available via CONFIG_LIBC_PRINT_LEGACY. This commit also modifies the nano-prinf configure: The PRINT_LEVEL is not long selectable. Instead, a not CONFIG_LIBC_PRINT_MINIMAL boolean setting was added and the PRINT_LEVEL is derived from a combination of CONFIG_LIBC_PRINT_MINIMAL, CONFIG_LIBC_FLOATINGPOINT, and CONFIG_LIBC_LONG_LONG.
2019-02-17 12:29:20 -06:00
Gregory Nutt
bc5908d9fd
tools/nxstyle.c: Beef up logic that detects multiple variable definitions per line.
2019-02-17 10:57:28 -06:00
Johannes
af75330012
libs/libc/stdio/nano_libvsprintf.c: Added hh type modifier (without extending the flag variable).
2019-02-17 07:27:47 -06:00
Gregory Nutt
738be875eb
arch/arm/src/tiva/hardware/tm4c/tm4c123_i2c.h: Correct some kruft that was left behind when this file was split out. Caused failures in build testing.
2019-02-16 18:42:26 -06:00
Gregory Nutt
67b16613ba
libs/libc/stdio/lib_dtoa.c: Lots of risky turmoil to get this file closer to the NuttX coding style. Seems to check out, but still risky. libs/libc/stdio/lib_libdtoa.c: A fix for the %g format. The algorithm will sometimes generate number greater than the precision of type double. This adds a check if the precision has been exceeded and logic to remove the least significant garbage.
2019-02-16 18:08:38 -06:00
raiden00pl
79b3bec208
Merged in raiden00/nuttx_lora (pull request #825 )
...
Master
arch/arm/src/stm32f0l0: SPI support for F0
arch/arm/src/stm32f0l0/Kconfig: L0 parts should select STM32F0L0_STM32L0
arch/arm/src/stm32f0l0/hardware: unify names for ADC/DAC/DMA/CAN
drivers/wireless/lpwan/sx127x/sx127x.c: return immediately when ISR0 is called but sx127x is not initialized
configs/nucleo-f091rc: support for sx127x
configs/nucleo-l073rz: cosmetics
configs/b-l072z-lrwan1/include/board.h: use HSI as default clock source and fix typo in SPI1 pins
Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-16 20:53:16 +00:00
Gregory Nutt
4746b0cdd7
arch/arm/src/tiva/hardware/tiva_wdt.h: Add WDT register definition header file for all LM, Tiva, and CC13xx parts.
2019-02-16 14:49:23 -06:00
Gregory Nutt
c7599ac714
arch/arm/src/tiva/hardware/lm/lm_i2c.h: Fix missing #endif.
2019-02-16 13:56:00 -06:00
Gregory Nutt
653ff2c34e
Restore lib_sprintf(). It was removed because I thought was not used. But I was wrong; there is logic in drivers/syslog that depends on lib_sprintf().
...
This commits reverts a part of commit c271151d57
. That commit also removed lib_sscanf() which really is not needed.
2019-02-16 12:29:00 -06:00
Gregory Nutt
3131195d7a
arch/arm/src/tiva/hardware: Fix a typo in the new CC13xx I2C header files. Found in build testing.
2019-02-16 10:06:57 -06:00
Johannes
739561ab34
libs/libc/stdio/Make.defs: lib_dtoa.c is only used in the LIBC_CONFIG_NANO_PRINTF=n case.
2019-02-16 09:45:13 -06:00
Gregory Nutt
9ca5d71924
syscall/syscall.csv: Change 626afb015b
needed to change mqueue function protothypes in the KERNEL mode proxies as well. Failures found in build testing.
2019-02-16 09:39:15 -06:00
Gregory Nutt
d1f65b127e
arch/arm/src/tiva/hardware: Add CC13x0 and CC13x2 I2C header files.
2019-02-16 09:32:38 -06:00
Gregory Nutt
4bd2a9e1b2
libs/libc/stdio/nano_libvsprintf.c: Fix compile error introduced by my review of last commit. Fix some coding standard violations and a few other cosmetics.
2019-02-16 06:28:23 -06:00
Michał Łyszczek
626afb015b
nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html
2019-02-15 19:18:55 -06:00
Johannes
41a4a40879
libs/libc/stdio/nano_libvsprintf.c: Add long long support. CONFIG_LIBC_LONG_LONG needs at least CONFIG_NANO_PRINTLEVEL 2. Code size for compile without CONFIG_LIBC_LONG_LONG shouldn't be affected.
2019-02-15 19:10:40 -06:00
Gregory Nutt
72bc331217
Cosmetic update to some comments.
2019-02-15 18:26:06 -06:00
Gregory Nutt
c271151d57
libs/libc/stdio: Remove unused, non-standard functions lib_sscanf() and lib_sprintf().
2019-02-15 18:01:39 -06:00
Gregory Nutt
928108036c
libs/libc/stdio: In the recent changes we lost the implementation of vsscanf(). This commit restores vsscanf(). sscanf() is not just a front end for vsscanf().
2019-02-15 17:31:58 -06:00
Gregory Nutt
d0bd4c959d
arch/arm/src/tiva/hardware/tiva_ssi.h: Fix typo error found in build testing. libs/libc/stdio/lib_libsscanf.c: Fix warnings found in build testing.
2019-02-15 14:38:06 -06:00
Gregory Nutt
4dc0636f1e
libs/libc/stdio: Add support for %g format which, for these purpose, is equivalent to %f except that trailing zeroes are suppressed.
2019-02-15 11:45:25 -06:00
Gregory Nutt
5739179109
Upate Kconfig comments
2019-02-15 10:04:57 -06:00