Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Fix warning: selects SDIO_DMA or SDIO_BLOCKSETUP which has unmet direct dependencies (MMCSD)
Fix warning: selects NETDEV_TELNET which has unmet direct dependencies (NETDEVICES && NET && NET_TCP)
Fix warning: selects ARCH_PHY_INTERRUPT which has unmet direct dependencies (NETDEVICES && ARCH_HAVE_PHY)
Fix warning: selects USBHOST_HAVE_ASYNCH which has unmet direct dependencies (USBHOST)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Author: liuhaitao <liuhaitao@xiaomi.com>
clicker2-stm32/mrf24j40-mac: enable SCHED_LPWORK config to fix build break
ieee802154/mac802154_internal.h:75:4: error: #error Both Low and High priority work queues are required for this driver
75 | # error Both Low and High priority work queues are required for this driver
| ^~~~~
ERROR: arm-none-eabi-gcc failed: 1
nucleo-f303re/nxlines: enable NXSTART_EXTERNINIT config to fix build break
arm-none-eabi-ld: /var/lib/jenkins/workspace/NuttX-Nightly-Build/nuttx/staging/libgraphics.a(nxmu_start.o): in function `nx_server':
nxmu_start.c:(.text+0x2): undefined reference to `board_lcd_initialize'
arm-none-eabi-ld: nxmu_start.c:(.text+0xc): undefined reference to `board_lcd_getdev'
make[1]: *** [nuttx] Error 1
Disable cxx new long to fix build break for some sam34 boards configs
Build fail log as below:
CXX: libxx_new.cxx
libxx_new.cxx:66:7: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]
66 | void *operator new(unsigned long nbytes)
| ^~~~~~~~
Makefile:102: recipe for target 'libxx_new.o' failed
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
sama5d3-xplained:ethernet-over-phy configuration found in build testing:
arch/arm/src/sama5/sam_irq.c: Fix "Control reaches end of non-void function " warning
arch/arm/src/sama5/sam_udphs.c: Fix "unused variable 'epno'" warning
boards/arm/sama5/sama5d*-*/src/sam_usb.c: Fix "warning 'HAVE_USBHOST' not defined" warnings
Kconfig: the CONFIG_WINDOWS_NATIVE options now depends on CONFIG_EXPERIMENTAL. The Windows native build is complete and available, but not often used or verified. As a consequence, it cannot be assured to be fully functional at any given time. Hence, it is marked here as EXPERIMENTAL so that the end user will be aware of this state.
boards/arm/stm32/stm32f4discovery/configs/winbuild/defconfig: Add CONFIG_EXPERIMENTAL to the windbuild configuration. It is now necessary for this configuratino to be a viable test configuration.
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
* arch/arm/src/nrf52/hardware/nrf52_twi.h: fix typo
* arch/arm/src/nrf52/nrf52_i2c.c: add interrupts support and some debug messages
* boards/arm/nrf52/nrf52840-dk: add support for hts221 and lsm303agr; boards/arm/nrf52/nrf52840-dk: fix issues noted by nxstyle
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run nxstyle again .c file and fix error message
Author: Daniel P. Carvalho <danieloak@gmail.com>
Add SPWM example to test STM32L4 PWM driver low level operations.
Fix BUGs.
1. No .c file should include a "Public Types" section. Only a header file can define a public type. A .c file can only define a private type. Several files contained private type definitions. The section that they were defined in, however, was incorrectly named "Public Types." Those were easilty changed to "Private Types" which is what they are.
2. No .c file should include a "Public Function Prototypes" section. All global function prototypes should be provided via a header file and never declared with a .c file.
For No. 2, I corrected as many cases as was reasonable for the time that I had available. But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file. This is bad programming style. These declarations should all be moved to the proper header files.
Here is the email loop talk about why it is better to remove the option:
https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0
Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run nxstyle against .c .h files and fix it
Author: Adam Feuer <adam@starcat.io>
Summary
Adds CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained
(and maybe other boards) (most of the code was there already,
but didn't work out of the box for the SAMA5D36-Xplained)
Only SAMA5D36-Xplained has been tested so far
Impact
None if you don't use the CDC ECM Ethernet driver
On SAMA5D36-Xplained, this adds high-speed Internet connectivity
over USB 2.0 High Speed. via the USB CDC ECM Gadget driver.
It may work on other boards too.
This also fixed full-speed (low-speed) mode for the board too.
Limitations
Hasn't been tested on anything other than SAMA5D36-Xplained board.
TODO
Ideally this would include a composite RNDIS device so it would
also work seamlessly on Windows. That is for a future PR
Ideally this would include software to help configuration via
mDNS/DNS-SD for plug and play compatibility with Linux and macOS.
That is for a future PR.
Detail
Only a few lines of C driver code needed to be changed, since the
capability was there already. The rest is config and documentation.
Changes the SAMA5D3-Xplained board bringup to match the SAMA5D3-EK
board bringup
A helper script to configure Linux routing and iptables NAT is also
provided, along with documentation on how to use it.
Testing
Manual, on a Ubuntu Linux 19.10 system and MacOS 10.14.6 Mojave
MacBook Pro.
How To Verify
Follow the new CDC ECM Ethernet over USB instructions in the board
README.txt file
Commits:
remove non-UTF-8 chars in comment and reformat
removed unneeded comment markers
instructions for using the defconfigs
removed EMAC from config
- to prove this example only needs the CDC ECM Ethernet over USB to work
added CDC-ECM Ethernet over USB info to README
added U-Boot image
added netusb helper script
- this can configure the Linux network interface and routes
so you can ping or access the NuttX system via TCP/IP.
renamed defconfig dirs to be ethernet-over-usb
- was usb-over-ethernet which is not right
added USB DMA to defconfigs
updated readme with autoboot and debugging info
bringing ethernet-over-usb examples into parity
added cdc ecm ethernet over usb with telnetd config
added defconfig
only use phy interrupt if netdevices is ethernet
- because now netdevice could be CDC ECM ethernet over usb
which has no PHY interrupt
add bringup to Makefile
add bringup
app init cleanup
init cdc ecm driver and rndis driver; some cleanup
fixed some typos and odd characters
usb over ethernet working over usb 2.0 hs
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run nxstyle to check .c and .h files and fix reported issues
Author: liuzhao <happypapa@yeah.net>
Add Quectel EC20 4G LTE Module USB CDC/ACM support
This function fails to compile due to numerous undeclared register definitions used in cxd56_audio_bca_reg.c. This commit replaces the undefined definitions with very similar definitions recommended by GCC (differing only in some spelling).
However, I cannot be certain that this is correct. This must be reviewed, corrected, and verified by Alin Jerpelea. Please do not merge until Alin approves.
The configuration that demonstrates the failure is spresense:audio.
nrf52: add support for GPIO interrupts
nrf52: add macros to decode GPIO PIN and GPIO PORT
nrf52: various cosmetic changes
nrf52: fix GPIO P1 memory address
boards/nrf52840-dk: add support for SPI
boards/nrf52840-dk: add support for LSM6DSL sensor
boards/nrf52840-dk: add support for SX127X radio
Author: Alan Carvalho de Assis <acassis@gmail.com>
Check all .c and .h against nxstyle and fix it.
Author: Alin Jerpelea <alin.jerpelea@sony.com>
fs: smartfs: Fix over capacity write
When the remaining capacity of flash is one sector, if a new root
directory is created by file open, then the root directory's chain is
broken and it causes to SmartFS filesystem crash. Once this fatal
problem occurs, it's impossible to recover even if the system reboot.
Fix it by finally update link of root directory.
fs: smartfs: Fix buffer overrun
fs: smartfs: Fix uninitialized variable warnings
fs: smartfs: Memory leak fix
boards: cxd56xx: Update spresense board.h
- Fix PMIC assignment
- Add specific pin configurations for spresense
- Remove unnecessary definitions
arch: cxd56xx: Add ITM syslog init at startup
arch: cxd56xx: Enable DMA settings dynamically
Author: Alan Carvalho de Assis <acassis@gmail.com>
Fix small typos and check against nxstyle
Author: Gregory Nutt <gnutt@nuttx.org>
boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.
The removal of (void) from all functions whose return value has been ignored has introduced several new warnings into the build test output. For example in lpc3_appinit(), I now see this:
# define nsh_spifi_initialize() (OK)
and
nsh_spifi_initialize();
which generaterd a new warning: "warning: statement with no effect [-Wunused-value]". This commit fixes that warning.
Author: Alan Carvalho de Assis <acassis@gmail.com>
Verify all .c and .h against nxstyle, fixed the Mixed cases
Author: Alin Jerpelea <alin.jerpelea@sony.com>
cxd56xx improvements (#48)
* arch: cxd56xx: Add size limitation for I2C SCU xfer
This is a fw restriction, unroll loop because it can be transfer
up to 16 bytes.
* arch: cxd56xx: Fix lack of leave_critical_section
add the missing leave_critical_section
* arch: cxd56xx: Remove unnecessary file
this header is duplicate and we can remove it
* arch: cxd56xx: Cosmetic change
remove space after function
* arch: cxd56xx: update topreg registers
the topreg registers are updated to match the cxd5602 HW
* arch: cxd56xx: Add voltage setting for low battery notification
Add voltage setting for low battery notification
* arch: cxd56xx: Improve perfomance of SD card
Improve a problem that the clock of SD Host Controller is lower than the
expected value in SDR25 transfer mode.
* arch: cxd56xx: Cosmetic changes
cleanup to comply with coding standard
* boards: cxd56xx: Cosmetic changes
updates to comply with coding standard
* boards: cxd56xx: Fix SD card cannot mount issue
SD card cannot mount when connecting and disconnecting three times
or more due to wrong state of parameter 'initialized'.
This change enables to skip swtching initialized state when mount
failed.
* arch: cxd56xx: Add size limitation for I2C SCU xfer
This is a fw restriction, unroll loop because it can be transfer
up to 16 bytes.
* arch: cxd56xx: Fix lack of leave_critical_section
add the missing leave_critical_section
* arch: cxd56xx: Remove unnecessary file
this header is duplicate and we can remove it
* arch: cxd56xx: Cosmetic change
remove space after function
* arch: cxd56xx: update topreg registers
the topreg registers are updated to match the cxd5602 HW
* arch: cxd56xx: Add voltage setting for low battery notification
Add voltage setting for low battery notification
* arch: cxd56xx: Improve perfomance of SD card
Improve a problem that the clock of SD Host Controller is lower than the
expected value in SDR25 transfer mode.
* arch: cxd56xx: Cosmetic changes
cleanup to comply with coding standard
* boards: cxd56xx: Cosmetic changes
updates to comply with coding standard
* boards: cxd56xx: Fix SD card cannot mount issue
SD card cannot mount when connecting and disconnecting three times
or more due to wrong state of parameter 'initialized'.
This change enables to skip swtching initialized state when mount
failed.
Run all .c and .h files in last PR through nxstyle.
Author: 脚蹬破拖鞋 <happypapa@yeah.net>
Add Imxrt usdhc insert or remove detection (#43)
* Add usdhc card insertion and removal detection using interrupt for imxrt.
* Add interrupt handle when usdhc insert or remove.
Run all .c and .h files in last PR through nxstyle.
Author: macman88 <jjlange91@gmail.com>
SAME5x Ethernet Support (#25)
boards/arm/samd5e5/same54-xplained-pro/: Adds basic support for Microchip SAM E54 Xplained Pro board.
arch/arm/src/samd5e5/: Adds an Ethernet driver for the SAME5x family (based on the SAMA5 GMAC driver).
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
Author: Gregory Nutt <gnutt@nuttx.org>
Run all .h and .c files modified in last PR through nxstyle.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Net cleanup (#17)
* Fix the semaphore usage issue found in tcp/udp
1. The count semaphore need disable priority inheritance
2. Loop again if net_lockedwait return -EINTR
3. Call nxsem_trywait to avoid the race condition
4. Call nxsem_post instead of sem_post
* Put the work notifier into free list to avoid the heap fragment in the long run. Since the allocation strategy is encapsulated internally, we can even refine the implementation later.
* Network stack shouldn't allocate memory in the poll implementation to avoid the heap fragment in the long run, other modification include:
1. Select MM_IOB automatically since ICMP[v6] socket can't work without the read ahead buffer
2. Remove the net lock since xxx_callback_free already do the same thing
3. TCP/UDP poll should work even the read ahead buffer isn't enabled at all
* Add NET_ prefix for UDP_NOTIFIER and TCP_NOTIFIER option to align with other UDP/TCP option convention
* Remove the unused _SF_[IDLE|ACCEPT|SEND|RECV|MASK] flags since there are code to set/clear these flags, but nobody check them.
arch/arm/src/sama5/sam_serial.c: uart2port in sam_serial, fix the rest of the uarts in sam_serial
boards/arm/sama5/sama5d2-xult/README.txt: Fix some minor typos
boards/arm/sama5/sama5d2-xult/include/board.h: Update UART pin disambiguation with default UARTn_RXD, _TXD
Author: Gregory Nutt <gnutt@nuttx.org>
boards/arm/stm32l4/nucleo-l432kc/Kconfig: Correct use of spaces instead of TABs in Kconfig file.
Author: Pieter du Preez <wingunder@users.noreply.github.com>
Added Kconfig pin config chooser for nucleo-l432kc USARTs. (#11)
The USART pins were hard-coded for the nucleo-l432kc. This patch makes
these pins configurable via menuconfig.
nrf52 updates
board/arm/nrf52/nrf52832-dk: use the on-board virtual COM pins as default UART0 configuration
board/arm/nrf52: initial support for the nrf52840-dk board
board/arm/nrf52: initial support for the nrf52840-dk dongle board
arch/arm/src/nrf52: add support for port 1 GPIO
arch/arm/src/nrf52: initial support for UART1
arch/arm/src/nrf52: add UICR definitions
Approved-by: Gregory Nutt <gnutt@nuttx.org>
This change was motivated by the presence of the mkimage.sh file under tools. That is the tool that created the RRLOAD binary format. That bash script has a GPL license and, hence, may not be included in an Apache-licensed project.
boards/arm/stm32h7/stm32h747i-disco: Remove references to nucleo in the stm32h747i-disco board.
arch/arm/include/stm32h7, arch/arm/src/stm32h7, and boards/arm/stm32h7/stm32h747i-disco: Add support for the STM32H747I-DISCO board.
(1) unifies the iomux definitions - previously some pins had them, and some didn't. This effectively made it impossible to use the pinmuxes without editing the header file in the standard distribution tree.
(2) unifies the pin definitions so that every pin now has a suffix. This makes it *much* easier to see when a pin is in use in your code, because it will always have a definition in your board.h file.
For anyone who is already using this CPU, a couple of small changes are needed to existing code;
In respect of (1) add IOMUX decorators to your pin definitions. You will find defaults in haardware/imxrt_iomux.h. Every pin should have a IOMUX decorator and in general the defaults should be OK. So while previously in your board.h file you might have had;
You will now have;
In respect of (2) you will need to add selectors for any function that previously only had one pinning option. There aren't many of those but LPUART1 is a good example. That just means adding into your board.h something like;
Add DMA support for STM32L4+ series
* Add DMA support for STM32L4+
* stm32l4xrxx_rcc: enable "Range 1 boost" mode if any PLL freq above 80 Mhz
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: cxd56xx: spresense: cleanup and new defconfig
* arch: cxd56xx: remove NVIC_SYSH redefinition
The NVIC_SYSH is already defined in nvicpri.h
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: spresense: configs: enable SPRESENSE_EXTENSION
Enable high current mode for the Spresense Extension board on all examples
that have SDCARD support
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: spresense: ifdef SDCARD_TXS02612
The SD Card TXS02612 port expander is hosted on the Extension board and
should not be enabled if the extension board is not prezent.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: spresense: configs: increase MQ_MAXMSGSIZE
This change is needed by the display driver on spresense platform
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: spresense: config: add lcd examples defconfig
This is a configuration for the basic nx examples
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Master
* boards: cxd56xx: spresense: add Spresense Image Processor
Enable support for accelerated format convertor, rotation and so on.
using the CXD5602 image processing accelerator.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards:cxd56xx:spresense: initalize GNSS and GEOFENCE at boot
Add the optional initialization of GNSS and GEOFENCE at boot
if the drivers are enabled
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: cxd56xx: spresense: add board_timerhook function
* boards: cxd56xx: spresense: add board_timerhook function
in preparation for SDK we muts have a weak board_timerhook function
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* drivers: usbhost: add missing endif
By accident an endif was missing.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: cxd56xx: audio: add build barrier
The audio implementation should not be beuilt if the config
CONFIG_CXD56_AUDIO is not set.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arch:arm:cxd56xx: add ge2d.h header
The header is used by imageproc.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: stm32f4discovery: Add support for MMCSD_SPI
This PR works with STM32F4 Discovery Shield plus microSD click
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
math library is also needed, however, here are various ways to provide a
math library so CONFIG_LIBM is not now set.
boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs: Add required
definitiions if libcxx is enabled.
boards: arm: cxd56xx: audio: add power_control and audio_tone_generator
* boards: arm: cxd56xx: audio: add power_control
Add a simeple way to control the audio power for userspace apps
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: audio: add audio_tone_generator
Add a simple way to control the audio buzzer with defined frequency
for userspace apps
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
boards: arm: cxd56xx: different updates
* boards: cxd56xx: spresense: initialize SCU at boot
The SCU has to be initialized at bootup on spresense board because several
functions depend on it.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: add audio control definitions
Add audio control definitions for the audio implementation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* boards: arm: cxd56xx: add audio defconfig
Add defconfig for the audio implementation
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Spresense smp
* arch: arm: Add ARCH_GLOBAL_IRQDISABLE to ARCH_CHIP_CXD56XX in Kconfig
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch: arm: cxd56xx: Make fpuconfg() public in cxd56_start.c
NOTE: fpuconfig() is called in both cxd56_start.c and cxd56_cpustart.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch: arm: cxd56xx: Add support for SMP
NOTE: To run cxd56xx in SMP mode, new boot loader which will be
released later must be used.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* arch: arm: cxd56xx: Add irq routing for SMP in cxd56_irq.c
NOTE: In cxd56xx, each external interrupt controller can be
accessed from a local APP_DSP (Cortex-M4F) only. This commit
supports IRQ routing for SMP by calling up_send_irqreq() in
both up_enable_irq() and up_disable_irq().
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
* boards: spresense: Add smp configuration
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Remove hardcoded -DCLOCK_MONOTONIC from CFLAGS in Make.defs of several configurations. That defintiion is now automatically adding this define when CONFIG_LIBCXX=y.