##// END OF EJS Templates
commit before going back to 3.1.0.2 for LESIA compilation
paul -
r295:16a2669a01ce R3_plus draft
parent child
Show More
@@ -1,2 +1,2
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
1 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters
2 c378fa14eadd80b3b873ca7c8f9f387893c07692 header/lfr_common_headers
2 1ffa3d630b9ced4a87a362dafb10d9838e9cc0d9 header/lfr_common_headers
@@ -15,6 +15,8 CONFIG -= qt
15
15
16 include(./sparc.pri)
16 include(./sparc.pri)
17
17
18 INCLUDEPATH += /opt/rtems-4.10/sparc-rtems/leon3/lib/include
19
18 # flight software version
20 # flight software version
19 SWVERSION=-1-0
21 SWVERSION=-1-0
20 DEFINES += SW_VERSION_N1=3 # major
22 DEFINES += SW_VERSION_N1=3 # major
@@ -13,7 +13,8 QMAKE_OBJCOPY= sparc-rtems-objcopy
13 QMAKE_STRIP=sparc-rtems-strip
13 QMAKE_STRIP=sparc-rtems-strip
14 QMAKE_GDB=sparc-rtems-gdb
14 QMAKE_GDB=sparc-rtems-gdb
15
15
16 INCLUDEPATH += /opt/rtems-4.10
16 #INCLUDEPATH += /opt/rtems-4.10
17 INCLUDEPATH += /opt/rtems-4.10/sparc-rtems/leon3/lib/include
17
18
18 QMAKE_CFLAGS_DEBUG= -g
19 QMAKE_CFLAGS_DEBUG= -g
19 QMAKE_CFLAGS_RELEASE=""
20 QMAKE_CFLAGS_RELEASE=""
@@ -61,15 +62,16 contains( TEMPLATE, app ) {
61 #QMAKE_CFLAGS_DEBUG += -O0
62 #QMAKE_CFLAGS_DEBUG += -O0
62 #QMAKE_CXXFLAGS_RELEASE += -O0
63 #QMAKE_CXXFLAGS_RELEASE += -O0
63 #QMAKE_CXXFLAGS_DEBUG += -O0
64 #QMAKE_CXXFLAGS_DEBUG += -O0
65
64 QMAKE_CFLAGS_RELEASE += -O3
66 QMAKE_CFLAGS_RELEASE += -O3
65 QMAKE_CFLAGS_DEBUG += -O3
67 QMAKE_CFLAGS_DEBUG += -O3
66 QMAKE_CXXFLAGS_RELEASE += -O3
68 QMAKE_CXXFLAGS_RELEASE += -O3
67 QMAKE_CXXFLAGS_DEBUG += -O3
69 QMAKE_CXXFLAGS_DEBUG += -O3
68
70
69 #QMAKE_CFLAGS_RELEASE+= -O3 -std=c99
71 #QMAKE_CFLAGS_RELEASE += -O3 -std=c99
70 #QMAKE_CFLAGS_DEBUG+= -O3 -std=c99
72 #QMAKE_CFLAGS_DEBUG += -O3 -std=c99
71 #QMAKE_CXXFLAGS_RELEASE+= -O3 -std=c99
73 #QMAKE_CXXFLAGS_RELEASE += -O3 -std=c99
72 #QMAKE_CXXFLAGS_DEBUG+= -O3 -std=c99
74 #QMAKE_CXXFLAGS_DEBUG += -O3 -std=c99
73
75
74 contains( TEMPLATE, app ) {
76 contains( TEMPLATE, app ) {
75 grmon.target = grmon
77 grmon.target = grmon
@@ -61,6 +61,7 void get_temperatures( unsigned char *te
61 void get_v_e1_e2_f3( unsigned char *spacecraft_potential );
61 void get_v_e1_e2_f3( unsigned char *spacecraft_potential );
62 void get_cpu_load( unsigned char *resource_statistics );
62 void get_cpu_load( unsigned char *resource_statistics );
63 void set_hk_lfr_sc_potential_flag( bool state );
63 void set_hk_lfr_sc_potential_flag( bool state );
64 void set_sy_lfr_pas_filter_enabled( bool state );
64 void set_sy_lfr_watchdog_enabled( bool state );
65 void set_sy_lfr_watchdog_enabled( bool state );
65 void set_hk_lfr_calib_enable( bool state );
66 void set_hk_lfr_calib_enable( bool state );
66 void set_hk_lfr_reset_cause( enum lfr_reset_cause_t lfr_reset_cause );
67 void set_hk_lfr_reset_cause( enum lfr_reset_cause_t lfr_reset_cause );
@@ -1,25 +1,35
1 #include <drvmgr/ambapp_bus.h>
1 #include <drvmgr/ambapp_bus.h>
2 #include <drvmgr/drvmgr.h>
2
3
3 // GRSPW0 resources
4 // GRSPW0 resources
4 struct drvmgr_key grlib_grspw_0n1_res[] = {
5 struct drvmgr_key grlib_grspw_0n1_res[] =
6 {
5 {"txBdCnt", KEY_TYPE_INT, {(unsigned int)50}}, // 7 SWF_F0, 7 SWF_F1, 7 SWF_F2, 7 CWF_F3, 7 CWF_F1 ou 7 CWF_F2
7 {"txBdCnt", KEY_TYPE_INT, {(unsigned int)50}}, // 7 SWF_F0, 7 SWF_F1, 7 SWF_F2, 7 CWF_F3, 7 CWF_F1 ou 7 CWF_F2
6 {"rxBdCnt", KEY_TYPE_INT, {(unsigned int)10}},
8 {"rxBdCnt", KEY_TYPE_INT, {(unsigned int)10}},
7 {"txDataSize", KEY_TYPE_INT, {(unsigned int)4096}},
9 {"txDataSize", KEY_TYPE_INT, {(unsigned int)4096}},
8 {"txHdrSize", KEY_TYPE_INT, {(unsigned int)34}},
10 {"txHdrSize", KEY_TYPE_INT, {(unsigned int)34}},
9 {"rxPktSize", KEY_TYPE_INT, {(unsigned int)228+4}},
11 {"rxPktSize", KEY_TYPE_INT, {(unsigned int)200}},
10 KEY_EMPTY
12 KEY_EMPTY
11 };
13 };
12
14
13 // If RTEMS_DRVMGR_STARTUP is defined we override the "weak defaults" that is defined by the LEON3 BSP.
15 // If RTEMS_DRVMGR_STARTUP is defined we override the "weak defaults" that is defined by the LEON3 BSP.
14
16
15 struct drvmgr_bus_res grlib_drv_resources = {
17 //struct drvmgr_bus_res grlib_drv_resources =
16 .next = NULL,
18 //{
17 .resource = {
19 // .next = NULL,
20 // .resource = {
21 // {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 0, &grlib_grspw_0n1_res[0]},
22 // {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 1, &grlib_grspw_0n1_res[0]},
23 // RES_EMPTY /* Mark end of resource array */
24 // }
25 //};
26
27 struct drvmgr_bus_res grlib_drv_resources =
28 {
29 NULL,
30 {
18 {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 0, &grlib_grspw_0n1_res[0]},
31 {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 0, &grlib_grspw_0n1_res[0]},
19 // {DRIVER_AMBAPP_GAISLER_APBUART_ID, 0, &grlib_drv_res_apbuart0[0]},
32 {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 1, &grlib_grspw_0n1_res[0]},
20 // {DRIVER_AMBAPP_GAISLER_APBUART_ID, 1, &grlib_drv_res_apbuart1[0]},
33 RES_EMPTY /* Mark end of resource array */
21 RES_EMPTY /* Mark end of device resource array */
22 }
34 }
23 };
35 };
24
25
@@ -45,17 +45,21
45
45
46 /* If --drvmgr was enabled during the configuration of the RTEMS kernel */
46 /* If --drvmgr was enabled during the configuration of the RTEMS kernel */
47 #ifdef RTEMS_DRVMGR_STARTUP
47 #ifdef RTEMS_DRVMGR_STARTUP
48 #ifdef LEON3
48 #ifdef LEON3
49 /* Add Timer and UART Driver */
49 /* Add Timer and UART Driver */
50 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
50
51 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER
51 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
52 #endif
52 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER
53 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
53 #endif
54 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
54
55 #endif
55 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
56 #endif
56 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
57 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */
57 #endif
58 #include <drvmgr/drvmgr_confdefs.h>
58
59 #endif
60 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */
61
62 #include <drvmgr/drvmgr_confdefs.h>
59 #endif
63 #endif
60
64
61 #include "fsw_init.h"
65 #include "fsw_init.h"
@@ -645,6 +645,18 void set_hk_lfr_sc_potential_flag( bool
645 }
645 }
646 }
646 }
647
647
648 void set_sy_lfr_pas_filter_enabled( bool state )
649 {
650 if (state == true)
651 {
652 housekeeping_packet.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1] | 0x20; // [0010 0000]
653 }
654 else
655 {
656 housekeeping_packet.lfr_status_word[1] = housekeeping_packet.lfr_status_word[1] & 0xdf; // [1101 1111]
657 }
658 }
659
648 void set_sy_lfr_watchdog_enabled( bool state )
660 void set_sy_lfr_watchdog_enabled( bool state )
649 {
661 {
650 if (state == true)
662 if (state == true)
@@ -158,6 +158,7 rtems_task recv_task( rtems_task_argumen
158 PRINTF("in RECV *** packet lenght too short\n")
158 PRINTF("in RECV *** packet lenght too short\n")
159 }
159 }
160 else {
160 else {
161 PRINTF1("incoming TC with len: %d\n", len);
161 estimatedPacketLength = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes
162 estimatedPacketLength = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes
162 currentTC_LEN_RCV[ 0 ] = (unsigned char) (estimatedPacketLength >> 8);
163 currentTC_LEN_RCV[ 0 ] = (unsigned char) (estimatedPacketLength >> 8);
163 currentTC_LEN_RCV[ 1 ] = (unsigned char) (estimatedPacketLength );
164 currentTC_LEN_RCV[ 1 ] = (unsigned char) (estimatedPacketLength );
@@ -168,7 +169,7 rtems_task recv_task( rtems_task_argumen
168 || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA)
169 || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA)
169 || (parserCode == WRONG_SRC_ID) )
170 || (parserCode == WRONG_SRC_ID) )
170 { // send TM_LFR_TC_EXE_CORRUPTED
171 { // send TM_LFR_TC_EXE_CORRUPTED
171 PRINTF1("TC corrupted received, with code: %d\n", parserCode)
172 PRINTF1("TC corrupted received, with code: %d\n", parserCode);
172 if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) )
173 if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) )
173 &&
174 &&
174 !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO))
175 !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO))
@@ -347,6 +347,7 int action_load_filter_par(ccsdsTelecomm
347 // store PAS filter parameters
347 // store PAS filter parameters
348 // sy_lfr_pas_filter_enabled
348 // sy_lfr_pas_filter_enabled
349 filterPar.spare_sy_lfr_pas_filter_enabled = parameter_dump_packet.spare_sy_lfr_pas_filter_enabled;
349 filterPar.spare_sy_lfr_pas_filter_enabled = parameter_dump_packet.spare_sy_lfr_pas_filter_enabled;
350 set_sy_lfr_pas_filter_enabled( parameter_dump_packet.spare_sy_lfr_pas_filter_enabled & 0x01 );
350 // sy_lfr_pas_filter_modulus
351 // sy_lfr_pas_filter_modulus
351 filterPar.sy_lfr_pas_filter_modulus = parameter_dump_packet.sy_lfr_pas_filter_modulus;
352 filterPar.sy_lfr_pas_filter_modulus = parameter_dump_packet.sy_lfr_pas_filter_modulus;
352 // sy_lfr_pas_filter_tbad
353 // sy_lfr_pas_filter_tbad
General Comments 0
You need to be logged in to leave comments. Login now