This patch marks host GCC toolchain option with ARCH_TOOLCHAIN_GCC,
enabling various other settings depending on it. One of the enabled
settings is DEBUG_OPT_UNUSED_SECTIONS.
This patch also adjusts compiler and linker flags based on the value
of DEBUG_OPT_UNUSED_SECTIONS so unused sections are removed
On SMP systems we should enable FPU on each core
FPU extenstion support must be enabled on each core as stated on 4.6.5
arm m33 devices generic user guide
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
RP2350 datasheet and upstream pico-sdk suggests higher VCO freq to
better output stability.
Increase the VCO and update PLL divs according to specs and calculation.
Higher VCO freq is more stable, lower VCO freq is more power friendly.
Also it's possible to use 120/6/5 with VCO 1440MHz for USB PLL to even
higher output stability.
USB setup changes from rp2040
Must clear the MAIN_CTRL.PHY_ISO bit at startup and after power down
events.
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
This adds the necessary code and function to allow a board to determine the reason for a reset. This is useful in NXboot, for example.
Signed-off-by: Tim Hardisty <timh@jti.uk.com>
The version and the git repository of Espressif's MCUboot port can
be changed by setting the `MCUBOOT_VERSION` and `MCUBOOT_URL`
environment variables before running the `make bootloader` command.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
On the RP2350, the watchdog receives its tick input from the
system-level ticks block, unlike the RP2040, where the watchdog includes
its own tick generator. Enable the TICK blocks, update the watchdog
routines.
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
The RP2040 chip supports 4 different GPIO interrupt modes. They can be
configured to be used simultaneously, although previously the NuttX
support only allowed one type of interrupt to be enabled per GPIO pin.
This allows up to all four to be selected without changing previous
behaviour.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Add CAN support for sim target based on host SocketCAN interface.
Tested with virtual CAN on Linux but should work also with hardware CAN cards supported by host.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Add kernel build (target imx93-evk:knsh) to i.MX93 EVK.
This target is preconfigured for use with AHAB boot (see
https://spsdk.readthedocs.io/en/latest/examples/ahab/imx93/imx93_ahab_uboot.html)
as a replacement of U-Boot proper (BL33 at EL2), hence
the load address is set to 0x80200000.
Signed-off-by: George Poulios <gpoulios@census-labs.com>
Fix a bug that I2C driver can not transfer after TX abort error.
It caused by remaining NO_STOP flag status.
same as done in commit 0df0a10 for cxd56xx
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
Add support for stack canaries for x86.
This includes mostly fixes for TLS support that are required for stack canaries
in x86. The FSBASE register must be unique per thread so we have to keep it in
thread registers area.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
with a fixed seq of 1, which causes ota_get_bootseq() to return ota_0.
The current solution is to directly use the target partition's number (num)
as next_seq to ensure the correct increment logic of seq. Ensure the formula
(seq-1) % OTA_DATA_NUM + OTA_IMG_BOOT_OTA_0 correctly maps to ota_0 or ota_1
Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
fix PGTABLE_SIZE not defined in sama5d4-ek/knsh
Error: common/arm_allocateheap.c:177:11: error: 'PGTABLE_SIZE' undeclared (first use in this function); did you mean 'PGTABLE_L2_SIZE'?
177 | size -= PGTABLE_SIZE * CONFIG_SMP_NCPUS;
| ^~~~~~~~~~~~
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
To fix a fpu illegal instruction exception due to fcsr have invalid
rounding-mode, restore fcsr/f0~f31 with a random value from stack because fpu
context is not save into stack when mstatus.fs is clean(not dirty).
The number of save/restore fpu context operations is not equal.
In fact, CONFIG_ARCH_LAZYFPU is a performance optimization mechanism aimed at
minimizing the saving and restoring of FPU registers. In some cases, it
may only need to be saved once but must be restored multiple times.
Therefore, this optimization mechanism dictates that saving cannot be
done on the stack; it must be stored at a fixed location(e.g. task
control block buffer), as the stack requires push/pop operations to be
matched.
In case of that CONFIG_ARCH_LAZYFPU is off, save/restore FPU registers
always into stack to avoid the above issues.
Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
The code used subi instruction to decrement the Y pointer but this
instruction only affects a byte, not a word. Fixed it by using
pre-decrement in the LD instruction instead.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Modify types.h and inttypes.h to use the correct _int32_t and _uint32_t types.
Type is now defined according to recent compiler versions.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This makes units compatible with what Linux uses for SocketCAN bitrate
and allows representing usual Single Wire Can (SAE J2411) usual bitrates
of 33333 and 83333 bps.
Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>