There is no need to check the holder structure "counts". There are cases
where the counts may be greater than 1 when several tasks block
on the mutex, but there is always just one holder, which must be freed.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This is not a bug, but unnecessary code. If the mutex is no longer blocking,
the released thread will set the holder and clear the blocking bit in the end
of nxsem_wait.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Properly select physical bank for block erase based on block number.
Previously, it would configure flash erase bank select based on the logical bank. If banks were swapped, and user application
tried to erase the first block of logical bank 2 (expecting to erase starting at 0x08100000), it would actually erase starting
at 0x0800000. This is fixed in this commit.
Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
Fix frame reception when CANFD is not enabled and there are many message in
the RX buffer.
The previous implementation assumed that the size of the data in the RX buffer
is constant, which is not true. Fortunately, the amount of
data in the buffer can be easily read from frame->fmt.rwcnt.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
In all POSIX environments (Linux, Cygwin, MSYS2, macOS)
strndup() function is available.
add HOSTCFLAGS += -DHAVE_STRTOK_C=1 -DHAVE_STRNDUP=1
Required after PR #16396
Signed-off-by: simbit18 <simbit18@gmail.com>
fix
error: Relative file path does not match actual file
Windows paths are different from Unix.
Added:
realpath replacement macro.
my_strndup() Implementation of strndup() for Windows Native.
backslash_to_slash() Replace backslashes \ to forward slashes /. Used to verify the relative path of a file.
Signed-off-by: simbit18 <simbit18@gmail.com>
The document context-switch-notes.rst was leaking into "Supported Platforms"
table of contents. To fix this, it was moved to separate common directory
and referenced from AVR index.rst
Similar to that, the gpio_intr_mux.rst document was leaking into list
of supported AVR families. This too was fixed by moving it to separate
docs directory.
The change was tested by building the Documentation using make html
Signed-off-by: Kerogit <kr.git@kerogit.eu>
After a mailing list suggestion, the indirection that enabled
ARCH_TOOLCHAIN_GCC only when user requested it is removed.
The indirection was a safety measure for chips and boards with linker
scripts that (possibly) do not handle keeping for example .vectors
section even if the linker considers it unreferenced.
Instead, all existing configurations now disable
CONFIG_DEBUG_OPT_UNUSED_SECTIONS to prevent the linker from removing
any code. (Preserving previous behaviour.) This can be removed again
at some point after making sure that corresponding linker script
only removes code that is truly unused.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
Button input driver support depends on AVRDx GPIO ISR multiplexer
but the configuration option did not enforce it.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
This patch adds additional information to breadxavr board for AVR DA family
development. The text now covers how to use Button input driver and also
adds some information about using the hardware.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
Unlike the Hello, world example, the NSH configuration can serve
as a starting point for testing other examples.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
Checking only adds a race condition. The checking if the wdog is active
or not must be done inside wd_cancel, where the proper spinlock is held
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Introduced a template for board support documentation to help
standardize the documentation requirements for NuttX. Also added a small
section to the documentation contributing guidelines where templates can
be listed. This is part of item 9 in issue #16278 to improve NuttX
quality.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Use the pins specified in the SAMA5D3 Xplained User Guide.
Rename config macros from SAMA5D4EK to SAMA5D3XPLAINED.
Add SDMMC support to defconfig. Boot mount is disabled by default.
More aligned to the tools/Makefile.host file
Added:
The option() command It provides a way to enable or disable targets of the project based on the user's preference.
Default
option(NUTTX_INCLUDE_ALL_TOOLS "Build all NuttX Host Tools" ON)
Checking host system for compilation options.
Tools configure, mkconfig, mksymtab and mkversion.
Signed-off-by: simbit18 <simbit18@gmail.com>
Add support for BME688 sensor based on BME680 implementation.
The BME688 is nearly identical to the BME680, and this implementation
reuses much of the existing BME680 code. However, there are some differences
related to gas measurements that make it impractical to use the same driver
without significantly complicating it. BME688 also supports parallel mode
which isn't yet supported.
Signed-off-by: raiden00pl <raiden00@railab.me>
This revises the post-IRQ interruption control logic so that to balance
the disable/enable operations for both chardev and socketcan cases.
Checked with chardev/socketcan on qemu-intel64.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
- Add ELE command to initialize the ELE RNG context.
- Add ELE command to poll the readiness of the RNG
- Add ELE command to obtain random numbers.
- Replace AHAB_ prefixes with ELE_
- Cleanup header includes
- Added some explanatory comments on .../hardware/imx9_ele.h
Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
Even when enabled, the PCNT counter doesn't accumulate into the 32-bit value.
Instead, a value in range [PCNT_LOW_LIMIT, PCNT_HIGH_LIMIT] is always returned.
This is due to interrupt events associated with limit overflows are disabled on the periphery,
therefore the ISR responsible for the accumulation never gets called.
Fixed by enabling the associated interrupt events.
Signed-off-by: michal matias <mich4l.matias@gmail.com>
When we use fcntl for dup, an fd is directly passed. If we have opened FDCHECK. we need to restore this file descriptor.
open FDCHECK and test this:
`
int main(int ac, char **av)
{
int fd1= open("./1.txt", O_WRONLY | O_CREAT, 0666);
if (fd1 < 0)
{
printf("open err\n");
return fd1;
}
int fd2= open("./2.txt", O_WRONLY | O_CREAT, 0666);
if (fd2 < 0)
{
printf("open err\n");
close(fd1);
return fd2;
}
//close(fd2);
int fd3 = fcntl(fd1, F_DUPFD, fd2);
printf("fd3 = %d\n", fd3);
close(fd1);
close(fd3);
return 0;
}
`
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
nxsig_timeout calls nxsched_add_readytorun and up_switch_context, so
must be in critical section.
nxsig_timeout is used as wdentry in nxsig_clockwait
See wd_expiration CALL_FUNC is not in critical section.
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
fix an unaligned pointer error for arm32 build:
ctucanfd_pci.c:1361:7: warning: converting a packed 'struct ctucanfd_frame_s'
pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4)
may result in an unaligned pointer value [-Waddress-of-packed-member]
1361 | ptr = (FAR uint32_t *)&rxframe;
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>