Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v retrieving revision 1.212 diff -u -5 -p -r1.212 ChangeLog --- ChangeLog 8 Oct 2004 11:08:41 -0000 1.212 +++ ChangeLog 1 Dec 2004 09:54:46 -0000 @@ -1,5 +1,11 @@ +2004-12-01 Andrea Michelotti + + * main.c : + * mfill.c: + * mcmp.c : cast as lvalue removed to make it compile with gcc 4 and higher + 2004-10-08 Andrew Lunn * doc/redboot_installing.sgml: Added links to the tools for the Atmel AT91 JTST board. Index: src/main.c =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/src/main.c,v retrieving revision 1.60 diff -u -5 -p -r1.60 main.c --- src/main.c 1 Sep 2004 21:21:30 -0000 1.60 +++ src/main.c 1 Dec 2004 09:54:48 -0000 @@ -238,10 +238,11 @@ static void error_handler(void) // // This is the main entry point for RedBoot // + void cyg_start(void) { int res = 0; bool prompt = true; @@ -322,10 +323,11 @@ cyg_start(void) cyg_plf_memory_segment(seg, &mem_segments[seg].start, &mem_segments[seg].end); } #endif #ifdef CYGSEM_REDBOOT_PLF_STARTUP + cyg_plf_redboot_startup(); #endif do_version(0,0); #ifdef CYGFUN_REDBOOT_BOOT_SCRIPT @@ -390,12 +392,11 @@ cyg_start(void) } CYGACC_CALL_IF_SET_CONSOLE_COMM(cur); // set up a temporary context that will take us to the trampoline - HAL_THREAD_INIT_CONTEXT((CYG_ADDRESS)workspace_end, - breakpoint, trampoline, 0); + HAL_THREAD_INIT_CONTEXT(workspace_end,breakpoint, trampoline,0); // switch context to trampoline (get GDB stubs started) HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end); gdb_active = false; @@ -592,11 +593,11 @@ do_go(int argc, char *argv[]) HAL_DCACHE_SYNC(); } HAL_ICACHE_INVALIDATE_ALL(); HAL_DCACHE_INVALIDATE_ALL(); // set up a temporary context that will take us to the trampoline - HAL_THREAD_INIT_CONTEXT((CYG_ADDRESS)workspace_end, entry, trampoline, 0); + HAL_THREAD_INIT_CONTEXT(workspace_end, entry, trampoline, 0); // switch context to trampoline HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end); // we get back here by way of return_to_redboot() Index: src/mfill.c =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/src/mfill.c,v retrieving revision 1.2 diff -u -5 -p -r1.2 mfill.c --- src/mfill.c 24 Feb 2004 14:15:15 -0000 1.2 +++ src/mfill.c 1 Dec 2004 09:54:48 -0000 @@ -95,19 +95,20 @@ do_mfill(int argc, char *argv[]) } // No checks here if (set_8bit) { // Fill 8 bits at a time while ((len -= sizeof(cyg_uint8)) >= 0) { - *((cyg_uint8 *)base)++ = (cyg_uint8)pat; + *(cyg_uint8 *)base = (cyg_uint8)pat,base+=sizeof(cyg_uint8); } } else if (set_16bit) { // Fill 16 bits at a time while ((len -= sizeof(cyg_uint16)) >= 0) { - *((cyg_uint16 *)base)++ = (cyg_uint16)pat; + *(cyg_uint16 *)base = (cyg_uint16)pat,base+=sizeof(cyg_uint16); } } else { // Default - 32 bits while ((len -= sizeof(cyg_uint32)) >= 0) { - *((cyg_uint32 *)base)++ = (cyg_uint32)pat; + *(cyg_uint32*)base= pat,base+=sizeof(cyg_uint32); + } } } Index: src/mcmp.c =================================================================== RCS file: /cvs/ecos/ecos/packages/redboot/current/src/mcmp.c,v retrieving revision 1.2 diff -u -5 -p -r1.2 mcmp.c --- src/mcmp.c 24 Feb 2004 14:15:15 -0000 1.2 +++ src/mcmp.c 1 Dec 2004 09:54:49 -0000 @@ -92,40 +92,50 @@ do_mcmp(int argc, char *argv[]) } // No checks here if (set_8bit) { // Compare 8 bits at a time while ((len -= sizeof(cyg_uint8)) >= 0) { - if (*((cyg_uint8 *)src_base)++ != *((cyg_uint8 *)dst_base)++) { - ((cyg_uint8 *)src_base)--; - ((cyg_uint8 *)dst_base)--; + if (*((cyg_uint8 *)src_base) != *((cyg_uint8 *)dst_base)) { + src_base-=sizeof(cyg_uint8); + dst_base-=sizeof(cyg_uint8); + diag_printf("Buffers don't match - %p=0x%02x, %p=0x%02x\n", src_base, *((cyg_uint8 *)src_base), dst_base, *((cyg_uint8 *)dst_base)); return; } + src_base+=sizeof(cyg_uint8); + dst_base+=sizeof(cyg_uint8); } } else if (set_16bit) { // Compare 16 bits at a time while ((len -= sizeof(cyg_uint16)) >= 0) { - if (*((cyg_uint16 *)src_base)++ != *((cyg_uint16 *)dst_base)++) { - ((cyg_uint16 *)src_base)--; - ((cyg_uint16 *)dst_base)--; - diag_printf("Buffers don't match - %p=0x%04x, %p=0x%04x\n", + if (*((cyg_uint16 *)src_base) != *((cyg_uint16 *)dst_base)) { + src_base-=sizeof(cyg_uint16); + dst_base-=sizeof(cyg_uint16); + diag_printf("Buffers don't match - %p=0x%04x, %p=0x%04x\n", src_base, *((cyg_uint16 *)src_base), dst_base, *((cyg_uint16 *)dst_base)); return; } + src_base+=sizeof(cyg_uint16); + dst_base+=sizeof(cyg_uint16); + } } else { // Default - 32 bits while ((len -= sizeof(cyg_uint32)) >= 0) { - if (*((cyg_uint32 *)src_base)++ != *((cyg_uint32 *)dst_base)++) { - ((cyg_uint32 *)src_base)--; - ((cyg_uint32 *)dst_base)--; + if (*((cyg_uint32 *)src_base) != *((cyg_uint32 *)dst_base)) { + src_base-=sizeof(cyg_uint32); + dst_base-=sizeof(cyg_uint32); + diag_printf("Buffers don't match - %p=0x%08x, %p=0x%08x\n", src_base, *((cyg_uint32 *)src_base), dst_base, *((cyg_uint32 *)dst_base)); return; } + src_base+=sizeof(cyg_uint32); + dst_base+=sizeof(cyg_uint32); + } } }