core: Convert logging to AVR_LOG()
[simavr] / simavr / sim / sim_elf.h
index 085193a..8084873 100644 (file)
        along with simavr.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef ELF_H_
-#define ELF_H_
+#ifndef __SIM_ELF_H__
+#define __SIM_ELF_H__
 
 #include "avr_mcu_section.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef ELF_SYMBOLS
 #define ELF_SYMBOLS 1
 #endif
 
 /* these are the addresses the gnu linker uses to 
- * "fake" a non-harward addressign space for the AVR
+ * "fake" a non-Harvard addressing space for the AVR
  */
 #define AVR_SEGMENT_OFFSET_FLASH 0
 #define AVR_SEGMENT_OFFSET_EEPROM 0x00810000
@@ -39,6 +43,7 @@
 typedef struct elf_firmware_t {
        char  mmcu[64];
        uint32_t        frequency;
+       uint32_t        vcc,avcc,aref;
 
        char            tracename[128]; // trace filename
        uint32_t        traceperiod;
@@ -51,6 +56,7 @@ typedef struct elf_firmware_t {
        
        // register to listen to for commands from the firmware
        uint16_t        command_register_addr;
+       uint16_t        console_register_addr;
 
        uint32_t        flashbase;      // base address
        uint8_t *       flash;
@@ -71,4 +77,8 @@ int elf_read_firmware(const char * file, elf_firmware_t * firmware);
 
 void avr_load_firmware(avr_t * avr, elf_firmware_t * firmware);
 
-#endif /* ELF_H_ */
+#ifdef __cplusplus
+};
+#endif
+
+#endif /*__SIM_ELF_H__*/