[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [OpenOCD-devel] [PATCH]: 2c6803c cortex_a: fix FTBS on ARM due to alignment issues
From: gerrit () openocd ! zylin ! com
Date: 2013-04-29 19:54:32
Message-ID: 20130429195432.9587824229 () openocd ! zylin ! com
[Download RAW message or body]
This is an automated email from Gerrit.
Paul Fertser (fercerpav@gmail.com) just uploaded a new patch set to Gerrit, which you \
can find at http://openocd.zylin.com/1369
-- gerrit
commit 2c6803c5e7733e7acc0e197f5c85011745443c9b
Author: Paul Fertser <fercerpav@gmail.com>
Date: Mon Apr 29 20:16:55 2013 +0400
cortex_a: fix FTBS on ARM due to alignment issues
Native compilation on RaspberryPi with
gcc (Debian 4.6.3-1) 4.6.3
Target: arm-linux-gnueabi
ends with error:
cortex_a.c: In function 'cortex_a8_read_apb_ab_memory':
cortex_a.c:2063:40: error: cast increases required alignment of target type \
[-Werror=cast-align] cc1: all warnings being treated as errors
This patch is compile-tested only.
Change-Id: I580c505424d03ac3a565de54182db22277c52ac1
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 2b5510f..d810459 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -2059,8 +2059,10 @@ static int cortex_a8_read_apb_ab_memory(struct target *target,
}
/* Read the last word */
+ uint32_t tmp;
retval = mem_ap_sel_read_atomic_u32(swjdp, armv7a->debug_ap,
- armv7a->debug_base + CPUDBG_DTRTX, (uint32_t *)&tmp_buff[(total_u32-1)<<2]);
+ armv7a->debug_base + CPUDBG_DTRTX, &tmp);
+ buf_set_u32(&tmp_buff[(total_u32-1)<<2], 0, 32, tmp);
if (retval != ERROR_OK)
goto error_free_buff_r;
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic