You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(61) |
Dec
|
|
From: <du...@ma...> - 2009-06-21 05:23:31
|
Author: duane
Date: 2009-06-21 05:23:28 +0200 (Sun, 21 Jun 2009)
New Revision: 2345
Modified:
trunk/src/flash/flash.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/flash.c
===================================================================
--- trunk/src/flash/flash.c 2009-06-21 03:22:10 UTC (rev 2344)
+++ trunk/src/flash/flash.c 2009-06-21 03:23:28 UTC (rev 2345)
@@ -92,7 +92,8 @@
retval=bank->driver->write(bank, buffer, offset, count);
if (retval!=ERROR_OK)
{
- LOG_ERROR("error writing to flash at address 0x%08x at offset 0x%8.8x (%d)", bank->base, offset, retval);
+ LOG_ERROR("error writing to flash at address 0x%08" PRIx32 " at offset 0x%8.8" PRIx32 " (%d)",
+ bank->base, offset, retval);
}
return retval;
@@ -292,7 +293,7 @@
if ((retval=flash_drivers[i]->flash_bank_command(cmd_ctx, cmd, args, argc, c)) != ERROR_OK)
{
- LOG_ERROR("'%s' driver rejected flash bank at 0x%8.8x", args[0], c->base);
+ LOG_ERROR("'%s' driver rejected flash bank at 0x%8.8" PRIx32 , args[0], c->base);
free(c);
return retval;
}
@@ -349,8 +350,14 @@
if ((retval = p->driver->auto_probe(p)) != ERROR_OK)
return retval;
- command_print(cmd_ctx, "#%i: %s at 0x%8.8x, size 0x%8.8x, buswidth %i, chipwidth %i",
- i, p->driver->name, p->base, p->size, p->bus_width, p->chip_width);
+ command_print(cmd_ctx,
+ "#%" PRIi32 " : %s at 0x%8.8" PRIx32 ", size 0x%8.8" PRIx32 ", buswidth %i, chipwidth %i",
+ i,
+ p->driver->name,
+ p->base,
+ p->size,
+ p->bus_width,
+ p->chip_width);
for (j = 0; j < p->num_sectors; j++)
{
char *protect_state;
@@ -362,9 +369,13 @@
else
protect_state = "protection state unknown";
- command_print(cmd_ctx, "\t#%3i: 0x%8.8x (0x%x %ikB) %s",
- j, p->sectors[j].offset, p->sectors[j].size, p->sectors[j].size>>10,
- protect_state);
+ command_print(cmd_ctx,
+ "\t#%3i: 0x%8.8" PRIx32 " (0x%" PRIx32 " %" PRIi32 "kB) %s",
+ j,
+ p->sectors[j].offset,
+ p->sectors[j].size,
+ p->sectors[j].size>>10,
+ protect_state);
}
*buf = '\0'; /* initialize buffer, otherwise it migh contain garbage if driver function fails */
@@ -393,16 +404,16 @@
{
if ((retval = p->driver->probe(p)) == ERROR_OK)
{
- command_print(cmd_ctx, "flash '%s' found at 0x%8.8x", p->driver->name, p->base);
+ command_print(cmd_ctx, "flash '%s' found at 0x%8.8" PRIx32, p->driver->name, p->base);
}
else if (retval == ERROR_FLASH_BANK_INVALID)
{
- command_print(cmd_ctx, "probing failed for flash bank '#%s' at 0x%8.8x",
+ command_print(cmd_ctx, "probing failed for flash bank '#%s' at 0x%8.8" PRIx32,
args[0], p->base);
}
else
{
- command_print(cmd_ctx, "unknown error when probing flash bank '#%s' at 0x%8.8x",
+ command_print(cmd_ctx, "unknown error when probing flash bank '#%s' at 0x%8.8" PRIx32,
args[0], p->base);
}
}
@@ -434,7 +445,7 @@
}
else
{
- command_print(cmd_ctx, "unknown error when checking erase state of flash bank #%s at 0x%8.8x",
+ command_print(cmd_ctx, "unknown error when checking erase state of flash bank #%s at 0x%8.8" PRIx32,
args[0], p->base);
}
@@ -449,9 +460,13 @@
else
erase_state = "erase state unknown";
- command_print(cmd_ctx, "\t#%3i: 0x%8.8x (0x%x %ikB) %s",
- j, p->sectors[j].offset, p->sectors[j].size, p->sectors[j].size>>10,
- erase_state);
+ command_print(cmd_ctx,
+ "\t#%3i: 0x%8.8" PRIx32 " (0x%" PRIx32 " %" PRIi32 "kB) %s",
+ j,
+ p->sectors[j].offset,
+ p->sectors[j].size,
+ p->sectors[j].size>>10,
+ erase_state);
}
}
@@ -525,11 +540,11 @@
}
else if (retval == ERROR_FLASH_OPERATION_FAILED)
{
- command_print(cmd_ctx, "checking protection state failed (possibly unsupported) by flash #%s at 0x%8.8x", args[0], p->base);
+ command_print(cmd_ctx, "checking protection state failed (possibly unsupported) by flash #%s at 0x%8.8" PRIx32, args[0], p->base);
}
else
{
- command_print(cmd_ctx, "unknown error when checking protection state of flash bank '#%s' at 0x%8.8x", args[0], p->base);
+ command_print(cmd_ctx, "unknown error when checking protection state of flash bank '#%s' at 0x%8.8" PRIx32, args[0], p->base);
}
}
else
@@ -693,9 +708,12 @@
}
if (retval == ERROR_OK)
{
- command_print(cmd_ctx, "wrote %u byte from file %s in %s (%f kb/s)",
- written, args[0], duration_text,
- (float)written / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
+ command_print(cmd_ctx,
+ "wrote %" PRIu32 " byte from file %s in %s (%f kb/s)",
+ written,
+ args[0],
+ duration_text,
+ (float)written / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
}
free(duration_text);
@@ -795,7 +813,8 @@
{
if (readback[i]!=chunk[i])
{
- LOG_ERROR("Verfication error address 0x%08x, read back 0x%02x, expected 0x%02x", address + wrote + i, readback[i], chunk[i]);
+ LOG_ERROR("Verfication error address 0x%08" PRIx32 ", read back 0x%02x, expected 0x%02x",
+ address + wrote + i, readback[i], chunk[i]);
return ERROR_FAIL;
}
}
@@ -812,9 +831,12 @@
float speed;
speed=wrote / 1024.0;
speed/=((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0));
- command_print(cmd_ctx, "wrote %d bytes to 0x%8.8x in %s (%f kb/s)",
- count*wordsize, address, duration_text,
- speed);
+ command_print(cmd_ctx,
+ "wrote %" PRId32 " bytes to 0x%8.8" PRIx32 " in %s (%f kb/s)",
+ count*wordsize,
+ address,
+ duration_text,
+ speed);
}
free(duration_text);
return ERROR_OK;
@@ -874,9 +896,14 @@
}
if (retval==ERROR_OK)
{
- command_print(cmd_ctx, "wrote %lld byte from file %s to flash bank %li at offset 0x%8.8x in %s (%f kb/s)",
- fileio.size, args[1], strtoul(args[0], NULL, 0), offset, duration_text,
- (float)fileio.size / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
+ command_print(cmd_ctx,
+ "wrote %lld byte from file %s to flash bank %li at offset 0x%8.8" PRIx32 " in %s (%f kb/s)",
+ fileio.size,
+ args[1],
+ strtoul(args[0], NULL, 0),
+ offset,
+ duration_text,
+ (float)fileio.size / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
}
free(duration_text);
@@ -920,7 +947,7 @@
if ((addr >= c->base) && (addr <= c->base + (c->size - 1)) && target == c->target)
return c;
}
- LOG_ERROR("No flash at address 0x%08x\n", addr);
+ LOG_ERROR("No flash at address 0x%08" PRIx32 "\n", addr);
return NULL;
}
@@ -1056,7 +1083,7 @@
if (run_address + run_size - 1 > c->base + c->size - 1)
{
LOG_WARNING("writing %d bytes only - as image section is %d bytes and bank is only %d bytes", \
- c->base + c->size - run_address, run_size, c->size);
+ (int)(c->base + c->size - run_address), (int)(run_size), (int)(c->size));
run_size = c->base + c->size - run_address;
}
|
|
From: <du...@ma...> - 2009-06-21 05:22:13
|
Author: duane
Date: 2009-06-21 05:22:10 +0200 (Sun, 21 Jun 2009)
New Revision: 2344
Modified:
trunk/src/flash/str9x.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/str9x.c
===================================================================
--- trunk/src/flash/str9x.c 2009-06-21 03:22:04 UTC (rev 2343)
+++ trunk/src/flash/str9x.c 2009-06-21 03:22:10 UTC (rev 2344)
@@ -514,7 +514,7 @@
if (offset & 0x1)
{
- LOG_WARNING("offset 0x%x breaks required 2-byte alignment", offset);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required 2-byte alignment", offset);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
|
|
From: <du...@ma...> - 2009-06-21 05:22:07
|
Author: duane
Date: 2009-06-21 05:22:04 +0200 (Sun, 21 Jun 2009)
New Revision: 2343
Modified:
trunk/src/flash/ecos.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/ecos.c
===================================================================
--- trunk/src/flash/ecos.c 2009-06-21 03:21:59 UTC (rev 2342)
+++ trunk/src/flash/ecos.c 2009-06-21 03:22:04 UTC (rev 2343)
@@ -205,7 +205,7 @@
}
target_write_buffer(target, image.sections[i].base_address, buf_cnt, buffer);
image_size += buf_cnt;
- LOG_DEBUG("%u byte written at address 0x%8.8x", buf_cnt, image.sections[i].base_address);
+ LOG_DEBUG("%" PRIu32 " byte written at address 0x%8.8" PRIx32 "", buf_cnt, image.sections[i].base_address);
free(buffer);
}
@@ -287,7 +287,7 @@
if (flashErr != 0x0)
{
- LOG_ERROR("Flash erase failed with %d (%s)\n", flashErr, flash_errmsg(flashErr));
+ LOG_ERROR("Flash erase failed with %d (%s)\n", (int)flashErr, flash_errmsg(flashErr));
return ERROR_FAIL;
}
@@ -346,7 +346,7 @@
if (flashErr != 0x0)
{
- LOG_ERROR("Flash prog failed with %d (%s)\n", flashErr, flash_errmsg(flashErr));
+ LOG_ERROR("Flash prog failed with %d (%s)\n", (int)flashErr, flash_errmsg(flashErr));
return ERROR_FAIL;
}
}
|
|
From: <du...@ma...> - 2009-06-21 05:22:03
|
Author: duane
Date: 2009-06-21 05:21:59 +0200 (Sun, 21 Jun 2009)
New Revision: 2342
Modified:
trunk/src/flash/str7x.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/str7x.c
===================================================================
--- trunk/src/flash/str7x.c 2009-06-21 03:21:55 UTC (rev 2341)
+++ trunk/src/flash/str7x.c 2009-06-21 03:21:59 UTC (rev 2342)
@@ -259,7 +259,7 @@
sectors |= str7x_info->sector_bits[i];
}
- LOG_DEBUG("sectors: 0x%x", sectors);
+ LOG_DEBUG("sectors: 0x%" PRIx32 "", sectors);
/* clear FLASH_ER register */
target_write_u32(target, str7x_get_flash_adr(bank, FLASH_ER), 0x0);
@@ -281,7 +281,7 @@
if (retval)
{
- LOG_ERROR("error erasing flash bank, FLASH_ER: 0x%x", retval);
+ LOG_ERROR("error erasing flash bank, FLASH_ER: 0x%" PRIx32 "", retval);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -335,7 +335,7 @@
retval = str7x_result(bank);
- LOG_DEBUG("retval: 0x%8.8x", retval);
+ LOG_DEBUG("retval: 0x%8.8" PRIx32 "", retval);
if (retval & FLASH_ERER)
return ERROR_FLASH_SECTOR_NOT_ERASED;
@@ -481,7 +481,7 @@
if (offset & 0x7)
{
- LOG_WARNING("offset 0x%x breaks required 8-byte alignment", offset);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required 8-byte alignment", offset);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
|
|
From: <du...@ma...> - 2009-06-21 05:21:57
|
Author: duane
Date: 2009-06-21 05:21:55 +0200 (Sun, 21 Jun 2009)
New Revision: 2341
Modified:
trunk/src/flash/ocl.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/ocl.c
===================================================================
--- trunk/src/flash/ocl.c 2009-06-21 03:21:50 UTC (rev 2340)
+++ trunk/src/flash/ocl.c 2009-06-21 03:21:55 UTC (rev 2341)
@@ -145,9 +145,9 @@
if (dcc_buffer[1] != OCL_CMD_DONE)
{
if (dcc_buffer[0] == OCL_ERASE_ALL)
- LOG_ERROR("loader response to OCL_ERASE_ALL 0x%08X", dcc_buffer[1]);
+ LOG_ERROR("loader response to OCL_ERASE_ALL 0x%08" PRIx32 "", dcc_buffer[1]);
else
- LOG_ERROR("loader response to OCL_ERASE_BLOCK 0x%08X", dcc_buffer[1]);
+ LOG_ERROR("loader response to OCL_ERASE_BLOCK 0x%08" PRIx32 "", dcc_buffer[1]);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -253,7 +253,7 @@
if (dcc_buffer[0] != OCL_CMD_DONE)
{
- LOG_ERROR("loader response to OCL_FLASH_BLOCK 0x%08X", dcc_buffer[0]);
+ LOG_ERROR("loader response to OCL_FLASH_BLOCK 0x%08" PRIx32 "", dcc_buffer[0]);
free(dcc_buffer);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -295,7 +295,7 @@
if (dcc_buffer[0] != OCL_CMD_DONE)
{
- LOG_ERROR("loader response to OCL_PROBE 0x%08X", dcc_buffer[0]);
+ LOG_ERROR("loader response to OCL_PROBE 0x%08" PRIx32 "", dcc_buffer[0]);
return ERROR_FLASH_OPERATION_FAILED;
}
|
|
From: <du...@ma...> - 2009-06-21 05:21:53
|
Author: duane
Date: 2009-06-21 05:21:50 +0200 (Sun, 21 Jun 2009)
New Revision: 2340
Modified:
trunk/src/flash/pic32mx.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/pic32mx.c
===================================================================
--- trunk/src/flash/pic32mx.c 2009-06-21 03:20:46 UTC (rev 2339)
+++ trunk/src/flash/pic32mx.c 2009-06-21 03:21:50 UTC (rev 2340)
@@ -148,11 +148,11 @@
/* wait for busy to clear */
while (((status = pic32mx_get_flash_status(bank)) & NVMCON_NVMWR) && (timeout-- > 0))
{
- LOG_DEBUG("status: 0x%x", status);
+ LOG_DEBUG("status: 0x%" PRIx32, status );
alive_sleep(1);
}
if(timeout <= 0)
- LOG_DEBUG("timeout: status: 0x%x", status);
+ LOG_DEBUG("timeout: status: 0x%" PRIx32, status );
return status;
}
@@ -410,7 +410,7 @@
uint32_t status;
if ((retval = target_write_buffer(target, source->address, buffer_size, buffer))!=ERROR_OK) {
- LOG_ERROR("Failed to write row buffer (%d words) to RAM", buffer_size/4);
+ LOG_ERROR("Failed to write row buffer (%d words) to RAM", (int)(buffer_size/4));
break;
}
@@ -435,12 +435,12 @@
#endif
status = pic32mx_write_row(bank, address, source->address);
if( status & NVMCON_NVMERR ) {
- LOG_ERROR("Flash write error NVMERR (status=0x%08x)", status);
+ LOG_ERROR("Flash write error NVMERR (status=0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
if( status & NVMCON_LVDERR ) {
- LOG_ERROR("Flash write error LVDERR (status=0x%08x)", status);
+ LOG_ERROR("Flash write error LVDERR (status=0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
@@ -459,12 +459,12 @@
uint32_t status = pic32mx_write_word(bank, address, value);
if( status & NVMCON_NVMERR ) {
- LOG_ERROR("Flash write error NVMERR (status=0x%08x)", status);
+ LOG_ERROR("Flash write error NVMERR (status=0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
if( status & NVMCON_LVDERR ) {
- LOG_ERROR("Flash write error LVDERR (status=0x%08x)", status);
+ LOG_ERROR("Flash write error LVDERR (status=0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
@@ -497,7 +497,7 @@
{
target_t *target = bank->target;
- LOG_DEBUG("addr: 0x%08x srcaddr: 0x%08x", address, srcaddr);
+ LOG_DEBUG("addr: 0x%08" PRIx32 " srcaddr: 0x%08" PRIx32 "", address, srcaddr);
if(address >= PIC32MX_KSEG1_PGM_FLASH)
target_write_u32(target, PIC32MX_NVMADDR, KS1Virt2Phys(address));
@@ -528,7 +528,7 @@
if (offset & 0x3)
{
- LOG_WARNING("offset 0x%x breaks required 4-byte alignment", offset);
+ LOG_WARNING("offset 0x%" PRIx32 "breaks required 4-byte alignment", offset);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
@@ -603,7 +603,11 @@
pic32mx_info->probed = 0;
device_id = ejtag_info->idcode;
- LOG_INFO( "device id = 0x%08x (manuf 0x%03x dev 0x%02x, ver 0x%03x)", device_id, (device_id>>1)&0x7ff, (device_id>>12)&0xff, (device_id>>20)&0xfff );
+ LOG_INFO( "device id = 0x%08" PRIx32 " (manuf 0x%03x dev 0x%02x, ver 0x%03x)",
+ device_id,
+ (unsigned)((device_id>>1)&0x7ff),
+ (unsigned)((device_id>>12)&0xff),
+ (unsigned)((device_id>>20)&0xfff) );
if(((device_id>>1)&0x7ff) != PIC32MX_MANUF_ID) {
LOG_WARNING( "Cannot identify target as a PIC32MX family." );
@@ -694,7 +698,10 @@
device_id = ejtag_info->idcode;
if(((device_id>>1)&0x7ff) != PIC32MX_MANUF_ID) {
- snprintf(buf, buf_size, "Cannot identify target as a PIC32MX family (manufacturer 0x%03d != 0x%03d)\n", (device_id>>1)&0x7ff, PIC32MX_MANUF_ID);
+ snprintf(buf, buf_size,
+ "Cannot identify target as a PIC32MX family (manufacturer 0x%03d != 0x%03d)\n",
+ (unsigned)((device_id>>1)&0x7ff),
+ PIC32MX_MANUF_ID);
return ERROR_FLASH_OPERATION_FAILED;
}
for(i=0; pic32mx_devs[i].name != NULL; i++)
@@ -708,7 +715,8 @@
}
buf += printed;
buf_size -= printed;
- printed = snprintf(buf, buf_size, " Ver: 0x%03x", (device_id>>20)&0xfff);
+ printed = snprintf(buf, buf_size, " Ver: 0x%03x",
+ (unsigned)((device_id>>20)&0xfff));
return ERROR_OK;
}
|
|
From: <du...@ma...> - 2009-06-21 05:20:48
|
Author: duane
Date: 2009-06-21 05:20:46 +0200 (Sun, 21 Jun 2009)
New Revision: 2339
Modified:
trunk/src/flash/lpc288x.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/lpc288x.c
===================================================================
--- trunk/src/flash/lpc288x.c 2009-06-21 03:20:41 UTC (rev 2338)
+++ trunk/src/flash/lpc288x.c 2009-06-21 03:20:46 UTC (rev 2339)
@@ -155,7 +155,7 @@
if (cidr != 0x0102100A)
{
- LOG_WARNING("Cannot identify target as an LPC288X (%08X)",cidr);
+ LOG_WARNING("Cannot identify target as an LPC288X (%08" PRIx32 ")",cidr);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -345,7 +345,7 @@
/* all writes must start on a sector boundary... */
if (offset % bank->sectors[i].size)
{
- LOG_INFO("offset 0x%x breaks required alignment 0x%x", offset, bank->sectors[i].size);
+ LOG_INFO("offset 0x%" PRIx32 " breaks required alignment 0x%" PRIx32 "", offset, bank->sectors[i].size);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
}
@@ -360,7 +360,7 @@
/* Range check... */
if (first_sector == 0xffffffff || last_sector == 0xffffffff)
{
- LOG_INFO("Range check failed %x %x", offset, count);
+ LOG_INFO("Range check failed %" PRIx32 " %" PRIx32 "", offset, count);
return ERROR_FLASH_DST_OUT_OF_BANK;
}
@@ -408,7 +408,7 @@
#if 1
if (target_write_memory(target, offset + dest_offset, 4, 128, page_buffer) != ERROR_OK)
{
- LOG_ERROR("Write failed s %x p %x", sector, page);
+ LOG_ERROR("Write failed s %" PRIx32 " p %" PRIx32 "", sector, page);
return ERROR_FLASH_OPERATION_FAILED;
}
#else
|
|
From: <du...@ma...> - 2009-06-21 05:20:44
|
Author: duane
Date: 2009-06-21 05:20:41 +0200 (Sun, 21 Jun 2009)
New Revision: 2338
Modified:
trunk/src/flash/stellaris.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/stellaris.c
===================================================================
--- trunk/src/flash/stellaris.c 2009-06-21 03:20:35 UTC (rev 2337)
+++ trunk/src/flash/stellaris.c 2009-06-21 03:20:41 UTC (rev 2338)
@@ -292,24 +292,45 @@
{
device_class = 0;
}
- printed = snprintf(buf, buf_size, "\nLMI Stellaris information: Chip is class %i(%s) %s v%c.%i\n",
- device_class, StellarisClassname[device_class], stellaris_info->target_name,
- 'A' + ((stellaris_info->did0>>8) & 0xFF), (stellaris_info->did0) & 0xFF);
+ printed = snprintf(buf,
+ buf_size,
+ "\nLMI Stellaris information: Chip is class %i(%s) %s v%c.%i\n",
+ device_class,
+ StellarisClassname[device_class],
+ stellaris_info->target_name,
+ (int)('A' + ((stellaris_info->did0>>8) & 0xFF)),
+ (int)((stellaris_info->did0) & 0xFF));
buf += printed;
buf_size -= printed;
- printed = snprintf(buf, buf_size, "did1: 0x%8.8x, arch: 0x%4.4x, eproc: %s, ramsize:%ik, flashsize: %ik\n",
- stellaris_info->did1, stellaris_info->did1, "ARMV7M", (1+((stellaris_info->dc0>>16) & 0xFFFF))/4, (1+(stellaris_info->dc0 & 0xFFFF))*2);
+ printed = snprintf(buf,
+ buf_size,
+ "did1: 0x%8.8" PRIx32 ", arch: 0x%4.4" PRIx32 ", eproc: %s, ramsize:%ik, flashsize: %ik\n",
+ stellaris_info->did1,
+ stellaris_info->did1,
+ "ARMV7M",
+ (int)((1+((stellaris_info->dc0>>16) & 0xFFFF))/4),
+ (int)((1+(stellaris_info->dc0 & 0xFFFF))*2));
buf += printed;
buf_size -= printed;
- printed = snprintf(buf, buf_size, "master clock(estimated): %ikHz, rcc is 0x%x \n", stellaris_info->mck_freq / 1000, stellaris_info->rcc);
+ printed = snprintf(buf,
+ buf_size,
+ "master clock(estimated): %ikHz, rcc is 0x%" PRIx32 " \n",
+ (int)(stellaris_info->mck_freq / 1000),
+ stellaris_info->rcc);
buf += printed;
buf_size -= printed;
if (stellaris_info->num_lockbits>0)
{
- printed = snprintf(buf, buf_size, "pagesize: %i, lockbits: %i 0x%4.4x, pages in lock region: %i \n", stellaris_info->pagesize, stellaris_info->num_lockbits, stellaris_info->lockbits,stellaris_info->num_pages/stellaris_info->num_lockbits);
+ printed = snprintf(buf,
+ buf_size,
+ "pagesize: %" PRIi32 ", lockbits: %i 0x%4.4" PRIx32 ", pages in lock region: %i \n",
+ stellaris_info->pagesize,
+ stellaris_info->num_lockbits,
+ stellaris_info->lockbits,
+ (int)(stellaris_info->num_pages/stellaris_info->num_lockbits));
buf += printed;
buf_size -= printed;
}
@@ -340,9 +361,9 @@
unsigned long mainfreq;
target_read_u32(target, SCB_BASE|RCC, &rcc);
- LOG_DEBUG("Stellaris RCC %x", rcc);
+ LOG_DEBUG("Stellaris RCC %" PRIx32 "", rcc);
target_read_u32(target, SCB_BASE|PLLCFG, &pllcfg);
- LOG_DEBUG("Stellaris PLLCFG %x", pllcfg);
+ LOG_DEBUG("Stellaris PLLCFG %" PRIx32 "", pllcfg);
stellaris_info->rcc = rcc;
sysdiv = (rcc>>23) & 0xF;
@@ -390,7 +411,7 @@
target_t *target = bank->target;
uint32_t usecrl = (stellaris_info->mck_freq/1000000ul-1);
- LOG_DEBUG("usecrl = %i",usecrl);
+ LOG_DEBUG("usecrl = %i",(int)(usecrl));
target_write_u32(target, SCB_BASE|USECRL, usecrl);
}
@@ -443,7 +464,8 @@
target_read_u32(target, SCB_BASE|DID1, &did1);
target_read_u32(target, SCB_BASE|DC0, &stellaris_info->dc0);
target_read_u32(target, SCB_BASE|DC1, &stellaris_info->dc1);
- LOG_DEBUG("did0 0x%x, did1 0x%x, dc0 0x%x, dc1 0x%x", did0, did1, stellaris_info->dc0, stellaris_info->dc1);
+ LOG_DEBUG("did0 0x%" PRIx32 ", did1 0x%" PRIx32 ", dc0 0x%" PRIx32 ", dc1 0x%" PRIx32 "",
+ did0, did1, stellaris_info->dc0, stellaris_info->dc1);
ver = did0 >> 28;
if((ver != 0) && (ver != 1))
@@ -594,7 +616,7 @@
target_read_u32(target, FLASH_CRIS, &flash_cris);
if(flash_cris & (AMASK))
{
- LOG_WARNING("Error erasing flash page %i, flash_cris 0x%x", banknr, flash_cris);
+ LOG_WARNING("Error erasing flash page %i, flash_cris 0x%" PRIx32 "", banknr, flash_cris);
target_write_u32(target, FLASH_CRIS, 0);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -652,7 +674,7 @@
target_write_u32(target, FLASH_CIM, 0);
target_write_u32(target, FLASH_MISC, PMISC|AMISC);
- LOG_DEBUG("fmppe 0x%x",fmppe);
+ LOG_DEBUG("fmppe 0x%" PRIx32 "",fmppe);
target_write_u32(target, SCB_BASE|FMPPE, fmppe);
/* Commit FMPPE */
target_write_u32(target, FLASH_FMA, 1);
@@ -671,7 +693,7 @@
target_read_u32(target, FLASH_CRIS, &flash_cris);
if(flash_cris & (AMASK))
{
- LOG_WARNING("Error setting flash page protection, flash_cris 0x%x", flash_cris);
+ LOG_WARNING("Error setting flash page protection, flash_cris 0x%" PRIx32 "", flash_cris);
target_write_u32(target, FLASH_CRIS, 0);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -732,7 +754,7 @@
armv7m_algorithm_t armv7m_info;
int retval = ERROR_OK;
- LOG_DEBUG("(bank=%p buffer=%p offset=%08X wcount=%08X)",
+ LOG_DEBUG("(bank=%p buffer=%p offset=%08" PRIx32 " wcount=%08" PRIx32 "",
bank, buffer, offset, wcount);
/* flash write code */
@@ -747,7 +769,7 @@
/* memory buffer */
while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK)
{
- LOG_DEBUG("called target_alloc_working_area(target=%p buffer_size=%08X source=%p)",
+ LOG_DEBUG("called target_alloc_working_area(target=%p buffer_size=%08" PRIx32 " source=%p)",
target, buffer_size, source);
buffer_size /= 2;
if (buffer_size <= 256)
@@ -777,8 +799,8 @@
buf_set_u32(reg_params[0].value, 0, 32, source->address);
buf_set_u32(reg_params[1].value, 0, 32, address);
buf_set_u32(reg_params[2].value, 0, 32, 4*thisrun_count);
- LOG_INFO("Algorithm flash write %i words to 0x%x, %i remaining", thisrun_count, address, wcount);
- LOG_DEBUG("Algorithm flash write %i words to 0x%x, %i remaining", thisrun_count, address, wcount);
+ LOG_INFO("Algorithm flash write %" PRIi32 " words to 0x%" PRIx32 ", %" PRIi32 " remaining", thisrun_count, address, wcount);
+ LOG_DEBUG("Algorithm flash write %" PRIi32 " words to 0x%" PRIx32 ", %" PRIi32 " remaining", thisrun_count, address, wcount);
if ((retval = target_run_algorithm(target, 0, NULL, 3, reg_params, write_algorithm->address, write_algorithm->address + sizeof(stellaris_write_code)-10, 10000, &armv7m_info)) != ERROR_OK)
{
LOG_ERROR("error executing stellaris flash write algorithm");
@@ -818,7 +840,7 @@
return ERROR_TARGET_NOT_HALTED;
}
- LOG_DEBUG("(bank=%p buffer=%p offset=%08X count=%08X)",
+ LOG_DEBUG("(bank=%p buffer=%p offset=%08" PRIx32 " count=%08" PRIx32 "",
bank, buffer, offset, count);
if (stellaris_info->did1 == 0)
@@ -866,7 +888,7 @@
/* if an error occured, we examine the reason, and quit */
target_read_u32(target, FLASH_CRIS, &flash_cris);
- LOG_ERROR("flash writing failed with CRIS: 0x%x", flash_cris);
+ LOG_ERROR("flash writing failed with CRIS: 0x%" PRIx32 "", flash_cris);
return ERROR_FLASH_OPERATION_FAILED;
}
}
@@ -881,7 +903,7 @@
while (words_remaining > 0)
{
if (!(address & 0xff))
- LOG_DEBUG("0x%x", address);
+ LOG_DEBUG("0x%" PRIx32 "", address);
/* Program one word */
target_write_u32(target, FLASH_FMA, address);
@@ -912,7 +934,7 @@
}
if (!(address & 0xff))
- LOG_DEBUG("0x%x", address);
+ LOG_DEBUG("0x%" PRIx32 "", address);
/* Program one word */
target_write_u32(target, FLASH_FMA, address);
@@ -930,7 +952,7 @@
target_read_u32(target, FLASH_CRIS, &flash_cris);
if (flash_cris & (AMASK))
{
- LOG_DEBUG("flash_cris 0x%x", flash_cris);
+ LOG_DEBUG("flash_cris 0x%" PRIx32 "", flash_cris);
return ERROR_FLASH_OPERATION_FAILED;
}
return ERROR_OK;
|
|
From: <du...@ma...> - 2009-06-21 05:20:39
|
Author: duane
Date: 2009-06-21 05:20:35 +0200 (Sun, 21 Jun 2009)
New Revision: 2337
Modified:
trunk/src/flash/avrf.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/avrf.c
===================================================================
--- trunk/src/flash/avrf.c 2009-06-21 03:20:31 UTC (rev 2336)
+++ trunk/src/flash/avrf.c 2009-06-21 03:20:35 UTC (rev 2337)
@@ -155,7 +155,7 @@
{
return ERROR_FAIL;
}
- LOG_DEBUG("poll_value = 0x%04X", poll_value);
+ LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
}while(!(poll_value & 0x0200));
return ERROR_OK;
@@ -202,7 +202,7 @@
{
return ERROR_FAIL;
}
- LOG_DEBUG("poll_value = 0x%04X", poll_value);
+ LOG_DEBUG("poll_value = 0x%04" PRIx32 "", poll_value);
}while(!(poll_value & 0x0200));
return ERROR_OK;
@@ -264,12 +264,12 @@
page_size = bank->sectors[0].size;
if ((offset % page_size) != 0)
{
- LOG_WARNING("offset 0x%x breaks required %d-byte alignment", offset, page_size);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required %" PRIu32 "-byte alignment", offset, page_size);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
- LOG_DEBUG("offset is 0x%08X", offset);
- LOG_DEBUG("count is %d", count);
+ LOG_DEBUG("offset is 0x%08" PRIx32 "", offset);
+ LOG_DEBUG("count is %" PRId32 "", count);
if (ERROR_OK != avr_jtagprg_enterprogmode(avr))
{
@@ -323,10 +323,10 @@
return ERROR_FAIL;
}
- LOG_INFO( "device id = 0x%08x", device_id );
+ LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
- LOG_ERROR("0x%X is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
+ LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
@@ -361,7 +361,7 @@
else
{
// chip not supported
- LOG_ERROR("0x%X is not support for avr", EXTRACT_PART(device_id));
+ LOG_ERROR("0x%" PRIx32 " is not support for avr", EXTRACT_PART(device_id));
avrf_info->probed = 1;
return ERROR_FAIL;
@@ -402,10 +402,10 @@
return ERROR_FAIL;
}
- LOG_INFO( "device id = 0x%08x", device_id );
+ LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
- LOG_ERROR("0x%X is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
+ LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
}
for (i = 0; i < (int)(sizeof(avft_chips_info) / sizeof(avft_chips_info[0])); i++)
@@ -422,7 +422,7 @@
if (avr_info != NULL)
{
// chip found
- snprintf(buf, buf_size, "%s - Rev: 0x%X", avr_info->name, EXTRACT_VER(device_id));
+ snprintf(buf, buf_size, "%s - Rev: 0x%" PRIx32 "", avr_info->name, EXTRACT_VER(device_id));
return ERROR_OK;
}
else
|
|
From: <du...@ma...> - 2009-06-21 05:20:35
|
Author: duane
Date: 2009-06-21 05:20:31 +0200 (Sun, 21 Jun 2009)
New Revision: 2336
Modified:
trunk/src/flash/lpc3180_nand_controller.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/lpc3180_nand_controller.c
===================================================================
--- trunk/src/flash/lpc3180_nand_controller.c 2009-06-21 03:20:26 UTC (rev 2335)
+++ trunk/src/flash/lpc3180_nand_controller.c 2009-06-21 03:20:31 UTC (rev 2336)
@@ -750,11 +750,11 @@
{
if (mlc_isr & 0x40)
{
- LOG_ERROR("uncorrectable error detected: 0x%2.2x", mlc_isr);
+ LOG_ERROR("uncorrectable error detected: 0x%2.2x", (unsigned)mlc_isr);
return ERROR_NAND_OPERATION_FAILED;
}
- LOG_WARNING("%i symbol error detected and corrected", ((mlc_isr & 0x30) >> 4) + 1);
+ LOG_WARNING("%i symbol error detected and corrected", ((int)(((mlc_isr & 0x30) >> 4) + 1)));
}
if (data)
|
|
From: <du...@ma...> - 2009-06-21 05:20:35
|
Author: duane
Date: 2009-06-21 05:20:26 +0200 (Sun, 21 Jun 2009)
New Revision: 2335
Modified:
trunk/src/flash/str9xpec.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/str9xpec.c
===================================================================
--- trunk/src/flash/str9xpec.c 2009-06-21 03:20:17 UTC (rev 2334)
+++ trunk/src/flash/str9xpec.c 2009-06-21 03:20:26 UTC (rev 2335)
@@ -652,7 +652,7 @@
if (offset & 0x7)
{
- LOG_WARNING("offset 0x%x breaks required 8-byte alignment", offset);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required 8-byte alignment", offset);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
@@ -831,7 +831,7 @@
idcode = buf_get_u32(buffer, 0, 32);
- command_print(cmd_ctx, "str9xpec part id: 0x%8.8x", idcode);
+ command_print(cmd_ctx, "str9xpec part id: 0x%8.8" PRIx32 "", idcode);
free(buffer);
|
|
From: <du...@ma...> - 2009-06-21 05:20:21
|
Author: duane
Date: 2009-06-21 05:20:17 +0200 (Sun, 21 Jun 2009)
New Revision: 2334
Modified:
trunk/src/flash/lpc2000.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/lpc2000.c
===================================================================
--- trunk/src/flash/lpc2000.c 2009-06-21 03:20:12 UTC (rev 2333)
+++ trunk/src/flash/lpc2000.c 2009-06-21 03:20:17 UTC (rev 2334)
@@ -497,7 +497,7 @@
if (offset % dst_min_alignment)
{
- LOG_WARNING("offset 0x%x breaks required alignment 0x%x", offset, dst_min_alignment);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required alignment 0x%" PRIx32, offset, dst_min_alignment);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
@@ -518,17 +518,17 @@
int i = 0;
for (i = 0; i < 8; i++)
{
- LOG_DEBUG("0x%2.2x: 0x%8.8x", i * 4, buf_get_u32(buffer + (i * 4), 0, 32));
+ LOG_DEBUG("0x%2.2x: 0x%8.8" PRIx32, i * 4, buf_get_u32(buffer + (i * 4), 0, 32));
if (i != 5)
checksum += buf_get_u32(buffer + (i * 4), 0, 32);
}
checksum = 0 - checksum;
- LOG_DEBUG("checksum: 0x%8.8x", checksum);
+ LOG_DEBUG("checksum: 0x%8.8" PRIx32, checksum);
uint32_t original_value=buf_get_u32(buffer + (5 * 4), 0, 32);
if (original_value!=checksum)
{
- LOG_WARNING("Verification will fail since checksum in image(0x%8.8x) written to flash was different from calculated vector checksum(0x%8.8x).",
+ LOG_WARNING("Verification will fail since checksum in image(0x%8.8" PRIx32 ") written to flash was different from calculated vector checksum(0x%8.8" PRIx32 ").",
original_value, checksum);
LOG_WARNING("To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.");
}
@@ -598,7 +598,7 @@
free(last_buffer);
}
- LOG_DEBUG("writing 0x%x bytes to address 0x%x", thisrun_bytes, bank->base + offset + bytes_written);
+ LOG_DEBUG("writing 0x%" PRIx32 " bytes to address 0x%" PRIx32 , thisrun_bytes, bank->base + offset + bytes_written);
/* Write data */
param_table[0] = bank->base + offset + bytes_written;
@@ -667,7 +667,7 @@
{
lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
- snprintf(buf, buf_size, "lpc2000 flash driver variant: %i, clk: %i", lpc2000_info->variant, lpc2000_info->cclk);
+ snprintf(buf, buf_size, "lpc2000 flash driver variant: %i, clk: %" PRIi32 , lpc2000_info->variant, lpc2000_info->cclk);
return ERROR_OK;
}
@@ -708,7 +708,7 @@
}
else
{
- command_print(cmd_ctx, "lpc2000 part id: 0x%8.8x", result_table[0]);
+ command_print(cmd_ctx, "lpc2000 part id: 0x%8.8" PRIx32 , result_table[0]);
}
return ERROR_OK;
|
|
From: <du...@ma...> - 2009-06-21 05:20:15
|
Author: duane
Date: 2009-06-21 05:20:12 +0200 (Sun, 21 Jun 2009)
New Revision: 2333
Modified:
trunk/src/flash/davinci_nand.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/davinci_nand.c
===================================================================
--- trunk/src/flash/davinci_nand.c 2009-06-21 03:20:06 UTC (rev 2332)
+++ trunk/src/flash/davinci_nand.c 2009-06-21 03:20:12 UTC (rev 2333)
@@ -94,7 +94,7 @@
*/
target_read_u32(target, info->aemif + NANDFCR, &nandfcr);
if (!(nandfcr & (1 << info->chipsel))) {
- LOG_ERROR("chip address %08x not NAND-enabled?", info->data);
+ LOG_ERROR("chip address %08" PRIx32 " not NAND-enabled?", info->data);
return ERROR_NAND_OPERATION_FAILED;
}
|
|
From: <du...@ma...> - 2009-06-21 05:20:09
|
Author: duane
Date: 2009-06-21 05:20:06 +0200 (Sun, 21 Jun 2009)
New Revision: 2332
Modified:
trunk/src/flash/mflash.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/mflash.c
===================================================================
--- trunk/src/flash/mflash.c 2009-06-21 03:20:00 UTC (rev 2331)
+++ trunk/src/flash/mflash.c 2009-06-21 03:20:06 UTC (rev 2332)
@@ -414,7 +414,7 @@
ret = mg_mflash_probe();
if (ret == ERROR_OK) {
- command_print(cmd_ctx, "mflash (total %u sectors) found at 0x%8.8x",
+ command_print(cmd_ctx, "mflash (total %" PRIu32 " sectors) found at 0x%8.8" PRIx32 "",
mflash_bank->drv_info->tot_sects, mflash_bank->base );
}
@@ -451,12 +451,12 @@
if (ret != ERROR_OK)
return ret;
- LOG_DEBUG("mflash: %u (0x%8.8x) sector read", sect_num + i, (sect_num + i) * MG_MFLASH_SECTOR_SIZE);
+ LOG_DEBUG("mflash: %" PRIu32 " (0x%8.8" PRIx32 ") sector read", sect_num + i, (sect_num + i) * MG_MFLASH_SECTOR_SIZE);
duration_stop_measure(&duration, NULL);
if ((duration.duration.tv_sec * 1000 + duration.duration.tv_usec / 1000) > 3000) {
- LOG_INFO("mflash: read %u'th sectors", sect_num + i);
+ LOG_INFO("mflash: read %" PRIu32 "'th sectors", sect_num + i);
duration_start_measure(&duration);
}
}
@@ -474,7 +474,7 @@
residue = sect_cnt % 256;
for (i = 0; i < quotient; i++) {
- LOG_DEBUG("mflash: sect num : %u buff : 0x%0lx", sect_num,
+ LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : 0x%0lx", sect_num,
(unsigned long)buff_ptr);
ret = mg_mflash_do_read_sects(buff_ptr, sect_num, 256);
if (ret != ERROR_OK)
@@ -485,7 +485,7 @@
}
if (residue) {
- LOG_DEBUG("mflash: sect num : %u buff : %0lx", sect_num,
+ LOG_DEBUG("mflash: sect num : %" PRIx32 " buff : %0lx", sect_num,
(unsigned long)buff_ptr);
return mg_mflash_do_read_sects(buff_ptr, sect_num, residue);
}
@@ -524,12 +524,12 @@
if (ret != ERROR_OK)
return ret;
- LOG_DEBUG("mflash: %u (0x%8.8x) sector write", sect_num + i, (sect_num + i) * MG_MFLASH_SECTOR_SIZE);
+ LOG_DEBUG("mflash: %" PRIu32 " (0x%8.8" PRIx32 ") sector write", sect_num + i, (sect_num + i) * MG_MFLASH_SECTOR_SIZE);
duration_stop_measure(&duration, NULL);
if ((duration.duration.tv_sec * 1000 + duration.duration.tv_usec / 1000) > 3000) {
- LOG_INFO("mflash: wrote %u'th sectors", sect_num + i);
+ LOG_INFO("mflash: wrote %" PRIu32 "'th sectors", sect_num + i);
duration_start_measure(&duration);
}
}
@@ -552,8 +552,8 @@
residue = sect_cnt % 256;
for (i = 0; i < quotient; i++) {
- LOG_DEBUG("mflash: sect num : %u buff : %0lx", sect_num,
- (unsigned long)buff_ptr);
+ LOG_DEBUG("mflash: sect num : %" PRIu32 "buff : %p", sect_num,
+ buff_ptr);
ret = mg_mflash_do_write_sects(buff_ptr, sect_num, 256, mg_io_cmd_write);
if (ret != ERROR_OK)
return ret;
@@ -563,8 +563,8 @@
}
if (residue) {
- LOG_DEBUG("mflash: sect num : %u buff : %0lx", sect_num,
- (unsigned long)buff_ptr);
+ LOG_DEBUG("mflash: sect num : %" PRIu32 " buff : %p", sect_num,
+ buff_ptr);
return mg_mflash_do_write_sects(buff_ptr, sect_num, residue, mg_io_cmd_write);
}
@@ -592,11 +592,11 @@
if (end_addr < next_sec_addr) {
memcpy(buff_ptr, sect_buff + (cur_addr & MG_MFLASH_SECTOR_SIZE_MASK), end_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte from sector offset 0x%8.8x", end_addr - cur_addr, cur_addr);
+ LOG_DEBUG("mflash: copies %" PRIu32 " byte from sector offset 0x%8.8" PRIx32 "", end_addr - cur_addr, cur_addr);
cur_addr = end_addr;
} else {
memcpy(buff_ptr, sect_buff + (cur_addr & MG_MFLASH_SECTOR_SIZE_MASK), next_sec_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte from sector offset 0x%8.8x", next_sec_addr - cur_addr, cur_addr);
+ LOG_DEBUG("mflash: copies %" PRIu32 " byte from sector offset 0x%8.8" PRIx32 "", next_sec_addr - cur_addr, cur_addr);
buff_ptr += (next_sec_addr - cur_addr);
cur_addr = next_sec_addr;
}
@@ -627,7 +627,7 @@
return ret;
memcpy(buff_ptr, sect_buff, end_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte", end_addr - cur_addr);
+ LOG_DEBUG("mflash: copies %u byte", (unsigned)(end_addr - cur_addr));
}
}
@@ -656,11 +656,11 @@
if (end_addr < next_sec_addr) {
memcpy(sect_buff + (cur_addr & MG_MFLASH_SECTOR_SIZE_MASK), buff_ptr, end_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte to sector offset 0x%8.8x", end_addr - cur_addr, cur_addr);
+ LOG_DEBUG("mflash: copies %" PRIu32 " byte to sector offset 0x%8.8" PRIx32 "", end_addr - cur_addr, cur_addr);
cur_addr = end_addr;
} else {
memcpy(sect_buff + (cur_addr & MG_MFLASH_SECTOR_SIZE_MASK), buff_ptr, next_sec_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte to sector offset 0x%8.8x", next_sec_addr - cur_addr, cur_addr);
+ LOG_DEBUG("mflash: copies %" PRIu32 " byte to sector offset 0x%8.8" PRIx32 "", next_sec_addr - cur_addr, cur_addr);
buff_ptr += (next_sec_addr - cur_addr);
cur_addr = next_sec_addr;
}
@@ -695,7 +695,7 @@
return ret;
memcpy(sect_buff, buff_ptr, end_addr - cur_addr);
- LOG_DEBUG("mflash: copies %u byte", end_addr - cur_addr);
+ LOG_DEBUG("mflash: copies %" PRIu32 " byte", end_addr - cur_addr);
ret = mg_mflash_write_sects(sect_buff, sect_num, 1);
}
}
@@ -819,7 +819,7 @@
duration_stop_measure(&duration, &duration_text);
- command_print(cmd_ctx, "dump image (address 0x%8.8x size %u) to file %s in %s (%f kB/s)",
+ command_print(cmd_ctx, "dump image (address 0x%8.8" PRIx32 " size %" PRIu32 ") to file %s in %s (%f kB/s)",
address, size, args[1], duration_text,
(float)size / 1024.0 / ((float)duration.duration.tv_sec + ((float)duration.duration.tv_usec / 1000000.0)));
@@ -1252,7 +1252,7 @@
return ERROR_MG_INVALID_PLL;
}
- LOG_INFO("mflash: Fout=%u Hz, feedback=%u,"
+ LOG_INFO("mflash: Fout=%" PRIu32 " Hz, feedback=%u,"
"indiv=%u, outdiv=%u, lock=%u",
(uint32_t)fout, pll.feedback_div,
pll.input_div, pll.output_div,
|
|
From: <du...@ma...> - 2009-06-21 05:20:04
|
Author: duane
Date: 2009-06-21 05:20:00 +0200 (Sun, 21 Jun 2009)
New Revision: 2331
Modified:
trunk/src/flash/cfi.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/cfi.c
===================================================================
--- trunk/src/flash/cfi.c 2009-06-21 03:19:55 UTC (rev 2330)
+++ trunk/src/flash/cfi.c 2009-06-21 03:20:00 UTC (rev 2331)
@@ -378,7 +378,10 @@
pri_ext->suspend_cmd_support = cfi_query_u8(bank, 0, cfi_info->pri_addr + 9);
pri_ext->blk_status_reg_mask = cfi_query_u16(bank, 0, cfi_info->pri_addr + 0xa);
- LOG_DEBUG("feature_support: 0x%x, suspend_cmd_support: 0x%x, blk_status_reg_mask: 0x%x", pri_ext->feature_support, pri_ext->suspend_cmd_support, pri_ext->blk_status_reg_mask);
+ LOG_DEBUG("feature_support: 0x%" PRIx32 ", suspend_cmd_support: 0x%x, blk_status_reg_mask: 0x%x",
+ pri_ext->feature_support,
+ pri_ext->suspend_cmd_support,
+ pri_ext->blk_status_reg_mask);
pri_ext->vcc_optimal = cfi_query_u8(bank, 0, cfi_info->pri_addr + 0xc);
pri_ext->vpp_optimal = cfi_query_u8(bank, 0, cfi_info->pri_addr + 0xd);
@@ -597,7 +600,7 @@
buf += printed;
buf_size -= printed;
- printed = snprintf(buf, buf_size, "feature_support: 0x%x, suspend_cmd_support: 0x%x, blk_status_reg_mask: 0x%x\n", pri_ext->feature_support, pri_ext->suspend_cmd_support, pri_ext->blk_status_reg_mask);
+ printed = snprintf(buf, buf_size, "feature_support: 0x%" PRIx32 ", suspend_cmd_support: 0x%x, blk_status_reg_mask: 0x%x\n", pri_ext->feature_support, pri_ext->suspend_cmd_support, pri_ext->blk_status_reg_mask);
buf += printed;
buf_size -= printed;
@@ -709,7 +712,7 @@
return retval;
}
- LOG_ERROR("couldn't erase block %i of flash bank at base 0x%x", i, bank->base);
+ LOG_ERROR("couldn't erase block %i of flash bank at base 0x%" PRIx32 , i, bank->base);
return ERROR_FLASH_OPERATION_FAILED;
}
}
@@ -776,7 +779,7 @@
return retval;
}
- LOG_ERROR("couldn't erase block %i of flash bank at base 0x%x", i, bank->base);
+ LOG_ERROR("couldn't erase block %i of flash bank at base 0x%" PRIx32, i, bank->base);
return ERROR_FLASH_OPERATION_FAILED;
}
}
@@ -841,7 +844,7 @@
for (i = first; i <= last; i++)
{
cfi_command(bank, 0x60, command);
- LOG_DEBUG("address: 0x%4.4x, command: 0x%4.4x", flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
+ LOG_DEBUG("address: 0x%4.4" PRIx32 ", command: 0x%4.4" PRIx32, flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
if((retval = target_write_memory(target, flash_address(bank, i, 0x0), bank->bus_width, 1, command)) != ERROR_OK)
{
return retval;
@@ -849,7 +852,7 @@
if (set)
{
cfi_command(bank, 0x01, command);
- LOG_DEBUG("address: 0x%4.4x, command: 0x%4.4x", flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
+ LOG_DEBUG("address: 0x%4.4" PRIx32 ", command: 0x%4.4" PRIx32 , flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
if((retval = target_write_memory(target, flash_address(bank, i, 0x0), bank->bus_width, 1, command)) != ERROR_OK)
{
return retval;
@@ -859,7 +862,7 @@
else
{
cfi_command(bank, 0xd0, command);
- LOG_DEBUG("address: 0x%4.4x, command: 0x%4.4x", flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
+ LOG_DEBUG("address: 0x%4.4" PRIx32 ", command: 0x%4.4" PRIx32, flash_address(bank, i, 0x0), target_buffer_get_u32(target, command));
if((retval = target_write_memory(target, flash_address(bank, i, 0x0), bank->bus_width, 1, command)) != ERROR_OK)
{
return retval;
@@ -1203,7 +1206,7 @@
busy_pattern_val = cfi_command_val(bank, 0x80);
error_pattern_val = cfi_command_val(bank, 0x7e);
- LOG_INFO("Using target buffer at 0x%08x and of size 0x%04x", source->address, buffer_size );
+ LOG_INFO("Using target buffer at 0x%08" PRIx32 " and of size 0x%04" PRIx32, source->address, buffer_size );
/* Programming main loop */
while (count > 0)
@@ -1224,7 +1227,7 @@
buf_set_u32(reg_params[5].value, 0, 32, busy_pattern_val);
buf_set_u32(reg_params[6].value, 0, 32, error_pattern_val);
- LOG_INFO("Write 0x%04x bytes to flash at 0x%08x", thisrun_count, address );
+ LOG_INFO("Write 0x%04" PRIx32 " bytes to flash at 0x%08" PRIx32 , thisrun_count, address );
/* Execute algorithm, assume breakpoint for last instruction */
retval = target_run_algorithm(target, 0, NULL, 7, reg_params,
@@ -1519,7 +1522,7 @@
if ((retval != ERROR_OK) || (retvaltemp != ERROR_OK) || status != 0x80)
{
- LOG_DEBUG("status: 0x%x", status);
+ LOG_DEBUG("status: 0x%" PRIx32 , status);
exit_code = ERROR_FLASH_OPERATION_FAILED;
break;
}
@@ -1572,7 +1575,7 @@
return retval;
}
- LOG_ERROR("couldn't write word at base 0x%x, address %x", bank->base, address);
+ LOG_ERROR("couldn't write word at base 0x%" PRIx32 ", address %" PRIx32 , bank->base, address);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1594,7 +1597,8 @@
/* Check for valid range */
if (address & buffermask)
{
- LOG_ERROR("Write address at base 0x%x, address %x not aligned to 2^%d boundary", bank->base, address, cfi_info->max_buf_write_size);
+ LOG_ERROR("Write address at base 0x%" PRIx32 ", address %" PRIx32 " not aligned to 2^%d boundary",
+ bank->base, address, cfi_info->max_buf_write_size);
return ERROR_FLASH_OPERATION_FAILED;
}
switch(bank->chip_width)
@@ -1613,7 +1617,7 @@
/* Check for valid size */
if (wordcount > bufferwsize)
{
- LOG_ERROR("Number of data words %d exceeds available buffersize %d", wordcount, buffersize);
+ LOG_ERROR("Number of data words %" PRId32 " exceeds available buffersize %" PRId32 , wordcount, buffersize);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1634,7 +1638,7 @@
return retval;
}
- LOG_ERROR("couldn't start buffer write operation at base 0x%x, address %x", bank->base, address);
+ LOG_ERROR("couldn't start buffer write operation at base 0x%" PRIx32 ", address %" PRIx32 , bank->base, address);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1664,7 +1668,7 @@
return retval;
}
- LOG_ERROR("Buffer write at base 0x%x, address %x failed.", bank->base, address);
+ LOG_ERROR("Buffer write at base 0x%" PRIx32 ", address %" PRIx32 " failed.", bank->base, address);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1710,7 +1714,7 @@
return retval;
}
- LOG_ERROR("couldn't write word at base 0x%x, address %x", bank->base, address);
+ LOG_ERROR("couldn't write word at base 0x%" PRIx32 ", address %" PRIx32 , bank->base, address);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1733,7 +1737,7 @@
/* Check for valid range */
if (address & buffermask)
{
- LOG_ERROR("Write address at base 0x%x, address %x not aligned to 2^%d boundary", bank->base, address, cfi_info->max_buf_write_size);
+ LOG_ERROR("Write address at base 0x%" PRIx32 ", address %" PRIx32 " not aligned to 2^%d boundary", bank->base, address, cfi_info->max_buf_write_size);
return ERROR_FLASH_OPERATION_FAILED;
}
switch(bank->chip_width)
@@ -1751,7 +1755,7 @@
/* Check for valid size */
if (wordcount > bufferwsize)
{
- LOG_ERROR("Number of data words %d exceeds available buffersize %d", wordcount, buffersize);
+ LOG_ERROR("Number of data words %" PRId32 " exceeds available buffersize %" PRId32, wordcount, buffersize);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1802,7 +1806,7 @@
return retval;
}
- LOG_ERROR("couldn't write block at base 0x%x, address %x, size %x", bank->base, address, bufferwsize);
+ LOG_ERROR("couldn't write block at base 0x%" PRIx32 ", address %" PRIx32 ", size %" PRIx32 , bank->base, address, bufferwsize);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -1972,7 +1976,7 @@
int fallback;
if ((write_p & 0xff) == 0)
{
- LOG_INFO("Programming at %08x, count %08x bytes remaining", write_p, count);
+ LOG_INFO("Programming at %08" PRIx32 ", count %08" PRIx32 " bytes remaining", write_p, count);
}
fallback = 1;
if ((bufferwsize > 0) && (count >= buffersize) && !(write_p & buffermask))
@@ -2025,7 +2029,7 @@
/* handle unaligned tail bytes */
if (count > 0)
{
- LOG_INFO("Fixup %d unaligned tail bytes", count );
+ LOG_INFO("Fixup %" PRId32 " unaligned tail bytes", count );
copy_p = write_p;
for (i = 0; i < bank->bus_width; i++)
@@ -2267,7 +2271,7 @@
cfi_info->max_buf_write_size = cfi_query_u16(bank, 0, 0x2a);
cfi_info->num_erase_regions = cfi_query_u8(bank, 0, 0x2c);
- LOG_DEBUG("size: 0x%x, interface desc: %i, max buffer write size: %x", cfi_info->dev_size, cfi_info->interface_desc, (1 << cfi_info->max_buf_write_size));
+ LOG_DEBUG("size: 0x%" PRIx32 ", interface desc: %i, max buffer write size: %x", cfi_info->dev_size, cfi_info->interface_desc, (1 << cfi_info->max_buf_write_size));
if (cfi_info->num_erase_regions)
{
@@ -2275,7 +2279,10 @@
for (i = 0; i < cfi_info->num_erase_regions; i++)
{
cfi_info->erase_region_info[i] = cfi_query_u32(bank, 0, 0x2d + (4 * i));
- LOG_DEBUG("erase region[%i]: %i blocks of size 0x%x", i, (cfi_info->erase_region_info[i] & 0xffff) + 1, (cfi_info->erase_region_info[i] >> 16) * 256);
+ LOG_DEBUG("erase region[%i]: %" PRIu32 " blocks of size 0x%" PRIx32 "",
+ i,
+ (cfi_info->erase_region_info[i] & 0xffff) + 1,
+ (cfi_info->erase_region_info[i] >> 16) * 256);
}
}
else
@@ -2337,7 +2344,7 @@
if ((cfi_info->dev_size * bank->bus_width / bank->chip_width) != bank->size)
{
- LOG_WARNING("configuration specifies 0x%x size, but a 0x%x size flash was found", bank->size, cfi_info->dev_size);
+ LOG_WARNING("configuration specifies 0x%" PRIx32 " size, but a 0x%" PRIx32 " size flash was found", bank->size, cfi_info->dev_size);
}
if (cfi_info->num_erase_regions == 0)
@@ -2378,7 +2385,7 @@
}
if (offset != cfi_info->dev_size)
{
- LOG_WARNING("CFI size is 0x%x, but total sector size is 0x%x", cfi_info->dev_size, offset);
+ LOG_WARNING("CFI size is 0x%" PRIx32 ", but total sector size is 0x%" PRIx32 "", cfi_info->dev_size, offset);
}
}
@@ -2553,7 +2560,7 @@
buf += printed;
buf_size -= printed;
- printed = snprintf(buf, buf_size, "size: 0x%x, interface desc: %i, max buffer write size: %x\n",
+ printed = snprintf(buf, buf_size, "size: 0x%" PRIx32 ", interface desc: %i, max buffer write size: %x\n",
cfi_info->dev_size,
cfi_info->interface_desc,
1 << cfi_info->max_buf_write_size);
|
|
From: <du...@ma...> - 2009-06-21 05:19:58
|
Author: duane
Date: 2009-06-21 05:19:55 +0200 (Sun, 21 Jun 2009)
New Revision: 2330
Modified:
trunk/src/flash/stm32x.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/stm32x.c
===================================================================
--- trunk/src/flash/stm32x.c 2009-06-21 03:19:51 UTC (rev 2329)
+++ trunk/src/flash/stm32x.c 2009-06-21 03:19:55 UTC (rev 2330)
@@ -118,7 +118,7 @@
/* wait for busy to clear */
while (((status = stm32x_get_flash_status(bank)) & FLASH_BSY) && (timeout-- > 0))
{
- LOG_DEBUG("status: 0x%x", status);
+ LOG_DEBUG("status: 0x%" PRIx32 "", status);
alive_sleep(1);
}
/* Clear but report errors */
@@ -614,7 +614,7 @@
if (offset & 0x1)
{
- LOG_WARNING("offset 0x%x breaks required 2-byte alignment", offset);
+ LOG_WARNING("offset 0x%" PRIx32 " breaks required 2-byte alignment", offset);
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
}
@@ -720,7 +720,7 @@
/* read stm32 device id register */
target_read_u32(target, 0xE0042000, &device_id);
- LOG_INFO( "device id = 0x%08x", device_id );
+ LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
/* get flash size from target */
if (target_read_u16(target, 0x1FFFF7E0, &num_pages) != ERROR_OK)
@@ -1061,7 +1061,7 @@
}
target_read_u32(target, STM32_FLASH_OBR, &optionbyte);
- command_print(cmd_ctx, "Option Byte: 0x%x", optionbyte);
+ command_print(cmd_ctx, "Option Byte: 0x%" PRIx32 "", optionbyte);
if (buf_get_u32((uint8_t*)&optionbyte, OPT_ERROR, 1))
command_print(cmd_ctx, "Option Byte Complement Error");
|
|
From: <du...@ma...> - 2009-06-21 05:19:53
|
Author: duane
Date: 2009-06-21 05:19:51 +0200 (Sun, 21 Jun 2009)
New Revision: 2329
Modified:
trunk/src/flash/tms470.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/flash/tms470.c
===================================================================
--- trunk/src/flash/tms470.c 2009-06-21 03:17:52 UTC (rev 2328)
+++ trunk/src/flash/tms470.c 2009-06-21 03:19:51 UTC (rev 2329)
@@ -150,7 +150,7 @@
/* read and parse the device identification register */
target_read_u32(target, 0xFFFFFFF0, &device_ident_reg);
- LOG_INFO("device_ident_reg=0x%08x", device_ident_reg);
+ LOG_INFO("device_ident_reg=0x%08" PRIx32 "", device_ident_reg);
if ((device_ident_reg & 7) == 0)
{
@@ -176,7 +176,7 @@
if (bank->base >= 0x00040000)
{
- LOG_ERROR("No %s flash bank contains base address 0x%08x.", part_name, bank->base);
+ LOG_ERROR("No %s flash bank contains base address 0x%08" PRIx32 ".", part_name, bank->base);
return ERROR_FLASH_OPERATION_FAILED;
}
tms470_info->ordinal = 0;
@@ -222,7 +222,7 @@
}
else
{
- LOG_ERROR("No %s flash bank contains base address 0x%08x.", part_name, bank->base);
+ LOG_ERROR("No %s flash bank contains base address 0x%08" PRIx32 ".", part_name, bank->base);
return ERROR_FLASH_OPERATION_FAILED;
}
break;
@@ -271,13 +271,13 @@
}
else
{
- LOG_ERROR("No %s flash bank contains base address 0x%08x.", part_name, bank->base);
+ LOG_ERROR("No %s flash bank contains base address 0x%08" PRIx32 ".", part_name, bank->base);
return ERROR_FLASH_OPERATION_FAILED;
}
break;
default:
- LOG_WARNING("Could not identify part 0x%02x as a member of the TMS470 family.", part_number);
+ LOG_WARNING("Could not identify part 0x%02x as a member of the TMS470 family.", (unsigned)part_number);
return ERROR_FLASH_OPERATION_FAILED;
}
@@ -288,7 +288,11 @@
bank->chip_width = 32;
bank->bus_width = 32;
- LOG_INFO("Identified %s, ver=%d, core=%s, nvmem=%s.", part_name, silicon_version, (technology_family ? "1.8v" : "3.3v"), (rom_flash ? "rom" : "flash"));
+ LOG_INFO("Identified %s, ver=%d, core=%s, nvmem=%s.",
+ part_name,
+ (int)(silicon_version),
+ (technology_family ? "1.8v" : "3.3v"),
+ (rom_flash ? "rom" : "flash"));
tms470_info->device_ident_reg = device_ident_reg;
tms470_info->silicon_version = silicon_version;
@@ -325,7 +329,7 @@
{
int start = (0 == strncmp(args[i], "0x", 2)) ? 2 : 0;
- if (1 != sscanf(&args[i][start], "%x", &flashKeys[i]))
+ if (1 != sscanf(&args[i][start], "%" SCNx32 "", &flashKeys[i]))
{
command_print(cmd_ctx, "could not process flash key %s", args[i]);
LOG_ERROR("could not process flash key %s", args[i]);
@@ -343,7 +347,8 @@
if (keysSet)
{
- command_print(cmd_ctx, "using flash keys 0x%08x, 0x%08x, 0x%08x, 0x%08x", flashKeys[0], flashKeys[1], flashKeys[2], flashKeys[3]);
+ command_print(cmd_ctx, "using flash keys 0x%08" PRIx32 ", 0x%08" PRIx32 ", 0x%08" PRIx32 ", 0x%08" PRIx32 "",
+ flashKeys[0], flashKeys[1], flashKeys[2], flashKeys[3]);
}
else
{
@@ -427,7 +432,7 @@
uint32_t fmbbusy;
target_read_u32(target, 0xFFE89C08, &fmbbusy);
- LOG_INFO("tms470 fmbbusy=0x%08x -> %s", fmbbusy, fmbbusy & 0x8000 ? "unlocked" : "LOCKED");
+ LOG_INFO("tms470 fmbbusy=0x%08" PRIx32 " -> %s", fmbbusy, fmbbusy & 0x8000 ? "unlocked" : "LOCKED");
return fmbbusy & 0x8000 ? ERROR_OK : ERROR_FLASH_OPERATION_FAILED;
}
@@ -477,7 +482,7 @@
*/
target_read_u32(target, 0x00001FF0 + 4 * i, &tmp);
- LOG_INFO("tms470 writing fmpkey=0x%08x", key_set[i]);
+ LOG_INFO("tms470 writing fmpkey=0x%08" PRIx32 "", key_set[i]);
target_write_u32(target, 0xFFE89C0C, key_set[i]);
}
@@ -565,7 +570,7 @@
fmmac2 &= ~0x0007;
fmmac2 |= (tms470_info->ordinal & 7);
target_write_u32(target, 0xFFE8BC04, fmmac2);
- LOG_DEBUG("set fmmac2=0x%04x", fmmac2);
+ LOG_DEBUG("set fmmac2=0x%04" PRIx32 "", fmmac2);
/*
* Disable level 1 sector protection by setting bit 15 of FMMAC1.
@@ -573,7 +578,7 @@
target_read_u32(target, 0xFFE8BC00, &fmmac1);
fmmac1 |= 0x8000;
target_write_u32(target, 0xFFE8BC00, fmmac1);
- LOG_DEBUG("set fmmac1=0x%04x", fmmac1);
+ LOG_DEBUG("set fmmac1=0x%04" PRIx32 "", fmmac1);
/*
* FMTCREG=0x2fc0;
@@ -610,7 +615,7 @@
LOG_DEBUG("set fmptr3=0x9b64");
}
target_write_u32(target, 0xFFE8A080, fmmaxep);
- LOG_DEBUG("set fmmaxep=0x%04x", fmmaxep);
+ LOG_DEBUG("set fmmaxep=0x%04" PRIx32 "", fmmaxep);
/*
* FMPTR4=0xa000
@@ -630,56 +635,56 @@
sysclk = (plldis ? 1 : (glbctrl & 0x08) ? 4 : 8) * oscMHz / (1 + (glbctrl & 7));
delay = (sysclk > 10) ? (sysclk + 1) / 2 : 5;
target_write_u32(target, 0xFFE8A018, (delay << 4) | (delay << 8));
- LOG_DEBUG("set fmpsetup=0x%04x", (delay << 4) | (delay << 8));
+ LOG_DEBUG("set fmpsetup=0x%04" PRIx32 "", (delay << 4) | (delay << 8));
/*
* FMPVEVACCESS, based on delay.
*/
k = delay | (delay << 8);
target_write_u32(target, 0xFFE8A05C, k);
- LOG_DEBUG("set fmpvevaccess=0x%04x", k);
+ LOG_DEBUG("set fmpvevaccess=0x%04" PRIx32 "", k);
/*
* FMPCHOLD, FMPVEVHOLD, FMPVEVSETUP, based on delay.
*/
k <<= 1;
target_write_u32(target, 0xFFE8A034, k);
- LOG_DEBUG("set fmpchold=0x%04x", k);
+ LOG_DEBUG("set fmpchold=0x%04" PRIx32 "", k);
target_write_u32(target, 0xFFE8A040, k);
- LOG_DEBUG("set fmpvevhold=0x%04x", k);
+ LOG_DEBUG("set fmpvevhold=0x%04" PRIx32 "", k);
target_write_u32(target, 0xFFE8A024, k);
- LOG_DEBUG("set fmpvevsetup=0x%04x", k);
+ LOG_DEBUG("set fmpvevsetup=0x%04" PRIx32 "", k);
/*
* FMCVACCESS, based on delay.
*/
k = delay * 16;
target_write_u32(target, 0xFFE8A060, k);
- LOG_DEBUG("set fmcvaccess=0x%04x", k);
+ LOG_DEBUG("set fmcvaccess=0x%04" PRIx32 "", k);
/*
* FMCSETUP, based on delay.
*/
k = 0x3000 | delay * 20;
target_write_u32(target, 0xFFE8A020, k);
- LOG_DEBUG("set fmcsetup=0x%04x", k);
+ LOG_DEBUG("set fmcsetup=0x%04" PRIx32 "", k);
/*
* FMEHOLD, based on delay.
*/
k = (delay * 20) << 2;
target_write_u32(target, 0xFFE8A038, k);
- LOG_DEBUG("set fmehold=0x%04x", k);
+ LOG_DEBUG("set fmehold=0x%04" PRIx32 "", k);
/*
* PWIDTH, CWIDTH, EWIDTH, based on delay.
*/
target_write_u32(target, 0xFFE8A050, delay * 8);
- LOG_DEBUG("set fmpwidth=0x%04x", delay * 8);
+ LOG_DEBUG("set fmpwidth=0x%04" PRIx32 "", delay * 8);
target_write_u32(target, 0xFFE8A058, delay * 1000);
- LOG_DEBUG("set fmcwidth=0x%04x", delay * 1000);
+ LOG_DEBUG("set fmcwidth=0x%04" PRIx32 "", delay * 1000);
target_write_u32(target, 0xFFE8A054, delay * 5400);
- LOG_DEBUG("set fmewidth=0x%04x", delay * 5400);
+ LOG_DEBUG("set fmewidth=0x%04" PRIx32 "", delay * 5400);
return result;
}
@@ -693,7 +698,7 @@
uint32_t fmmstat;
target_read_u32(target, 0xFFE8BC0C, &fmmstat);
- LOG_DEBUG("set fmmstat=0x%04x", fmmstat);
+ LOG_DEBUG("set fmmstat=0x%04" PRIx32 "", fmmstat);
if (fmmstat & 0x0080)
{
@@ -755,7 +760,7 @@
*/
target_read_u32(target, 0xFFFFFFDC, &glbctrl);
target_write_u32(target, 0xFFFFFFDC, glbctrl | 0x10);
- LOG_DEBUG("set glbctrl=0x%08x", glbctrl | 0x10);
+ LOG_DEBUG("set glbctrl=0x%08" PRIx32 "", glbctrl | 0x10);
/* Force normal read mode. */
target_read_u32(target, 0xFFE89C00, &orig_fmregopt);
@@ -772,13 +777,13 @@
{
target_read_u32(target, 0xFFE88008, &fmbsea);
target_write_u32(target, 0xFFE88008, fmbsea | (1 << sector));
- LOG_DEBUG("set fmbsea=0x%04x", fmbsea | (1 << sector));
+ LOG_DEBUG("set fmbsea=0x%04" PRIx32 "", fmbsea | (1 << sector));
}
else
{
target_read_u32(target, 0xFFE8800C, &fmbseb);
target_write_u32(target, 0xFFE8800C, fmbseb | (1 << (sector - 16)));
- LOG_DEBUG("set fmbseb=0x%04x", fmbseb | (1 << (sector - 16)));
+ LOG_DEBUG("set fmbseb=0x%04" PRIx32 "", fmbseb | (1 << (sector - 16)));
}
bank->sectors[sector].is_protected = 0;
@@ -786,11 +791,11 @@
* clear status regiser, sent erase command, kickoff erase
*/
target_write_u16(target, flashAddr, 0x0040);
- LOG_DEBUG("write *(uint16_t *)0x%08x=0x0040", flashAddr);
+ LOG_DEBUG("write *(uint16_t *)0x%08" PRIx32 "=0x0040", flashAddr);
target_write_u16(target, flashAddr, 0x0020);
- LOG_DEBUG("write *(uint16_t *)0x%08x=0x0020", flashAddr);
+ LOG_DEBUG("write *(uint16_t *)0x%08" PRIx32 "=0x0020", flashAddr);
target_write_u16(target, flashAddr, 0xffff);
- LOG_DEBUG("write *(uint16_t *)0x%08x=0xffff", flashAddr);
+ LOG_DEBUG("write *(uint16_t *)0x%08" PRIx32 "=0xffff", flashAddr);
/*
* Monitor FMMSTAT, busy until clear, then check and other flags for
@@ -811,19 +816,19 @@
if (sector < 16)
{
target_write_u32(target, 0xFFE88008, fmbsea);
- LOG_DEBUG("set fmbsea=0x%04x", fmbsea);
+ LOG_DEBUG("set fmbsea=0x%04" PRIx32 "", fmbsea);
bank->sectors[sector].is_protected = fmbsea & (1 << sector) ? 0 : 1;
}
else
{
target_write_u32(target, 0xFFE8800C, fmbseb);
- LOG_DEBUG("set fmbseb=0x%04x", fmbseb);
+ LOG_DEBUG("set fmbseb=0x%04" PRIx32 "", fmbseb);
bank->sectors[sector].is_protected = fmbseb & (1 << (sector - 16)) ? 0 : 1;
}
target_write_u32(target, 0xFFE89C00, orig_fmregopt);
- LOG_DEBUG("set fmregopt=0x%08x", orig_fmregopt);
+ LOG_DEBUG("set fmregopt=0x%08" PRIx32 "", orig_fmregopt);
target_write_u32(target, 0xFFFFFFDC, glbctrl);
- LOG_DEBUG("set glbctrl=0x%08x", glbctrl);
+ LOG_DEBUG("set glbctrl=0x%08" PRIx32 "", glbctrl);
if (result == ERROR_OK)
{
@@ -964,7 +969,7 @@
tms470_read_part_info(bank);
- LOG_INFO("Writing %d bytes starting at 0x%08x", count, bank->base + offset);
+ LOG_INFO("Writing %" PRId32 " bytes starting at 0x%08" PRIx32 "", count, bank->base + offset);
/* set GLBCTRL.4 */
target_read_u32(target, 0xFFFFFFDC, &glbctrl);
@@ -998,7 +1003,7 @@
if (word != 0xffff)
{
- LOG_INFO("writing 0x%04x at 0x%08x", word, addr);
+ LOG_INFO("writing 0x%04x at 0x%08" PRIx32 "", word, addr);
/* clear status register */
target_write_u16(target, addr, 0x0040);
@@ -1023,15 +1028,15 @@
if (fmmstat & 0x3ff)
{
- LOG_ERROR("fmstat=0x%04x", fmmstat);
- LOG_ERROR("Could not program word 0x%04x at address 0x%08x.", word, addr);
+ LOG_ERROR("fmstat=0x%04" PRIx32 "", fmmstat);
+ LOG_ERROR("Could not program word 0x%04x at address 0x%08" PRIx32 ".", word, addr);
result = ERROR_FLASH_OPERATION_FAILED;
break;
}
}
else
{
- LOG_INFO("skipping 0xffff at 0x%08x", addr);
+ LOG_INFO("skipping 0xffff at 0x%08" PRIx32 "", addr);
}
}
@@ -1131,7 +1136,7 @@
if (buffer[i] != 0xff)
{
LOG_WARNING("tms470 bank %d, sector %d, not erased.", tms470_info->ordinal, sector);
- LOG_WARNING("at location 0x%08x: flash data is 0x%02x.", addr + i, buffer[i]);
+ LOG_WARNING("at location 0x%08" PRIx32 ": flash data is 0x%02x.", addr + i, buffer[i]);
bank->sectors[sector].is_erased = 0;
break;
|
|
From: <du...@ma...> - 2009-06-21 05:17:55
|
Author: duane
Date: 2009-06-21 05:17:52 +0200 (Sun, 21 Jun 2009)
New Revision: 2328
Modified:
trunk/src/target/xscale.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/xscale.c
===================================================================
--- trunk/src/target/xscale.c 2009-06-21 03:17:46 UTC (rev 2327)
+++ trunk/src/target/xscale.c 2009-06-21 03:17:52 UTC (rev 2328)
@@ -765,7 +765,7 @@
scan_field_t fields[2];
- LOG_DEBUG("loading miniIC at 0x%8.8x", va);
+ LOG_DEBUG("loading miniIC at 0x%8.8" PRIx32 "", va);
jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.ldic); /* LDIC */
@@ -955,7 +955,7 @@
}
LOG_USER("target halted in %s state due to %s, current mode: %s\n"
- "cpsr: 0x%8.8x pc: 0x%8.8x\n"
+ "cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "\n"
"MMU: %s, D-Cache: %s, I-Cache: %s"
"%s",
armv4_5_state_strings[armv4_5->core_state],
@@ -1039,13 +1039,13 @@
buf_set_u32(armv4_5->core_cache->reg_list[0].value, 0, 32, buffer[0]);
armv4_5->core_cache->reg_list[15].dirty = 1;
armv4_5->core_cache->reg_list[15].valid = 1;
- LOG_DEBUG("r0: 0x%8.8x", buffer[0]);
+ LOG_DEBUG("r0: 0x%8.8" PRIx32 "", buffer[0]);
/* move pc from buffer to register cache */
buf_set_u32(armv4_5->core_cache->reg_list[15].value, 0, 32, buffer[1]);
armv4_5->core_cache->reg_list[15].dirty = 1;
armv4_5->core_cache->reg_list[15].valid = 1;
- LOG_DEBUG("pc: 0x%8.8x", buffer[1]);
+ LOG_DEBUG("pc: 0x%8.8" PRIx32 "", buffer[1]);
/* move data from buffer to register cache */
for (i = 1; i <= 7; i++)
@@ -1053,13 +1053,13 @@
buf_set_u32(armv4_5->core_cache->reg_list[i].value, 0, 32, buffer[1 + i]);
armv4_5->core_cache->reg_list[i].dirty = 1;
armv4_5->core_cache->reg_list[i].valid = 1;
- LOG_DEBUG("r%i: 0x%8.8x", i, buffer[i + 1]);
+ LOG_DEBUG("r%i: 0x%8.8" PRIx32 "", i, buffer[i + 1]);
}
buf_set_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32, buffer[9]);
armv4_5->core_cache->reg_list[ARMV4_5_CPSR].dirty = 1;
armv4_5->core_cache->reg_list[ARMV4_5_CPSR].valid = 1;
- LOG_DEBUG("cpsr: 0x%8.8x", buffer[9]);
+ LOG_DEBUG("cpsr: 0x%8.8" PRIx32 "", buffer[9]);
armv4_5->core_mode = buffer[9] & 0x1f;
if (armv4_5_mode_to_number(armv4_5->core_mode) == -1)
@@ -1321,7 +1321,7 @@
uint32_t next_pc;
/* there's a breakpoint at the current PC, we have to step over it */
- LOG_DEBUG("unset breakpoint at 0x%8.8x", breakpoint->address);
+ LOG_DEBUG("unset breakpoint at 0x%8.8" PRIx32 "", breakpoint->address);
xscale_unset_breakpoint(target, breakpoint);
/* calculate PC of next instruction */
@@ -1329,7 +1329,7 @@
{
uint32_t current_opcode;
target_read_u32(target, current_pc, ¤t_opcode);
- LOG_ERROR("BUG: couldn't calculate PC of next instruction, current opcode was 0x%8.8x", current_opcode);
+ LOG_ERROR("BUG: couldn't calculate PC of next instruction, current opcode was 0x%8.8" PRIx32 "", current_opcode);
}
LOG_DEBUG("enable single-step");
@@ -1350,18 +1350,18 @@
/* send CPSR */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
- LOG_DEBUG("writing cpsr with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
+ LOG_DEBUG("writing cpsr with value 0x%8.8" PRIx32 "", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
for (i = 7; i >= 0; i--)
{
/* send register */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
- LOG_DEBUG("writing r%i with value 0x%8.8x", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
+ LOG_DEBUG("writing r%i with value 0x%8.8" PRIx32 "", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
}
/* send PC */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
- LOG_DEBUG("writing PC with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
+ LOG_DEBUG("writing PC with value 0x%8.8" PRIx32 "", buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
/* wait for and process debug entry */
xscale_debug_entry(target);
@@ -1369,7 +1369,7 @@
LOG_DEBUG("disable single-step");
xscale_disable_single_step(target);
- LOG_DEBUG("set breakpoint at 0x%8.8x", breakpoint->address);
+ LOG_DEBUG("set breakpoint at 0x%8.8" PRIx32 "", breakpoint->address);
xscale_set_breakpoint(target, breakpoint);
}
}
@@ -1393,18 +1393,18 @@
/* send CPSR */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
- LOG_DEBUG("writing cpsr with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
+ LOG_DEBUG("writing cpsr with value 0x%8.8" PRIx32 "", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
for (i = 7; i >= 0; i--)
{
/* send register */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
- LOG_DEBUG("writing r%i with value 0x%8.8x", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
+ LOG_DEBUG("writing r%i with value 0x%8.8" PRIx32 "", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
}
/* send PC */
xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
- LOG_DEBUG("writing PC with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
+ LOG_DEBUG("writing PC with value 0x%8.8" PRIx32 "", buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
target->debug_reason = DBG_REASON_NOTHALTED;
@@ -1446,7 +1446,7 @@
current_pc = buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32);
target_read_u32(target, current_pc, ¤t_opcode);
- LOG_ERROR("BUG: couldn't calculate PC of next instruction, current opcode was 0x%8.8x", current_opcode);
+ LOG_ERROR("BUG: couldn't calculate PC of next instruction, current opcode was 0x%8.8" PRIx32 "", current_opcode);
return retval;
}
@@ -1474,20 +1474,20 @@
/* send CPSR */
if ((retval=xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32)))!=ERROR_OK)
return retval;
- LOG_DEBUG("writing cpsr with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
+ LOG_DEBUG("writing cpsr with value 0x%8.8" PRIx32 "", buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32));
for (i = 7; i >= 0; i--)
{
/* send register */
if ((retval=xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32)))!=ERROR_OK)
return retval;
- LOG_DEBUG("writing r%i with value 0x%8.8x", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
+ LOG_DEBUG("writing r%i with value 0x%8.8" PRIx32 "", i, buf_get_u32(armv4_5->core_cache->reg_list[i].value, 0, 32));
}
/* send PC */
if ((retval=xscale_send_u32(target, buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32)))!=ERROR_OK)
return retval;
- LOG_DEBUG("writing PC with value 0x%8.8x", buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
+ LOG_DEBUG("writing PC with value 0x%8.8" PRIx32, buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
target_call_event_callbacks(target, TARGET_EVENT_RESUMED);
@@ -1914,7 +1914,7 @@
uint32_t i;
int retval;
- LOG_DEBUG("address: 0x%8.8x, size: 0x%8.8x, count: 0x%8.8x", address, size, count);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32, address, size, count);
if (target->state != TARGET_HALTED)
{
@@ -1991,7 +1991,7 @@
xscale_common_t *xscale = armv4_5->arch_info;
int retval;
- LOG_DEBUG("address: 0x%8.8x, size: 0x%8.8x, count: 0x%8.8x", address, size, count);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32, address, size, count);
if (target->state != TARGET_HALTED)
{
@@ -3650,7 +3650,7 @@
/* read cp15 control register */
xscale_get_reg(reg);
value = buf_get_u32(reg->value, 0, 32);
- command_print(cmd_ctx, "%s (/%i): 0x%x", reg->name, reg->size, value);
+ command_print(cmd_ctx, "%s (/%i): 0x%" PRIx32 "", reg->name, (int)(reg->size), value);
}
else if(argc == 2)
{
|
|
From: <du...@ma...> - 2009-06-21 05:17:50
|
Author: duane
Date: 2009-06-21 05:17:46 +0200 (Sun, 21 Jun 2009)
New Revision: 2327
Modified:
trunk/src/target/trace.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/trace.c
===================================================================
--- trunk/src/target/trace.c 2009-06-21 03:17:40 UTC (rev 2326)
+++ trunk/src/target/trace.c 2009-06-21 03:17:46 UTC (rev 2327)
@@ -29,7 +29,7 @@
{
trace_t *trace = target->trace_info;
- LOG_DEBUG("tracepoint: %i", number);
+ LOG_DEBUG("tracepoint: %i", (int)number);
if (number < trace->num_trace_points)
trace->trace_points[number].hit_counter++;
@@ -58,7 +58,7 @@
for (i = 0; i < trace->num_trace_points; i++)
{
- command_print(cmd_ctx, "trace point 0x%8.8x (%lld times hit)",
+ command_print(cmd_ctx, "trace point 0x%8.8" PRIx32 " (%lld times hit)",
trace->trace_points[i].address,
(long long)trace->trace_points[i].hit_counter);
}
@@ -115,7 +115,7 @@
trace->trace_history_size = strtoul(args[0], NULL, 0);
trace->trace_history = malloc(sizeof(uint32_t) * trace->trace_history_size);
- command_print(cmd_ctx, "new trace history size: %i", trace->trace_history_size);
+ command_print(cmd_ctx, "new trace history size: %i", (int)(trace->trace_history_size));
}
else
{
@@ -139,14 +139,14 @@
{
uint32_t address;
address = trace->trace_points[trace->trace_history[i % trace->trace_history_size]].address;
- command_print(cmd_ctx, "trace point %i: 0x%8.8x",
- trace->trace_history[i % trace->trace_history_size],
- address);
+ command_print(cmd_ctx, "trace point %i: 0x%8.8" PRIx32 "",
+ (int)(trace->trace_history[i % trace->trace_history_size]),
+ address);
}
else
{
- command_print(cmd_ctx, "trace point %i: -not defined-", trace->trace_history[i % trace->trace_history_size]);
+ command_print(cmd_ctx, "trace point %i: -not defined-", (int)(trace->trace_history[i % trace->trace_history_size]));
}
}
}
|
|
From: <du...@ma...> - 2009-06-21 05:17:43
|
Author: duane
Date: 2009-06-21 05:17:40 +0200 (Sun, 21 Jun 2009)
New Revision: 2326
Modified:
trunk/src/target/target_request.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/target_request.c
===================================================================
--- trunk/src/target/target_request.c 2009-06-21 03:17:33 UTC (rev 2325)
+++ trunk/src/target/target_request.c 2009-06-21 03:17:40 UTC (rev 2326)
@@ -71,7 +71,7 @@
debug_msg_receiver_t *c = target->dbgmsg;
uint32_t i;
- LOG_DEBUG("size: %i, length: %i", size, length);
+ LOG_DEBUG("size: %i, length: %i", (int)size, (int)length);
target->type->target_request_data(target, CEIL(length * size, 4), (uint8_t*)data);
@@ -81,7 +81,7 @@
switch (size)
{
case 4:
- line_len += snprintf(line + line_len, 128 - line_len, "%8.8x ", le_to_h_u32(data + (4*i)));
+ line_len += snprintf(line + line_len, 128 - line_len, "%8.8" PRIx32 " ", le_to_h_u32(data + (4*i)));
break;
case 2:
line_len += snprintf(line + line_len, 128 - line_len, "%4.4x ", le_to_h_u16(data + (2*i)));
|
|
From: <du...@ma...> - 2009-06-21 05:17:37
|
Author: duane
Date: 2009-06-21 05:17:33 +0200 (Sun, 21 Jun 2009)
New Revision: 2325
Modified:
trunk/src/target/target.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/target.c
===================================================================
--- trunk/src/target/target.c 2009-06-21 03:17:28 UTC (rev 2324)
+++ trunk/src/target/target.c 2009-06-21 03:17:33 UTC (rev 2325)
@@ -934,8 +934,8 @@
/* only allocate multiples of 4 byte */
if (size % 4)
{
- LOG_ERROR("BUG: code tried to allocate unaligned number of bytes, padding");
- size = CEIL(size, 4);
+ LOG_ERROR("BUG: code tried to allocate unaligned number of bytes (0x%08x), padding", ((unsigned)(size)));
+ size = (size + 3) & (~3);
}
/* see if there's already a matching working area */
@@ -969,7 +969,8 @@
if (free_size < size)
{
- LOG_WARNING("not enough working area available(requested %d, free %d)", size, free_size);
+ LOG_WARNING("not enough working area available(requested %u, free %u)",
+ (unsigned)(size), (unsigned)(free_size));
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
@@ -1101,7 +1102,8 @@
int target_write_buffer(struct target_s *target, uint32_t address, uint32_t size, uint8_t *buffer)
{
int retval;
- LOG_DEBUG("writing buffer of %i byte at 0x%8.8x", size, address);
+ LOG_DEBUG("writing buffer of %i byte at 0x%8.8x",
+ (int)size, (unsigned)address);
if (!target_was_examined(target))
{
@@ -1116,7 +1118,9 @@
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
- LOG_ERROR("address+size wrapped(0x%08x, 0x%08x)", address, size);
+ LOG_ERROR("address+size wrapped(0x%08x, 0x%08x)",
+ (unsigned)address,
+ (unsigned)size);
return ERROR_FAIL;
}
@@ -1180,7 +1184,8 @@
int target_read_buffer(struct target_s *target, uint32_t address, uint32_t size, uint8_t *buffer)
{
int retval;
- LOG_DEBUG("reading buffer of %i byte at 0x%8.8x", size, address);
+ LOG_DEBUG("reading buffer of %i byte at 0x%8.8x",
+ (int)size, (unsigned)address);
if (!target_was_examined(target))
{
@@ -1195,7 +1200,9 @@
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
- LOG_ERROR("address+size wrapped(0x%08x, 0x%08x)", address, size);
+ LOG_ERROR("address+size wrapped(0x%08" PRIx32 ", 0x%08" PRIx32 ")",
+ address,
+ size);
return ERROR_FAIL;
}
@@ -1261,7 +1268,7 @@
buffer = malloc(size);
if (buffer == NULL)
{
- LOG_ERROR("error allocating buffer for section (%d bytes)", size);
+ LOG_ERROR("error allocating buffer for section (%d bytes)", (int)size);
return ERROR_INVALID_ARGUMENTS;
}
retval = target_read_buffer(target, address, size, buffer);
@@ -1319,12 +1326,15 @@
if (retval == ERROR_OK)
{
*value = target_buffer_get_u32(target, value_buf);
- LOG_DEBUG("address: 0x%8.8x, value: 0x%8.8x", address, *value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%8.8" PRIx32 "",
+ address,
+ *value);
}
else
{
*value = 0x0;
- LOG_DEBUG("address: 0x%8.8x failed", address);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 " failed",
+ address);
}
return retval;
@@ -1344,12 +1354,15 @@
if (retval == ERROR_OK)
{
*value = target_buffer_get_u16(target, value_buf);
- LOG_DEBUG("address: 0x%8.8x, value: 0x%4.4x", address, *value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%4.4x",
+ address,
+ *value);
}
else
{
*value = 0x0;
- LOG_DEBUG("address: 0x%8.8x failed", address);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 " failed",
+ address);
}
return retval;
@@ -1366,12 +1379,15 @@
if (retval == ERROR_OK)
{
- LOG_DEBUG("address: 0x%8.8x, value: 0x%2.2x", address, *value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%2.2x",
+ address,
+ *value);
}
else
{
*value = 0x0;
- LOG_DEBUG("address: 0x%8.8x failed", address);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 " failed",
+ address);
}
return retval;
@@ -1387,7 +1403,9 @@
return ERROR_FAIL;
}
- LOG_DEBUG("address: 0x%8.8x, value: 0x%8.8x", address, value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%8.8" PRIx32 "",
+ address,
+ value);
target_buffer_set_u32(target, value_buf, value);
if ((retval = target_write_memory(target, address, 4, 1, value_buf)) != ERROR_OK)
@@ -1408,7 +1426,9 @@
return ERROR_FAIL;
}
- LOG_DEBUG("address: 0x%8.8x, value: 0x%8.8x", address, value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%8.8x",
+ address,
+ value);
target_buffer_set_u16(target, value_buf, value);
if ((retval = target_write_memory(target, address, 2, 1, value_buf)) != ERROR_OK)
@@ -1428,7 +1448,8 @@
return ERROR_FAIL;
}
- LOG_DEBUG("address: 0x%8.8x, value: 0x%2.2x", address, value);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", value: 0x%2.2x",
+ address, value);
if ((retval = target_write_memory(target, address, 1, 1, &value)) != ERROR_OK)
{
@@ -1713,7 +1734,13 @@
for (i = 0; i < cache->num_regs; i++)
{
value = buf_to_str(cache->reg_list[i].value, cache->reg_list[i].size, 16);
- command_print(cmd_ctx, "(%i) %s (/%i): 0x%s (dirty: %i, valid: %i)", count++, cache->reg_list[i].name, cache->reg_list[i].size, value, cache->reg_list[i].dirty, cache->reg_list[i].valid);
+ command_print(cmd_ctx, "(%i) %s (/%i): 0x%s (dirty: %i, valid: %i)",
+ count++,
+ cache->reg_list[i].name,
+ (int)(cache->reg_list[i].size),
+ value,
+ cache->reg_list[i].dirty,
+ cache->reg_list[i].valid);
free(value);
}
cache = cache->next;
@@ -1776,7 +1803,7 @@
arch_type->get(reg);
}
value = buf_to_str(reg->value, reg->size, 16);
- command_print(cmd_ctx, "%s (/%i): 0x%s", reg->name, reg->size, value);
+ command_print(cmd_ctx, "%s (/%i): 0x%s", reg->name, (int)(reg->size), value);
free(value);
return ERROR_OK;
}
@@ -1791,7 +1818,7 @@
arch_type->set(reg, buf);
value = buf_to_str(reg->value, reg->size, 16);
- command_print(cmd_ctx, "%s (/%i): 0x%s", reg->name, reg->size, value);
+ command_print(cmd_ctx, "%s (/%i): 0x%s", reg->name, (int)(reg->size), value);
free(value);
free(buf);
@@ -2037,7 +2064,8 @@
{
output_len += snprintf(output + output_len,
sizeof(output) - output_len,
- "0x%8.8x: ", address + (i*size));
+ "0x%8.8x: ",
+ (unsigned)(address + (i*size)));
}
uint32_t value=0;
@@ -2232,7 +2260,9 @@
buffer = malloc(image.sections[i].size);
if (buffer == NULL)
{
- command_print(cmd_ctx, "error allocating buffer for section (%d bytes)", image.sections[i].size);
+ command_print(cmd_ctx,
+ "error allocating buffer for section (%d bytes)",
+ (int)(image.sections[i].size));
break;
}
@@ -2268,7 +2298,9 @@
break;
}
image_size += length;
- command_print(cmd_ctx, "%u byte written at address 0x%8.8x", length, image.sections[i].base_address+offset);
+ command_print(cmd_ctx, "%u byte written at address 0x%8.8" PRIx32 "",
+ (unsigned int)length,
+ image.sections[i].base_address+offset);
}
free(buffer);
@@ -2282,7 +2314,9 @@
if (retval==ERROR_OK)
{
- command_print(cmd_ctx, "downloaded %u byte in %s", image_size, duration_text);
+ command_print(cmd_ctx, "downloaded %u byte in %s",
+ (unsigned int)image_size,
+ duration_text);
}
free(duration_text);
@@ -2423,7 +2457,9 @@
buffer = malloc(image.sections[i].size);
if (buffer == NULL)
{
- command_print(cmd_ctx, "error allocating buffer for section (%d bytes)", image.sections[i].size);
+ command_print(cmd_ctx,
+ "error allocating buffer for section (%d bytes)",
+ (int)(image.sections[i].size));
break;
}
if ((retval = image_read_section(&image, i, 0x0, image.sections[i].size, buffer, &buf_cnt)) != ERROR_OK)
@@ -2469,7 +2505,11 @@
{
if (data[t] != buffer[t])
{
- command_print(cmd_ctx, "Verify operation failed address 0x%08x. Was 0x%02x instead of 0x%02x\n", t + image.sections[i].base_address, data[t], buffer[t]);
+ command_print(cmd_ctx,
+ "Verify operation failed address 0x%08x. Was 0x%02x instead of 0x%02x\n",
+ (unsigned)(t + image.sections[i].base_address),
+ data[t],
+ buffer[t]);
free(data);
free(buffer);
retval=ERROR_FAIL;
@@ -2486,7 +2526,9 @@
}
} else
{
- command_print(cmd_ctx, "address 0x%08x length 0x%08x", image.sections[i].base_address, buf_cnt);
+ command_print(cmd_ctx, "address 0x%08" PRIx32 " length 0x%08" PRIx32 "",
+ image.sections[i].base_address,
+ buf_cnt);
}
free(buffer);
@@ -2502,7 +2544,9 @@
if (retval==ERROR_OK)
{
- command_print(cmd_ctx, "verified %u bytes in %s", image_size, duration_text);
+ command_print(cmd_ctx, "verified %u bytes in %s",
+ (unsigned int)image_size,
+ duration_text);
}
free(duration_text);
@@ -2531,15 +2575,17 @@
{
char* buf = buf_to_str(breakpoint->orig_instr,
breakpoint->length, 16);
- command_print(cmd_ctx, "0x%8.8x, 0x%x, %i, 0x%s",
- breakpoint->address, breakpoint->length,
+ command_print(cmd_ctx, "0x%8.8" PRIx32 ", 0x%x, %i, 0x%s",
+ breakpoint->address,
+ breakpoint->length,
breakpoint->set, buf);
free(buf);
}
else
{
- command_print(cmd_ctx, "0x%8.8x, 0x%x, %i",
- breakpoint->address, breakpoint->length, breakpoint->set);
+ command_print(cmd_ctx, "0x%8.8" PRIx32 ", 0x%x, %i",
+ breakpoint->address,
+ breakpoint->length, breakpoint->set);
}
breakpoint = breakpoint->next;
@@ -2553,7 +2599,7 @@
target_t *target = get_current_target(cmd_ctx);
int retval = breakpoint_add(target, addr, length, hw);
if (ERROR_OK == retval)
- command_print(cmd_ctx, "breakpoint set at 0x%8.8x", addr);
+ command_print(cmd_ctx, "breakpoint set at 0x%8.8" PRIx32 "", addr);
else
LOG_ERROR("Failure setting breakpoint");
return retval;
@@ -2619,7 +2665,13 @@
while (watchpoint)
{
- command_print(cmd_ctx, "address: 0x%8.8x, len: 0x%8.8x, r/w/a: %i, value: 0x%8.8x, mask: 0x%8.8x", watchpoint->address, watchpoint->length, watchpoint->rw, watchpoint->value, watchpoint->mask);
+ command_print(cmd_ctx,
+ "address: 0x%8.8" PRIx32 ", len: 0x%8.8x, r/w/a: %i, value: 0x%8.8" PRIx32 ", mask: 0x%8.8" PRIx32 "",
+ watchpoint->address,
+ watchpoint->length,
+ (int)(watchpoint->rw),
+ watchpoint->value,
+ watchpoint->mask);
watchpoint = watchpoint->next;
}
return ERROR_OK;
@@ -2721,7 +2773,7 @@
target_t *target = get_current_target(cmd_ctx);
retval = target->type->virt2phys(target, va, &pa);
if (retval == ERROR_OK)
- command_print(cmd_ctx, "Physical address 0x%08x", pa);
+ command_print(cmd_ctx, "Physical address 0x%08" PRIx32 "", pa);
return retval;
}
@@ -3057,7 +3109,9 @@
} else {
char buf[100];
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
- sprintf(buf, "mem2array address: 0x%08x is not aligned for %d byte reads", addr, width);
+ sprintf(buf, "mem2array address: 0x%08" PRIx32 " is not aligned for %" PRId32 " byte reads",
+ addr,
+ width);
Jim_AppendStrings(interp, Jim_GetResult(interp), buf , NULL);
return JIM_ERR;
}
@@ -3079,7 +3133,10 @@
retval = target_read_memory( target, addr, width, count, buffer );
if (retval != ERROR_OK) {
/* BOO !*/
- LOG_ERROR("mem2array: Read @ 0x%08x, w=%d, cnt=%d, failed", addr, width, count);
+ LOG_ERROR("mem2array: Read @ 0x%08x, w=%d, cnt=%d, failed",
+ (unsigned int)addr,
+ (int)width,
+ (int)count);
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
Jim_AppendStrings(interp, Jim_GetResult(interp), "mem2array: cannot read memory", NULL);
e = JIM_ERR;
@@ -3239,7 +3296,9 @@
} else {
char buf[100];
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
- sprintf(buf, "array2mem address: 0x%08x is not aligned for %d byte reads", addr, width);
+ sprintf(buf, "array2mem address: 0x%08x is not aligned for %d byte reads",
+ (unsigned int)addr,
+ (int)width);
Jim_AppendStrings(interp, Jim_GetResult(interp), buf , NULL);
return JIM_ERR;
}
@@ -3278,7 +3337,10 @@
retval = target_write_memory(target, addr, width, count, buffer);
if (retval != ERROR_OK) {
/* BOO !*/
- LOG_ERROR("array2mem: Write @ 0x%08x, w=%d, cnt=%d, failed", addr, width, count);
+ LOG_ERROR("array2mem: Write @ 0x%08x, w=%d, cnt=%d, failed",
+ (unsigned int)addr,
+ (int)width,
+ (int)count);
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
Jim_AppendStrings(interp, Jim_GetResult(interp), "array2mem: cannot read memory", NULL);
e = JIM_ERR;
@@ -3296,8 +3358,8 @@
target_t *target;
LOG_DEBUG( "**all*targets: event: %d, %s",
- e,
- Jim_Nvp_value2name_simple( nvp_target_event, e )->name );
+ (int)e,
+ Jim_Nvp_value2name_simple( nvp_target_event, e )->name );
target = all_targets;
while (target){
@@ -4379,7 +4441,8 @@
buffer = malloc(image.sections[i].size);
if (buffer == NULL)
{
- command_print(cmd_ctx, "error allocating buffer for section (%d bytes)", image.sections[i].size);
+ command_print(cmd_ctx, "error allocating buffer for section (%d bytes)",
+ (int)(image.sections[i].size));
break;
}
@@ -4421,7 +4484,9 @@
fastload[i].length=length;
image_size += length;
- command_print(cmd_ctx, "%u byte written at address 0x%8.8x", length, image.sections[i].base_address+offset);
+ command_print(cmd_ctx, "%u byte written at address 0x%8.8x",
+ (unsigned int)length,
+ ((unsigned int)(image.sections[i].base_address+offset)));
}
free(buffer);
@@ -4430,7 +4495,7 @@
duration_stop_measure(&duration, &duration_text);
if (retval==ERROR_OK)
{
- command_print(cmd_ctx, "Loaded %u bytes in %s", image_size, duration_text);
+ command_print(cmd_ctx, "Loaded %u bytes in %s", (unsigned int)image_size, duration_text);
command_print(cmd_ctx, "NB!!! image has not been loaded to target, issue a subsequent 'fast_load' to do so.");
}
free(duration_text);
@@ -4461,7 +4526,9 @@
for (i=0; i<fastload_num;i++)
{
target_t *target = get_current_target(cmd_ctx);
- command_print(cmd_ctx, "Write to 0x%08x, length 0x%08x", fastload[i].address, fastload[i].length);
+ command_print(cmd_ctx, "Write to 0x%08x, length 0x%08x",
+ (unsigned int)(fastload[i].address),
+ (unsigned int)(fastload[i].length));
if (retval==ERROR_OK)
{
retval = target_write_buffer(target, fastload[i].address, fastload[i].length, fastload[i].data);
@@ -4472,3 +4539,11 @@
command_print(cmd_ctx, "Loaded image %f kBytes/s", (float)(size/1024.0)/((float)(after-ms)/1000.0));
return retval;
}
+
+
+/*
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
|
|
From: <du...@ma...> - 2009-06-21 05:17:31
|
Author: duane
Date: 2009-06-21 05:17:28 +0200 (Sun, 21 Jun 2009)
New Revision: 2324
Modified:
trunk/src/target/mips_m4k.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/mips_m4k.c
===================================================================
--- trunk/src/target/mips_m4k.c 2009-06-21 03:17:23 UTC (rev 2323)
+++ trunk/src/target/mips_m4k.c 2009-06-21 03:17:28 UTC (rev 2324)
@@ -146,7 +146,7 @@
mips32_save_context(target);
- LOG_DEBUG("entered debug state at PC 0x%x, target->state: %s",
+ LOG_DEBUG("entered debug state at PC 0x%" PRIx32 ", target->state: %s",
*(uint32_t*)(mips32->core_cache->reg_list[MIPS32_PC].value),
Jim_Nvp_value2name_simple( nvp_target_state, target->state )->name);
@@ -395,7 +395,7 @@
/* Single step past breakpoint at current address */
if ((breakpoint = breakpoint_find(target, resume_pc)))
{
- LOG_DEBUG("unset breakpoint at 0x%8.8x", breakpoint->address);
+ LOG_DEBUG("unset breakpoint at 0x%8.8" PRIx32 "", breakpoint->address);
mips_m4k_unset_breakpoint(target, breakpoint);
mips_m4k_single_step_core(target);
mips_m4k_set_breakpoint(target, breakpoint);
@@ -416,13 +416,13 @@
{
target->state = TARGET_RUNNING;
target_call_event_callbacks(target, TARGET_EVENT_RESUMED);
- LOG_DEBUG("target resumed at 0x%x", resume_pc);
+ LOG_DEBUG("target resumed at 0x%" PRIx32 "", resume_pc);
}
else
{
target->state = TARGET_DEBUG_RUNNING;
target_call_event_callbacks(target, TARGET_EVENT_DEBUG_RESUMED);
- LOG_DEBUG("target debug resumed at 0x%x", resume_pc);
+ LOG_DEBUG("target debug resumed at 0x%" PRIx32 "", resume_pc);
}
return ERROR_OK;
@@ -523,7 +523,7 @@
target_write_u32(target, comparator_list[bp_num].reg_address, comparator_list[bp_num].bp_value);
target_write_u32(target, comparator_list[bp_num].reg_address + 0x08, 0x00000000);
target_write_u32(target, comparator_list[bp_num].reg_address + 0x18, 1);
- LOG_DEBUG("bp_num %i bp_value 0x%x", bp_num, comparator_list[bp_num].bp_value);
+ LOG_DEBUG("bp_num %i bp_value 0x%" PRIx32 "", bp_num, comparator_list[bp_num].bp_value);
}
else if (breakpoint->type == BKPT_SOFT)
{
@@ -546,7 +546,7 @@
}
if (verify != MIPS32_SDBBP)
{
- LOG_ERROR("Unable to set 32bit breakpoint at address %08x - check that memory is read/writable", breakpoint->address);
+ LOG_ERROR("Unable to set 32bit breakpoint at address %08" PRIx32 " - check that memory is read/writable", breakpoint->address);
return ERROR_OK;
}
}
@@ -569,7 +569,7 @@
}
if (verify != MIPS16_SDBBP)
{
- LOG_ERROR("Unable to set 16bit breakpoint at address %08x - check that memory is read/writable", breakpoint->address);
+ LOG_ERROR("Unable to set 16bit breakpoint at address %08" PRIx32 " - check that memory is read/writable", breakpoint->address);
return ERROR_OK;
}
}
@@ -733,7 +733,7 @@
mips32_common_t *mips32 = target->arch_info;
mips_ejtag_t *ejtag_info = &mips32->ejtag_info;
- LOG_DEBUG("address: 0x%8.8x, size: 0x%8.8x, count: 0x%8.8x", address, size, count);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32 "", address, size, count);
if (target->state != TARGET_HALTED)
{
@@ -787,7 +787,7 @@
mips32_common_t *mips32 = target->arch_info;
mips_ejtag_t *ejtag_info = &mips32->ejtag_info;
- LOG_DEBUG("address: 0x%8.8x, size: 0x%8.8x, count: 0x%8.8x", address, size, count);
+ LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32 "", address, size, count);
if (target->state != TARGET_HALTED)
{
|
|
From: <du...@ma...> - 2009-06-21 05:17:27
|
Author: duane
Date: 2009-06-21 05:17:23 +0200 (Sun, 21 Jun 2009)
New Revision: 2323
Modified:
trunk/src/target/mips_ejtag.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/mips_ejtag.c
===================================================================
--- trunk/src/target/mips_ejtag.c 2009-06-21 03:17:16 UTC (rev 2322)
+++ trunk/src/target/mips_ejtag.c 2009-06-21 03:17:23 UTC (rev 2323)
@@ -211,7 +211,7 @@
/* break bit will be cleared by hardware */
ejtag_ctrl = ejtag_info->ejtag_ctrl;
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
- LOG_DEBUG("ejtag_ctrl: 0x%8.8x", ejtag_ctrl);
+ LOG_DEBUG("ejtag_ctrl: 0x%8.8" PRIx32 "", ejtag_ctrl);
if((ejtag_ctrl & EJTAG_CTRL_BRKST) == 0)
LOG_DEBUG("Failed to enter Debug Mode!");
@@ -261,7 +261,7 @@
uint32_t ejtag_version;
mips_ejtag_get_impcode(ejtag_info, &ejtag_info->impcode);
- LOG_DEBUG("impcode: 0x%8.8x", ejtag_info->impcode);
+ LOG_DEBUG("impcode: 0x%8.8" PRIx32 "", ejtag_info->impcode);
/* get ejtag version */
ejtag_version = ((ejtag_info->impcode >> 29) & 0x07);
|
|
From: <du...@ma...> - 2009-06-21 05:17:21
|
Author: duane
Date: 2009-06-21 05:17:16 +0200 (Sun, 21 Jun 2009)
New Revision: 2322
Modified:
trunk/src/target/mips32_pracc.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/mips32_pracc.c
===================================================================
--- trunk/src/target/mips32_pracc.c 2009-06-21 03:17:10 UTC (rev 2321)
+++ trunk/src/target/mips32_pracc.c 2009-06-21 03:17:16 UTC (rev 2322)
@@ -143,7 +143,7 @@
* to start of debug vector */
data = 0;
- LOG_ERROR("Error reading unexpected address %8.8x", address);
+ LOG_ERROR("Error reading unexpected address %8.8" PRIx32 "", address);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -200,7 +200,7 @@
}
else
{
- LOG_ERROR("Error writing unexpected address %8.8x", address);
+ LOG_ERROR("Error writing unexpected address %8.8" PRIx32 "", address);
return ERROR_JTAG_DEVICE_ERROR;
}
|
|
From: <du...@ma...> - 2009-06-21 05:17:14
|
Author: duane
Date: 2009-06-21 05:17:10 +0200 (Sun, 21 Jun 2009)
New Revision: 2321
Modified:
trunk/src/target/mips32_dmaacc.c
Log:
C99 printf() -Werror fixes
Modified: trunk/src/target/mips32_dmaacc.c
===================================================================
--- trunk/src/target/mips32_dmaacc.c 2009-06-21 03:17:03 UTC (rev 2320)
+++ trunk/src/target/mips32_dmaacc.c 2009-06-21 03:17:10 UTC (rev 2321)
@@ -74,11 +74,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ (retrying)\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ (retrying)\n", addr);
goto begin_ejtag_dma_read;
}
else
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -120,11 +120,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ (retrying)\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ (retrying)\n", addr);
goto begin_ejtag_dma_read_h;
}
else
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -172,11 +172,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ (retrying)\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ (retrying)\n", addr);
goto begin_ejtag_dma_read_b;
}
else
- LOG_ERROR("DMA Read Addr = %08x Data = ERROR ON READ\n", addr);
+ LOG_ERROR("DMA Read Addr = %08" PRIx32 " Data = ERROR ON READ\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -235,11 +235,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE (retrying)\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE (retrying)\n", addr);
goto begin_ejtag_dma_write;
}
else
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -286,11 +286,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE (retrying)\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE (retrying)\n", addr);
goto begin_ejtag_dma_write_h;
}
else
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
@@ -338,11 +338,11 @@
if (ejtag_ctrl & EJTAG_CTRL_DERR)
{
if (retries--) {
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE (retrying)\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE (retrying)\n", addr);
goto begin_ejtag_dma_write_b;
}
else
- LOG_ERROR("DMA Write Addr = %08x Data = ERROR ON WRITE\n", addr);
+ LOG_ERROR("DMA Write Addr = %08" PRIx32 " Data = ERROR ON WRITE\n", addr);
return ERROR_JTAG_DEVICE_ERROR;
}
|