[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [bug #40594] Store simulation parameters inside the ELF
From: |
Markus Hitter |
Subject: |
[Simulavr-devel] [bug #40594] Store simulation parameters inside the ELF file |
Date: |
Fri, 15 Nov 2013 22:12:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 |
URL:
<http://savannah.nongnu.org/bugs/?40594>
Summary: Store simulation parameters inside the ELF file
Project: Simulavr: an AVR simulator
Submitted by: hitterm
Submitted on: Fr 15 Nov 2013 22:12:16 GMT
Category: Simulation
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Component Version: simulavr
_______________________________________________________
Details:
I found it a bit cumbersone to remember for each run of a simulation for which
device the binary was compiled for. Obviously, storing these parameters right
at compilation time makes running simulations easier.
I found simavr to have a nice concept: store these parameters in custom
sections of the ELF file. This way they're available to the simulator and get
ignored when uploaded to real hardware. On how to use it, see the comments in
src/simulavr_info.h (new file). It's really simple, at compilation time we
know best for which device we compile, after all.
For now this is a proof of concept. Storing parameters works fine, reading
them back, too, but instead of being used, they're simple written to the
console. For now the parameters are device type and cpu frequency, but the
concept can be extended easily to all other command line parameters. As soon
as the values are actually applied, the -d and -F command line parameters
become obsolete (but should override the stored info if given anyways for
those who know what they're doing).
The proof is applied to the simple_serial example.
Please find the patch attached and enjoy!
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fr 15 Nov 2013 22:12:16 GMT Name:
0001-Allow-to-store-simulation-parameters-inside-the-ELF-.patch Size: 8kB
By: hitterm
<http://savannah.nongnu.org/bugs/download.php?file_id=29627>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?40594>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.nongnu.org/
- [Simulavr-devel] [bug #40594] Store simulation parameters inside the ELF file,
Markus Hitter <=