walnux/arch
Kerogit d9269112ee arch/avr/avrdx: do not copy const variables into RAM
AVR uses Hardward architecture with separate address space for program
memory (flash) and data memory (RAM). Normal program flow can only
access data memory which means that all variables - including const
variables - have to be copied into RAM to be accessible. (This happens
automatically during startup.)

It is possible to work around this limitation in software but that
can have severe impact on performance and/or API complexity. It is hardly
feasible to change NuttX interfaces in a way that would allow to make use
of this workaround.

On newer AVR families, there is an alternative option enabled by this patch.
These chips map part of their program memory (a 32kB window) into data
memory address space. This patch leverages this feature and adds support
for placing const variables into the mapped window. No copy to RAM is done
for them.

Const variables are therefore loaded directly from flash (not consuming
RAM) while still being available to be used by any NuttX interface.

Linker script of breadxavr board is changed to make use of these changes.

Tested by verifying string addresses - parameters in printf call
in a custom application (and also by running the application and verifying
its output.)

Documentation tested by build.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-07-10 12:21:40 -03:00
..
arm arch/arm/stm32h7: support for /dev/random device 2025-07-10 09:52:58 -03:00
arm64 arch/arm: Add gic lock for GICD_ICFGR RMW operations. 2025-07-03 19:02:50 -03:00
avr arch/avr/avrdx: do not copy const variables into RAM 2025-07-10 12:21:40 -03:00
ceva Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
dummy
hc style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mips arch: unify Private Types banners 2025-05-28 10:17:15 +08:00
misoc Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
or1k Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
renesas Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
risc-v arch/risc-v: Bugfix I2C Slave build error for esp32[-c3|-c6|-h2] 2025-07-09 12:18:06 +08:00
sim arch: unify Private Types banners 2025-05-28 10:17:15 +08:00
sparc Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
tricore Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
x86 toolchain: Support KASAN compilation above Clang18 2025-06-26 20:31:19 +08:00
x86_64 toolchain: Support KASAN compilation above Clang18 2025-06-26 20:31:19 +08:00
xtensa arch/xtensa: Bugfix I2C Slave build error for esp32[-|-s2|-s3] 2025-07-09 12:18:06 +08:00
z16 Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
z80 Revert "Reduce the size of tcb by four bytes." 2025-05-27 16:30:35 +08:00
CMakeLists.txt arch/z80: migrate to SPDX identifier 2024-12-02 17:23:25 +08:00
Kconfig mte/kasan: Implementing KASAN memory protection for ARM64 hardware MTE 2025-06-30 18:19:38 +08:00