T32: Integrated Register read/write calls

* Tested without connected Lauterbach.
  T32_* functions are mocked via aspect.

* New target t32cli, for sending T32 command cia cli. (for testing)

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2103 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hoffmann
2013-02-15 18:06:02 +00:00
parent a7e5d2373f
commit 39a6415001
30 changed files with 439 additions and 201 deletions

View File

@ -0,0 +1,61 @@
/**
* FailT32 -- Fault Injection on the Lauterbach Trace32 System
*
* 1. Invoke t32 executable with appropriate Lauterbach Skript
* - Script has to load binary
* - and let system run until entry point
* -> Then we have a readily configured system
*
* @author Martin Hoffmann <hoffmann@cs.fau.de>
* @date 15.02.2013
*/
#include <t32.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include "config/VariantConfig.hpp"
#include "sal/SALInst.hpp"
using namespace std;
/* Default T32 error handler */
void err(int ernum){
if(err != 0){
cerr << "Error: " << err << endl;
//exit(-1);
}
}
/* Here we go... */
int main(int argc, char** argv){
// Evaluate arguments
// Setup connection to Lauterbach
cout << "Lauterbach remote connection" << endl;
int error;
char hostname[] = "localhost";
char packlen[] = "1024";
char port[] = "20010";
cout << "[T32] Connecting to " << hostname << ":" << port << " Packlen: " << packlen << endl;
T32_Config("NODE=", hostname);
T32_Config("PACKLEN=", packlen);
T32_Config("PORT=", port);
cout << "[T32] Init." << endl;
err(T32_Init());
cout << "[T32] Attach." << endl;
err(T32_Attach(T32_DEV_ICD));
// Let the SimulatorController do the dirty work.
fail::simulator.startup();
return 0;
}