Commit Graph

33431 Commits

Author SHA1 Message Date
Gregory Nutt
61fd244fd3 Add support for the Maxim Integrated MAX32660-EVSYS board.
Squashed commit of the following:

    arch/arm/src/max326xx and configs/max32660-evsys/nsh/defconfig:  Work out some issues related to MAX326xx configuration.

    configs/max32660-evsys:  Add unverified board support framework.
2018-11-17 13:24:09 -06:00
Anthony Merlino
4d574e7a60 Merged in antmerlino/nuttx/stm32f2-write-protect (pull request #762)
arch/arm/stm32: stm32_flash_writeprotect supported the same for STM32F20XX as STM32F4XXX

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-17 17:29:29 +00:00
Gregory Nutt
a427a40bd0 arch/arm/src/max326xx/chip: Add MAX32660 SPIMSS register definition header files. 2018-11-17 11:21:29 -06:00
Gregory Nutt
1527720be9 arch/arm/src/max326xx/chip: Add SPI register definition header file. 2018-11-17 10:47:57 -06:00
Gregory Nutt
854f171c66 arch/arm/src/max326xx/chip: Add I2C register definition header file. 2018-11-17 09:19:17 -06:00
Mateusz Szafoni
6673ae3e9c arch/arm/src/stm32/stm32_pwm.c: STM32 MOE is not being appropriately handled for PWM for advanced timers. It is only ever reset and so no PWM train is generated. This change addresses this. Noted by Dave Marples. 2018-11-17 06:55:19 -06:00
Alan Carvalho de Assis
98c3c44918 configs/stm32f429i-disco/lvgl/defconfig: Fix lvgl demo removing STM32_FB_CMAP. 2018-11-17 06:37:05 -06:00
Gregory Nutt
8000e0b263 arch/arm/src/max326xx/Kconfig: Needs to select CONFIG_UARTn_SERIALDRIVER. 2018-11-17 06:36:25 -06:00
Gregory Nutt
13d902a0a5 arch/arm/src/max326xx: Bring in some mostly standard, ARMv7-M, 'boilerplate' files. 2018-11-16 15:33:01 -06:00
Gregory Nutt
1fd9eb6069 net/pkt: pkt_input() should not report an error using the nerr() macro when the PKT tap does not need the packet. That is not an error. Use ninfo() instead. 2018-11-16 13:48:30 -06:00
Gregory Nutt
06f132c5d0 Brings in WIP port for the Maxim Integrated MAX326xx MCU family. Not really very much in place yet so marked EXPERIMENTAL in Kconfig file.
Squashed commit of the following:

    Update a README.  Mark MAX326XX as EXPERIMENTAL before bringing into master.
    arch/arm/src/max326xx/chip:  Add MAX32660 TMR register definition header files.
    arch/arm/src/max326xx/chip:  Add MAX32660 WDT register definition header files.
    arch/arm/src/max326xx/chip:  Add MAX32660 RTC register definition header files.
    arch/arm/src/max326xx/chip:  Add MAX32660 UART register definition header files.
    arch/arm/src/max326xx/chip:  Add DMA register definition header files.
    Update some comments explaining what is meant by a 'chip family'
    arch/arm/src/max326xx/chip:  Add GPIO register definition header files.
    arch/arm/src/max326xx/chip:  Add FLC register definition header files.
    arch/arm/src/max326xx/chip:  Add FCR, PWRSEQ, and SIR register definition header files.
    arch/arm/src/max326xx/chip:  Add ICC register definition header file.
    arch/arm/src/max326xx/chip:  Add memory map header files.
    arch/arm/include/max326xx:  Minor fleshing out.
    arch/arm/arm/include/max326xx: Add basic support for Maxim MAX326xx family.  arch/arm/Kconfig and arch/arm/src/max326xx/Kconfig:  Add basic condiguration support for the MAX326xx.
2018-11-16 13:17:47 -06:00
Gregory Nutt
97b0235d77 s/dirent: Corrects a problem with opendir() noted by Petteri Aimonen in Bitbucket Issue 132: "opendir() fails for FAT filesystem with trailing slash in path":
I see the following behaviour on NuttX 7.26, where I have SD card mounted on /flash and a directory called "frm" on it:

opendir("/flash")  returns  (DIR *) 0x1000c580
opendir("/flash/") returns (DIR *) 0x1000c5d0
opendir("/flash/frm")  returns (DIR *) 0x1000c620
opendir("/flash/frm/")  returns (DIR *) 0x0

From POSIX specs for opendir(): "A pathname ... that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname."

So for mount points, opendir() works correctly, but for FAT32 filesystem it fails to open directory if the path has a trailing slash. I'm not quite sure how to cleanly fix this. Stripping the trailing slash in opendir() would require allocating a separate buffer, while fixing it in the FAT32 code seems somewhat complex due to the short/long filename logic.

It is not a big issue for me, I'm just going to fix it on the application side. But still a small portability and standards compliance issue.

NOTE: You would not see this problem if you call opendir() indirectly in NSH (like 'ls -R /') because NSH contains logic to remove trailing '/' characters from paths.
2018-11-16 11:45:18 -06:00
uha Niskanen
23aa2839c3 libs/libc/netdb/lib_dnsquery.c: harden against DNS spoofing. This commit implements most of the RFC 5452 guidelines for making DNS more resilient. We now verify response matches against what was queried and use unpredictable query IDs. It is also checked that response come from correct DNS server. Also fixes a buffer overflow when querying hostnames longer than CONFIG_NETDB_DNSCLIENT_NAMESIZE. 2018-11-16 06:56:45 -06:00
Gregory Nutt
be1567d924 Trivial changes from review or last PR. 2018-11-15 15:08:02 -06:00
David Sidrane
2a13f13c0f Merged in david_s5/nuttx/master_imxrt_headers (pull request #761)
imxrt:Add FLEXPWM

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-15 21:02:38 +00:00
David Sidrane
a92a025e5f Merged in david_s5/nuttx/master_f4_446_469_GPIO (pull request #760)
stm32:STM32F446 & STM32F469 correct PC1 SPI assignments

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-15 17:14:49 +00:00
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
Gregory Nutt
a087df2647 Merge remote-tracking branch 'origin/nuttx-7.27' 2018-11-14 16:07:59 -06:00
Gregory Nutt
052ff5ee84 Update the NuttX 'About' Document in preparation for the 7.27 release. 2018-11-14 14:38:21 -06:00
Gregory Nutt
60effd59be ChangeLog: Update ReleaseNotes in preparation for 7.27 release. 2018-11-14 13:30:09 -06:00
Juha Niskanen
eee6c89bfb drivers/input/button_upper.c: Fix two bad NULL checks 2018-11-14 06:31:37 -06:00
Juha Niskanen
5129e4dd60 ibs/libc/netdb: Make DNS retries configurable 2018-11-14 06:30:49 -06:00
David Sidrane
c6db972702 - imxrt: Add PIT, GPT, and QIMER(TMR) header files
Squashed commit of the following:

    imxrt: Add QTIMER(TMR)
    imxrt: Add GPT
    imxrt: Add PIT
2018-11-13 16:34:59 -06:00
Gregory Nutt
627195d066 ChangeLog: Update ChangeLog in preparation for the 7.27 release. 2018-11-13 16:15:51 -06:00
Dave Marples
9b68efe251 arch/arm/src/imxrt/imxrt_usdhc.c: Improve SD card handling in the DMA case. For now I think we can consider this complete for both Interrupt and DMA transfers. There is other stuff to add (high speed, low voltage, DDR etc.) later, 2018-11-13 06:41:27 -06:00
Dave Marples
50a1b9eddf arch/arm/src/imxrt: This commit complete the interrupt driven USDHC1 functionality for the IMXRT EVKB. There is more work to be done to complete DMA mode and further changes will follow. 2018-11-12 13:47:44 -06:00
Gregory Nutt
a42c5e57fc Cosmetic updates from review of last PR. 2018-11-12 09:53:44 -06:00
Mateusz Szafoni
becb667f56 Merged in raiden00/nuttx_pe (pull request #758)
stm32/stm32_adc: major refator

stm32/stm32_adc: use STM32 ADC IP core version and ADC available functions instead of chip family names in conditional compilation

stm32/chip: replace family specific ADC headers with STM32 ADC IP core version headers

stm32/stm32_adc: configurable sample time supported for all chips, not only L1

stm32/stm32_adc: enable/disable interrupts supported for all chips, not only L1

stm32/stm32_adc: resolution configuration

stm32/stm32f33xxx_adc: remove wrong assertion

configs/nucleo-f303ze: support for ADC and ADC example

configs/stm32f429i-disco: support for ADC and ADC example

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-12 15:45:55 +00:00
Gregory Nutt
1a754deaa0 Cosmetic updates from review of last PR. 2018-11-12 09:43:33 -06:00
Petteri Aimonen
fe0532c226 Merged in paimonen/nuttx/pullreq_libc_libnx_updates (pull request #757)
Pullreq libc libnx updates

* NuttX: make strerror() return 'Success' for 0

* NuttX: fix strrchr() so that it considers null terminator as part of string

    From strrchr(3) man page:
    "The terminating null byte is considered part of the string, so that if c
    is specified as '\0', these functions return a pointer to the terminator."

* NuttX: mm_free(): Add DEBUGASSERT()'s to catch memory corruption early.

    It's easier to find the source when asserts fail already when freeing
    an overflowed buffer, than if the corruption is only detected on next
    malloc().

* MM_FILL_ALLOCATIONS: Add debug option to fill all mallocs()

    This is helpful for detecting uninitialized variables,
    especially in C++ code. I seem to be forgetting to initialize
    member variables and then they just get random values..

* NuttX: nxtk_bitmapwindow: Fix warning message when bitmap is fully off-screen.

* nxfonts_getfont: Avoid unnecessary warnings for other whitespace chars also.

* NuttX: Fix kerning of 'I' in Sans17x22 font

    The I character was running together with some other
    characters, e.g. in sequence "IMI".

* NXMU: Revalidate window pointer for mouse events.

    NXMU caches the previous window pointer so that further mouse
    events can be sent to the same window. However, if the window
    is destroyed while mouse button is held down, the pointer may
    become invalid and cause a crash. This patch revalidates the
    pointer before using it.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-12 15:36:35 +00:00
Xiang Xiao
f337cc1380 sched/clock/ timekeeping: Use clock_basetime() to initialize g_clock_wall_time to get the best initial RTC value and initialize g_clock_last_counter too since the hardware may not start counting from zero. 2018-11-12 07:00:41 -06:00
Xiang Xiao
2bc709d4b9 sched/clock/clock_initialize.c: clock_inittime() needs to be done with CONFIG_SCHED_TICKLESS and clock_initialize should skip clock_inittime() for external RTC case since the RTC isn't ready yet. 2018-11-12 06:55:53 -06:00
Xiang Xiao
f0c5c75042 sched/clock/: Don't call up_timer_gettime in clock_gettime and clock_systimer to ensure the return value from them consistent with clock_systimespec 2018-11-12 06:52:56 -06:00
Xiang Xiao
46bd8798c5 ched/clock/: Remove g_monotonic_basetime and g_clock_monotonic_time since we don't need ensure monotonic time start from zero as state here: http://pubs.opengroup.org/onlinepubs/009696899/functions/clock_getres.html 2018-11-12 06:50:37 -06:00
Xiang Xiao
1ef2602933 sched/clock/clock_getres.c: Support CLOCK_MONOTONIC 2018-11-12 06:42:38 -06:00
Xiang Xiao
77098f8736 Move NETDEV_LATEINIT from drivers/net/Kconfig to net/Kconfig so that we can select NETDEV_LATEINIT without enabling NETDEVICES since the net driver in arch folder may need to initialize later too. 2018-11-12 06:36:26 -06:00
Gregory Nutt
d94bd49b78 net/mld: Fix a typo in conditional compilation. Clean up return values from mld_ngroups(). 2018-11-11 16:23:18 -06:00
Gregory Nutt
9b1025ca1b net/mld/mld_group.c: Fixed failure to stop queries. This turned out to be an uninitialized variable. I wonder why there was no warning from GCC? 2018-11-11 15:25:16 -06:00
Gregory Nutt
610c187e96 net/procfs/netdev_statistics.c: Eliminate warning: array subscript is above array bounds. 2018-11-11 14:28:15 -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
Xiang Xiao
e4106a3744 arch/ assertions files: up_registerdump capture the general register if not yet saved and up_saveusercontext is implemented, the register dump is very useful to find the cause of failure. 2018-11-11 12:50:50 -06:00
Xiang Xiao
084904c40b arch/arm/src: Remove general register dump from fault handler since the same info already dump in PANIC 2018-11-11 12:47:03 -06:00
Gregory Nutt
002f09f2da net/mld: Fix logic error when testing for the case where all members have left. Still does not work. The end result is that the query timer no longer stops. Not when another another querier with a lower IP is present or when all of the members have left. Basically just can't stop querying under any condition. 2018-11-11 12:43:12 -06:00
Gregory Nutt
bfa8c362c6 net/devif/devif_loopback.c: Fix warning: implicit declaration of memcmp. 2018-11-11 11:56:37 -06:00
Gregory Nutt
8a3fc26b74 Squashed commit of the following:
The MLD implementation did not follow the RFC correctly when it is the Querier.  The Querier should use a general query and get query messages from all members of all groups.  This would be driven by a single timer per sub-nset since all groups are queried at once. Instead, the design used a Multicast Address Specific Query with one timer per group and ignores groups that we are not members of.

    Similary, the MLDv1 compatibility timer should be a single, separate timer, not a per-group timer.

    net/mld: Group may be NULL when sending a general query
2018-11-11 11:38:29 -06:00
Gregory Nutt
f14cf966c9 TODO: Minor clarification. 2018-11-11 08:03:45 -06:00
Gregory Nutt
591b03aa7d net/mld/mld_query.c: Eliminate a warning: implicit definitino of memcmp. 2018-11-11 07:36:52 -06:00
Gregory Nutt
1a56229386 net/mld: Resolve and issue with sending reports from multiple groups in the same polling cycle. 2018-11-11 07:31:59 -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