@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | # Makefile for building: bin/fsw | |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Ju |
|
|
2 | # Makefile for building: bin/fsw-gsa | |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jul 5 12:17:39 2013 | |
|
4 | 4 | # Project: fsw-qt.pro |
|
5 | 5 | # Template: app |
|
6 | 6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4= |
|
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=6 -DPRINT_MESSAGES_ON_CONSOLE -DGSA | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
@@ -78,9 +78,9 DIST = /usr/lib64/qt4/mkspecs/c | |||
|
78 | 78 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
79 | 79 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
80 | 80 | fsw-qt.pro |
|
81 | QMAKE_TARGET = fsw | |
|
81 | QMAKE_TARGET = fsw-gsa | |
|
82 | 82 | DESTDIR = bin/ |
|
83 | TARGET = bin/fsw | |
|
83 | TARGET = bin/fsw-gsa | |
|
84 | 84 | |
|
85 | 85 | first: all |
|
86 | 86 | ####### Implicit rules |
@@ -159,8 +159,8 qmake: FORCE | |||
|
159 | 159 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
160 | 160 | |
|
161 | 161 | dist: |
|
162 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
|
163 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 | |
|
162 | @$(CHK_DIR_EXISTS) obj/fsw-gsa1.0.0 || $(MKDIR) obj/fsw-gsa1.0.0 | |
|
163 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw-gsa1.0.0/ && (cd `dirname obj/fsw-gsa1.0.0` && $(TAR) fsw-gsa1.0.0.tar fsw-gsa1.0.0 && $(COMPRESS) fsw-gsa1.0.0.tar) && $(MOVE) `dirname obj/fsw-gsa1.0.0`/fsw-gsa1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw-gsa1.0.0 | |
|
164 | 164 | |
|
165 | 165 | |
|
166 | 166 | clean:compiler_clean |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -1,7 +1,7 | |||
|
1 | 1 | TEMPLATE = app |
|
2 | 2 | # CONFIG += console v8 sim |
|
3 | 3 | # CONFIG options = verbose *** cpu_usage_report *** gsa |
|
4 | CONFIG += console verbose | |
|
4 | CONFIG += console verbose gsa | |
|
5 | 5 | CONFIG -= qt |
|
6 | 6 | |
|
7 | 7 | include(./sparc.pri) |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by Qt Creator 2.4.1, 2013-07-05T |
|
|
3 | <!-- Written by Qt Creator 2.4.1, 2013-07-05T13:31:36. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -53,7 +53,7 void init_default_mode_parameters( void | |||
|
53 | 53 | void init_housekeeping_parameters( void ); |
|
54 | 54 | |
|
55 | 55 | int spacewire_configure_link( void ); |
|
56 |
int spacewire_ |
|
|
56 | int spacewire_wait_for_link(void); | |
|
57 | 57 | void spacewire_set_NP(unsigned char val, unsigned int regAddr); // No Port force |
|
58 | 58 | void spacewire_set_RE(unsigned char val, unsigned int regAddr); // RMAP Enable |
|
59 | 59 | void spacewire_compute_stats_offsets(); |
@@ -20,7 +20,7 int configure_timer(gptimer_regs_t *gpti | |||
|
20 | 20 | void update_spacewire_statistics(); |
|
21 | 21 | |
|
22 | 22 | // SERIAL LINK |
|
23 |
int send_console_outputs_on_ |
|
|
23 | int send_console_outputs_on_apbuart_port( void ); | |
|
24 | 24 | int set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); |
|
25 | 25 | |
|
26 | 26 | // RTEMS TASKS |
@@ -50,7 +50,7 | |||
|
50 | 50 | #define REGS_ADDR_WAVEFORM_PICKER 0x80000f20 |
|
51 | 51 | |
|
52 | 52 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff |
|
53 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 | |
|
53 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) | |
|
54 | 54 | |
|
55 | 55 | //********** |
|
56 | 56 | // IRQ LINES |
@@ -3,46 +3,53 | |||
|
3 | 3 | |
|
4 | 4 | #define NB_GPTIMER 3 |
|
5 | 5 | |
|
6 | struct apbuart_regs_str{ | |
|
7 | volatile unsigned int data; | |
|
8 | volatile unsigned int status; | |
|
9 | volatile unsigned int ctrl; | |
|
10 | volatile unsigned int scaler; | |
|
11 | volatile unsigned int fifoDebug; | |
|
6 | struct apbuart_regs_str{ | |
|
7 | volatile unsigned int data; | |
|
8 | volatile unsigned int status; | |
|
9 | volatile unsigned int ctrl; | |
|
10 | volatile unsigned int scaler; | |
|
11 | volatile unsigned int fifoDebug; | |
|
12 | 12 | }; |
|
13 | 13 | |
|
14 |
struct |
|
|
14 | struct ahbuart_regs_str{ | |
|
15 | volatile unsigned int unused; | |
|
16 | volatile unsigned int status; | |
|
17 | volatile unsigned int ctrl; | |
|
18 | volatile unsigned int scaler; | |
|
19 | }; | |
|
20 | ||
|
21 | struct timer_regs_str | |
|
15 | 22 | { |
|
16 | 23 | volatile unsigned int counter; |
|
17 | 24 | volatile unsigned int reload; |
|
18 | 25 | volatile unsigned int ctrl; |
|
19 | volatile unsigned int unused; | |
|
20 | }; | |
|
26 | volatile unsigned int unused; | |
|
27 | }; | |
|
21 | 28 | typedef struct timer_regs_str timer_regs_t; |
|
22 | 29 | |
|
23 | struct gptimer_regs_str | |
|
24 | { | |
|
30 | struct gptimer_regs_str | |
|
31 | { | |
|
25 | 32 | volatile unsigned int scaler_value; |
|
26 | 33 | volatile unsigned int scaler_reload; |
|
27 | 34 | volatile unsigned int conf; |
|
28 | 35 | volatile unsigned int unused0; |
|
29 | timer_regs_t timer[NB_GPTIMER]; | |
|
30 | }; | |
|
36 | timer_regs_t timer[NB_GPTIMER]; | |
|
37 | }; | |
|
31 | 38 | typedef struct gptimer_regs_str gptimer_regs_t; |
|
32 | 39 | |
|
33 | struct spectral_matrices_regs_str{ | |
|
34 | volatile int ctrl; | |
|
35 | volatile int address0; | |
|
36 | volatile int address1; | |
|
37 | }; | |
|
40 | struct spectral_matrices_regs_str{ | |
|
41 | volatile int ctrl; | |
|
42 | volatile int address0; | |
|
43 | volatile int address1; | |
|
44 | }; | |
|
38 | 45 | typedef struct spectral_matrices_regs_str spectral_matrices_regs_t; |
|
39 | 46 | |
|
40 | struct time_management_regs_str{ | |
|
41 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time | |
|
42 | volatile int coarse_time_load; | |
|
47 | struct time_management_regs_str{ | |
|
48 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time | |
|
49 | volatile int coarse_time_load; | |
|
43 | 50 | volatile int coarse_time; |
|
44 | volatile int fine_time; | |
|
45 | }; | |
|
51 | volatile int fine_time; | |
|
52 | }; | |
|
46 | 53 | typedef struct time_management_regs_str time_management_regs_t; |
|
47 | 54 | |
|
48 | 55 | struct waveform_picker_regs_str{ |
@@ -63,7 +63,7 rtems_task Init( rtems_task_argument ign | |||
|
63 | 63 | PRINTF("***************************\n") |
|
64 | 64 | PRINTF("\n\n") |
|
65 | 65 | |
|
66 |
//send_console_outputs_on_ |
|
|
66 | //send_console_outputs_on_apbuart_port(); | |
|
67 | 67 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); |
|
68 | 68 | |
|
69 | 69 | initLookUpTableForCRC(); // in tc_handler.h |
@@ -145,35 +145,37 rtems_task spiq_task(rtems_task_argument | |||
|
145 | 145 | |
|
146 | 146 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; // get the current mode |
|
147 | 147 | |
|
148 | //**************** | |
|
149 | // STOP THE SYSTEM | |
|
150 | spacewire_compute_stats_offsets(); | |
|
151 | stop_current_mode(); | |
|
152 | if (rtems_task_suspend(Task_id[TASKID_RECV])!=RTEMS_SUCCESSFUL) { // suspend RECV task | |
|
153 | PRINTF("in SPIQ *** Error suspending RECV Task\n") | |
|
154 | } | |
|
155 | if (rtems_task_suspend(Task_id[TASKID_HOUS])!=RTEMS_SUCCESSFUL) { // suspend HOUS task | |
|
156 | PRINTF("in SPIQ *** Error suspending HOUS Task\n") | |
|
157 | } | |
|
148 | status = spacewire_wait_for_link(); | |
|
149 | ||
|
150 | if (status != RTEMS_SUCCESSFUL) | |
|
151 | { | |
|
152 | //**************** | |
|
153 | // STOP THE SYSTEM | |
|
154 | spacewire_compute_stats_offsets(); | |
|
155 | stop_current_mode(); | |
|
156 | if (rtems_task_suspend(Task_id[TASKID_RECV])!=RTEMS_SUCCESSFUL) { // suspend RECV task | |
|
157 | PRINTF("in SPIQ *** Error suspending RECV Task\n") | |
|
158 | } | |
|
159 | if (rtems_task_suspend(Task_id[TASKID_HOUS])!=RTEMS_SUCCESSFUL) { // suspend HOUS task | |
|
160 | PRINTF("in SPIQ *** Error suspending HOUS Task\n") | |
|
161 | } | |
|
158 | 162 | |
|
159 | //*************************** | |
|
160 | // RESTART THE SPACEWIRE LINK | |
|
161 | status = spacewire_try_to_start(); | |
|
162 | if (status != RTEMS_SUCCESSFUL) { | |
|
163 | //*************************** | |
|
164 | // RESTART THE SPACEWIRE LINK | |
|
163 | 165 | spacewire_configure_link(); |
|
164 | } | |
|
165 | 166 | |
|
166 | //******************* | |
|
167 | // RESTART THE SYSTEM | |
|
168 | //ioctl(fdSPW, SPACEWIRE_IOCTRL_CLR_STATISTICS); // clear statistics | |
|
169 | status = rtems_task_restart( Task_id[TASKID_HOUS], 1 ); | |
|
170 | if (status != RTEMS_SUCCESSFUL) { | |
|
171 | PRINTF1("in SPIQ *** Error restarting HOUS Task *** code %d\n", status) | |
|
167 | //******************* | |
|
168 | // RESTART THE SYSTEM | |
|
169 | //ioctl(fdSPW, SPACEWIRE_IOCTRL_CLR_STATISTICS); // clear statistics | |
|
170 | status = rtems_task_restart( Task_id[TASKID_HOUS], 1 ); | |
|
171 | if (status != RTEMS_SUCCESSFUL) { | |
|
172 | PRINTF1("in SPIQ *** Error restarting HOUS Task *** code %d\n", status) | |
|
173 | } | |
|
174 | if (rtems_task_restart(Task_id[TASKID_RECV], 1) != RTEMS_SUCCESSFUL) { // restart RECV task | |
|
175 | PRINTF("in SPIQ *** Error restarting RECV Task\n") | |
|
176 | } | |
|
177 | //enter_mode(lfrMode, NULL); // enter the mode that was running before the SpaceWire interruption | |
|
172 | 178 | } |
|
173 | if (rtems_task_restart(Task_id[TASKID_RECV], 1) != RTEMS_SUCCESSFUL) { // restart RECV task | |
|
174 | PRINTF("in SPIQ *** Error restarting RECV Task\n") | |
|
175 | } | |
|
176 | //enter_mode(lfrMode, NULL); // enter the mode that was running before the SpaceWire interruption | |
|
177 | 179 | } |
|
178 | 180 | } |
|
179 | 181 | |
@@ -446,7 +448,7 int spacewire_configure_link( void ) | |||
|
446 | 448 | return RTEMS_SUCCESSFUL; |
|
447 | 449 | } |
|
448 | 450 | |
|
449 |
int spacewire_ |
|
|
451 | int spacewire_wait_for_link(void) | |
|
450 | 452 | { |
|
451 | 453 | unsigned int i; |
|
452 | 454 | int linkStatus; |
@@ -91,7 +91,7 void update_spacewire_statistics() | |||
|
91 | 91 | |
|
92 | 92 | } |
|
93 | 93 | |
|
94 |
int send_console_outputs_on_ |
|
|
94 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port | |
|
95 | 95 | { |
|
96 | 96 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
97 | 97 | |
@@ -106,7 +106,7 int set_apbuart_scaler_reload_register(u | |||
|
106 | 106 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; |
|
107 | 107 | |
|
108 | 108 | apbuart_regs->scaler = value; |
|
109 |
PRINTF1("OK *** |
|
|
109 | PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
|
110 | 110 | |
|
111 | 111 | return 0; |
|
112 | 112 | } |
@@ -145,7 +145,7 rtems_isr waveforms_simulator_isr( rtems | |||
|
145 | 145 | // NORMAL |
|
146 | 146 | case(LFR_MODE_NORMAL): |
|
147 | 147 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
148 |
PRINTF("ERR *** in waveforms_isr *** error sending event to WFRM\n") |
|
|
148 | PRINTF("ERR *** in waveforms_isr *** error sending event to WFRM\n") | |
|
149 | 149 | } |
|
150 | 150 | break; |
|
151 | 151 |
General Comments 0
You need to be logged in to leave comments.
Login now