This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 03/22] sim/erc32: Perform pseudo-init if binary linked to non-zero address.


On 19 Feb 2015 23:31, Jiri Gaisler wrote:
> Binaries produced by most erc32 tool-chains do not include
> system initialization. sis will detect this and initialize
> necessary registers for memory and timer control.
> 
> 	* erc32.c (mec_read) allow simulator memory size to be read
> 	by application. (boot_init) initialize memory and timers if
> 	start address is not 0.
> 
> 	* erc32,c (exe_cmd) call boot_init if start address not 0
> 	* interf.c (run_sim) Likewise

same comments, but there's also a typo here -- "func.c" instead of the second 
"erc32.c"

> --- a/sim/erc32/interf.c
> +++ b/sim/erc32/interf.c
> @@ -78,6 +78,7 @@ run_sim(sregs, icount, dis)
>     init_stdio();
>     sregs->starttime = time(NULL);
>     irq = 0;
> +   if ((sregs->pc != 0) && (ebase.simtime == 0)) boot_init();
>     while (!sregs->err_mode & (icount > 0)) {

this needs unwrapping too.  fixed it & pushed.
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]