kopia lustrzana https://github.com/bristol-seds/pico-tracker
Testcases now run through prelude
rodzic
9049df90f9
commit
372af471d3
|
@ -264,10 +264,10 @@ void output_telemetry_string(enum telemetry_t type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MAIN
|
* Internal initialisation
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*/
|
*/
|
||||||
int main(void)
|
void init(void)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Internal initialisation
|
* Internal initialisation
|
||||||
|
@ -306,21 +306,26 @@ int main(void)
|
||||||
//wdt_init();
|
//wdt_init();
|
||||||
//wdt_reset_count();
|
//wdt_reset_count();
|
||||||
|
|
||||||
|
xosc_init();
|
||||||
|
|
||||||
led_init();
|
led_init();
|
||||||
gps_init();
|
gps_init();
|
||||||
|
|
||||||
/* Initialise Si4060 interface */
|
/* Initialise Si4060 interface */
|
||||||
si_trx_init();
|
si_trx_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
xosc_init();
|
/**
|
||||||
|
* MAIN
|
||||||
|
* =============================================================================
|
||||||
|
*/
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
|
||||||
measure_xosc(XOSC_MEASURE_TIMEPULSE);
|
measure_xosc(XOSC_MEASURE_TIMEPULSE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
system_sleep();
|
system_sleep();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
/***************************** test cases *******************************/
|
/***************************** test cases *******************************/
|
||||||
|
|
||||||
#include "times_two.h"
|
#include "times_two.h"
|
||||||
|
#include "osc8m_calib.h"
|
||||||
|
|
||||||
/******************************* tc_main ********************************/
|
/******************************* tc_main ********************************/
|
||||||
|
|
||||||
|
@ -60,3 +61,18 @@ __verification__ void tc_main(void) {
|
||||||
tc_run();
|
tc_run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is in the real main.c */
|
||||||
|
void init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prelude to main loop
|
||||||
|
*/
|
||||||
|
__verification__ void tc_prelude(void) {
|
||||||
|
|
||||||
|
/* Initialise the board */
|
||||||
|
init();
|
||||||
|
|
||||||
|
/* Proceed to main loop */
|
||||||
|
tc_main();
|
||||||
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ class Tests():
|
||||||
self.print_fail(name, time)
|
self.print_fail(name, time)
|
||||||
|
|
||||||
self.print_header("")
|
self.print_header("")
|
||||||
|
|
||||||
#### GDB
|
#### GDB
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -99,10 +100,10 @@ class Tests():
|
||||||
gdb.execute("load")
|
gdb.execute("load")
|
||||||
gdb.execute("b main")
|
gdb.execute("b main")
|
||||||
gdb.execute("run")
|
gdb.execute("run")
|
||||||
# Stopped at the top of main. Go to tc_main
|
# Stopped at the top of main. Go to tc_main via tc_prelude
|
||||||
gdb.execute("del 1")
|
gdb.execute("del 1")
|
||||||
gdb.execute("b tc_main")
|
gdb.execute("b tc_main")
|
||||||
gdb.execute("set $pc=tc_main")
|
gdb.execute("set $pc=tc_prelude")
|
||||||
gdb.execute("c")
|
gdb.execute("c")
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
|
Ładowanie…
Reference in New Issue