- Add config "ARCH_USE_S_MODE" which controls whether the kernel
runs in M-mode or S-mode
- Add more MSTATUS and most of the SSTATUS register definitions
- Add more MIP flags for interrupt delegation
- Add handling of interrupts from S-mode
- Add handling of FPU from S-mode
- Add new context handling functions that are not dependent on the trap
handlers / ecall
NOTE: S-mode requires a companion SW (SBI) which is not yet implemented,
thus S-mode is not usable as is, yet.
RISC-V GCC is configured with --enable-initfini-array so it emits an
.init_array section instead of .ctors
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
## Summary
`esp32c3_spi2_cmddata()` implements SPI Cmd/Data `SPI_CMDDATA()` for only 3 LCD drivers: ST7735, ST7789 and GC9A01.
This patch removes the check for LCD drivers, so that SPI Cmd/Data will work for all LCD drivers.
More details: https://github.com/apache/incubator-nuttx/pull/5898
## Impact
This change impacts LCD drivers that call `SPI_CMDDATA()`.
Previously `SPI_CMDDATA()` would fail with `ENODEV` for LCD drivers other than ST7735, ST7789 and GC9A01.
After patching, `SPI_CMDDATA()` will work correctly with all LCD drivers.
## Testing
This is a minor patch so no testing is needed.
Add MCUboot Update Agent and Slot Confirm configurations. It uses
ethernet with dhcp client to perform download of new image into
internal flash memory.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
MCUboot apps were moved to examples directory. This fix configs due to
recent changes.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Move the target specific memory map to a separate file so there is no
need to copy&paste the __xxram_start etc linker symbols to each file
that needs them.
Also add MMU flags for I/O and kernel areas, they will be needed
when the kernel runs with virtual addresses also.
Summary:
- This commit enables environ and path in knsh/defconfig
Impact:
- None
Testing:
- Tested with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
```
board/esp32_bringup.c: In function 'esp32_bringup':
board/esp32_bringup.c:171:9: error: implicit declaration of function 'esp32_efuse_initialize'; did you mean 'esp32_mmcsd_initialize'? [-Werror=implicit-function-declaration]
ret = esp32_efuse_initialize("/dev/efuse");
^~~~~~~~~~~~~~~~~~~~~~
esp32_mmcsd_initialize
```
Summary:
- I noticed that undefined instruction happens with getprime and gcc-10.3.1
- Actually, the issue does not happen with gcc-9.3.1
- This is a tentative solution to avoid the issue
Impact:
- sabre-6quad:knsh only
Testing:
- Tested with hello/getprime
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Mux USB IO pins one-by-one using package specific pinmux definitions. This avoids accidentally overwriting IO settings for other pins.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This adds a simple USB device driver for the mpfs. However,
this driver is still at its early phase. Only limited testing
with CDC/ACM has been conducted.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
The imxrt1064, imxrt1064, and teensy-4.x board configs would fail to
build when CONFIG_USERLED_LOWER was enabled, due to a missing header in
imxrt_appinit.c and an unset local define.
Verified a build succeds for the specified boards with the following
defconfig modifications:
# CONFIG_ARCH_LEDS is not set
CONFIG_USERLED=y
CONFIG_USERLED_LOWER=y
Tested the "leds" Led driver example on a Teensy 4.1.
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Summary:
- I noticed that automatic tests sometimes fail
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- Add sabre-6quad:knsh to test BUILD_KERNEL with qemu
- Update README.txt to run the nuttx with qemu
Impact:
- None
Testing:
- Tested with QEMU
- NOTE: getprime crashes with undefined instruction when
compiled with gcc 10.3.x (please use 9.3.1)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit adds thumb support to i.MX6
- Also, applies the same coding style to arch_elf.c
Impact:
- i.MX6 only
Testing:
- Tested with sabre-6quad:smp (QEMU, Dev board)
- Tested with sabre-6quad:netnsh (QEMU)
- Tested with sabre-6quad:netknsh (QEMU, not merged yet)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The LSM303AGR and LSM6DSL depend on BSD license and should be disabled by default
They can be enabled after BSD components are selected in menuconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
NET_TUN depends on BSD components
Can be enabled after developer enables the BSD_LICENSE option in the menu
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
The BSD components should not be enabled by default.
Each developer can enable non Apache components locally
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Summary:
- I noticed two issues in the previous commit
- QEMU setting is missing
- The ostest takes longer time (i.e. 6m13s)
- This commit fixes these issues
Impact:
- None
Testing:
- Tested with QEMU
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
## Summary
A lot of linker scripts were listed twice, once for unix, once for windows.
This PR cleans up the logic so they're only listed once.
## Impact
Any opportunity to use a single source of truth and reduce lines of code is a win!
## Testing
CI will test all build
State of problem:
- Some drivers that do not support write operations (does not
have write handler or ioctl do not perform any write actions)
are registered with write permissions
- Some drivers that do not support read operation (does not
have read handler or ioctl do not perform any read actions)
are registered with read permissions
- Some drivers are registered with execute permissions
Solution:
- Iterate code where register_driver() is used and change 'mode'
parameter to reflect the actual read/write operations executed
by a driver
- Remove execute permissions from 'mode' parameter
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Summary:
- Apply the same style as sabre-6quad
Impact:
- None
- NOTE: esp32c3-devkit still remains old style because of link errors
Testing:
- Build only
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that the following error happened when loading the init
'elf_symvalue: SHN_COMMON: Re-compile with -fno-common'
- This commit fixes this issue
Impact:
- sabre-6quad only
Testings:
- Tested with sabre-6quad:netknsh (not merged yet)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Support for the STMicroelectronics B-U585I-IOT02A development board. This
is a proof-of-concept port that demonstrates running NuttX as the
Non-Secure TrustZone domain companion to TrustedFirmware-M.
Signed-off-by: Michael Jung <mijung@gmx.net>
This commit adds board level support of PWM driver to SAME70-XPLAINED
board. The functionality is tested with two new configurations
pwm:
An example configuration with configured PWM.
pysim:
This configuration contains support for pysimCoder application and
includes ADC and PWM peripherals and Ethernet driver.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
board: nucleo-l152re: Added registering logic I2C on /dev.
squash 5 commits
board: nucleo-l152re: Add missing I2C1 GPIO definition
I2C1 not worked due to it's GPIO pin definition has been missing on board.h.
Fix it through include two pin macros on stm32l15xxx_pinmap.h(arch/arm/src/stm32/hardware) to board.h
GPIO_I2C1_SCL => PB8 (CN5 pin 10, D15)
GPIO_I2C1_SDA => PB9 (CN5 pin 9, D14)
Added board_late_initialize() function for init I2C.
board: nucleo-l152re: Added registering logic I2C on /dev.
I2C1 hasn't been registered on /dev. Fix it.
board: nucleo-l152re: Fix code style.
Update board.h
board: nucleo-l152re: Fix code style.
Variables starting with symbol '"g_*" means it is a global variable, I think this is not the case here.
Fix code style
since the related code was removed by:
commit 4d5a964f29
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date: Tue Feb 23 18:04:13 2021 +0800
net: unify socket into file descriptor
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
We load the code into NuttX heap, which can be too far from
the usual code segments for the relocation types used by the
default "small" model to reach.
This worked around out of range relocations seen with my local app.
The image must be placed into:
boards/risc-v/mpfs/icicle/include/boot_romfsimg.h
The image is mounted by mpfs_bringup, which is run by the application
itself, or by board_late_initialize() in the case when
CONFIG_BOARD_LATE_INITIALIZE is defined, e.g. with CONFIG_BUILD_KERNEL
NOTE: THIS ONLY WORKS WHEN KERNEL RUNS IN M-MODE FOR NOW
This frees the PMP for other use, e.g. HART memory separation.
The page tables are statically allocated, 1 per level.
This feature is now behind CONFIG_MPFS_USE_MMU_AS_MPU, because
only the MPFS target supports this (others are not tested).
If the MMU is used for memory separation within a HART, the PMP must
still be configured to allow user access to the memory mapped for the
HART, because PMP *rekoves* access by default. At this point all of
the user memory as well as the kernel RAM are opened.
A more flexible solution for PMP configuration will follow.
The old implementation used the default ld.script for the kernel side
which did not obey the memory.ld limits whatsoever.
Also, provide the user space addresses from the linker script to get rid
of the pre-processor macros that define (incorrect) default values for
the user space composition.
Some of the configuration options have changed, so update this
config file accordingly.
In this example config, the following hart configuration takes
place:
hart1: 0xafb00000 (Another NuttX)
hart2: unused
hart3: 0x80200000 (u-boot and Linux kernel)
hart4: 0x80200000 (u-boot and Linux kernel)
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
By default SAME70_QMTECH board does not have CD signal routed to
SAME70. The HW rework can be done to enable CD signal. Clarify
description of SD card connector.
Change configuration of CD pin to get auto unmount work correctly
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
There is no such section. Instead, place the object mpfs_head.o at the start of
the text.
Put mpfs_head.o directly into the arch library; there is no need to define
it separately in HEAD_ASRC.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
iSerialNumber field in the device descriptor can be used to determining the
board when multiple boards connected to the same host. So add feature to change
serial string by board unique ID dynamically.
To use this feature, user must be implement the board_usbdev_serialstr() logic.
refs #13909
includes following parts:
add support of sparc in arch/Kconfig
add support of sparc in boards/Kconfig
add sparc dir in arch, add sparc dir in boards
add support of sparc in libs/libc/machine
modify all the coding style problem about saprc
Add the rest of the OpenSBI code to .text.sbi -section. They belong
to there. This frees up some space in the very limited eNVM.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
RAM is expected to start from 0x08000000, not from
0x80000000 in this case. DDR starts from 0x80000000.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
It’s an RP2040 based device with some interesting features:
+ small form factor (18x21.3mm)
+ 8 MByte Flash
+ RGB LED
+ Reset Button
+ USB-C
- reduced pin-header
Support in derived from: boards/arm/rp2040/raspberrypi-pico
Location: boards/arm/rp2040/pimoroni-tiny2040
This PR renames `tools/Makefile.*` to have the `.mk` extension. This PR also updates `README.md` and other files that references the other files.
Note: Skipped Makefile.host for this PR since it caused failures in CI for the sim build
By using a standard extension for Makefiles (https://www.file-extension.info/format/mk), editors will auto-format files.
This change will also improve developer ergonomics when searching for specific files
Verified locally that build still works, CI will verify more!
Polarfire Icicle board has only (128K - 256) bytes for the bootloader
in the non-volatile eNVM. This space is barely enough for running NuttX.
If OpenSBI is selected, it will be placed in DDR. This all means the
nuttx.bin file grows into gigabyte size, filling the unused space (ddr -
envm) with zeroes.
The memory layout is as follows:
MEMORY
{
ddr (rx) : ORIGIN = 0x80000000, LENGTH = 4M
envm (rx) : ORIGIN = 0x20220100, LENGTH = 128K - 256
l2lim (rwx) : ORIGIN = 0x08000000, LENGTH = 1024k
l2zerodevice (rwx) : ORIGIN = 0x0A000000, LENGTH = 512k
}
OpenSBI library is used as a separate binary, which is stored into
eMMC or SD-card. It is then loaded into its precise location in DDR.
Thus, we separate OpenSBI from NuttX and end up with two images
by utilizing the objcopy options:
--only-section=sectionpattern (-j in short)
--remove-section=sectionpattern (-R in short)
This is only valid when CONFIG_MPFS_OPENSBI is set.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>