openocd/src
Tomas Vanek 2aaa991a50 target: fix unaligned return of target_get_working_area_avail()
The working area allocation routines use 4 byte word alignment.
In the corner case the size of the working area is not aligned,
target_alloc_working_area() of size = target_get_working_area_avail()
will fail because the size gets aligned up and does not fit to the area
which size is aligned down.

Align down the result of target_get_working_area_avail() to cope with that
corner case.

While on it use fancy ALIGN_... macros instead of bitwise and operator.

Change-Id: Ia2a1e861c401c2c78fe6323379a3776fb4f47b06
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7096
Tested-by: jenkins
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-08 20:51:52 +00:00
..
flash fix Kinetis 100 MHz rev 1.x programming 2022-08-08 20:50:20 +00:00
helper helper/jim-nvp: avoid camelcase error by deprecated API 2022-07-23 13:59:49 +00:00
jtag drivers/vdebug: add support for DAP level interface 2022-07-30 08:48:21 +00:00
pld openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
rtos FreeRTOS: Always show current execution before scheduler is started 2022-08-08 20:48:10 +00:00
rtt openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
server openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
svf openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
target target: fix unaligned return of target_get_working_area_avail() 2022-08-08 20:51:52 +00:00
transport openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
xsvf openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
hello.c openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
openocd.c openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00