##// 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 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 16 include(./sparc.pri)
17 17
18 INCLUDEPATH += /opt/rtems-4.10/sparc-rtems/leon3/lib/include
19
18 20 # flight software version
19 21 SWVERSION=-1-0
20 22 DEFINES += SW_VERSION_N1=3 # major
@@ -13,7 +13,8 QMAKE_OBJCOPY= sparc-rtems-objcopy
13 13 QMAKE_STRIP=sparc-rtems-strip
14 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 19 QMAKE_CFLAGS_DEBUG= -g
19 20 QMAKE_CFLAGS_RELEASE=""
@@ -61,15 +62,16 contains( TEMPLATE, app ) {
61 62 #QMAKE_CFLAGS_DEBUG += -O0
62 63 #QMAKE_CXXFLAGS_RELEASE += -O0
63 64 #QMAKE_CXXFLAGS_DEBUG += -O0
65
64 66 QMAKE_CFLAGS_RELEASE += -O3
65 67 QMAKE_CFLAGS_DEBUG += -O3
66 68 QMAKE_CXXFLAGS_RELEASE += -O3
67 69 QMAKE_CXXFLAGS_DEBUG += -O3
68 70
69 #QMAKE_CFLAGS_RELEASE+= -O3 -std=c99
70 #QMAKE_CFLAGS_DEBUG+= -O3 -std=c99
71 #QMAKE_CXXFLAGS_RELEASE+= -O3 -std=c99
72 #QMAKE_CXXFLAGS_DEBUG+= -O3 -std=c99
71 #QMAKE_CFLAGS_RELEASE += -O3 -std=c99
72 #QMAKE_CFLAGS_DEBUG += -O3 -std=c99
73 #QMAKE_CXXFLAGS_RELEASE += -O3 -std=c99
74 #QMAKE_CXXFLAGS_DEBUG += -O3 -std=c99
73 75
74 76 contains( TEMPLATE, app ) {
75 77 grmon.target = grmon
@@ -61,6 +61,7 void get_temperatures( unsigned char *te
61 61 void get_v_e1_e2_f3( unsigned char *spacecraft_potential );
62 62 void get_cpu_load( unsigned char *resource_statistics );
63 63 void set_hk_lfr_sc_potential_flag( bool state );
64 void set_sy_lfr_pas_filter_enabled( bool state );
64 65 void set_sy_lfr_watchdog_enabled( bool state );
65 66 void set_hk_lfr_calib_enable( bool state );
66 67 void set_hk_lfr_reset_cause( enum lfr_reset_cause_t lfr_reset_cause );
@@ -1,25 +1,35
1 1 #include <drvmgr/ambapp_bus.h>
2 #include <drvmgr/drvmgr.h>
2 3
3 4 // GRSPW0 resources
4 struct drvmgr_key grlib_grspw_0n1_res[] = {
5 struct drvmgr_key grlib_grspw_0n1_res[] =
6 {
5 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 8 {"rxBdCnt", KEY_TYPE_INT, {(unsigned int)10}},
7 9 {"txDataSize", KEY_TYPE_INT, {(unsigned int)4096}},
8 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 12 KEY_EMPTY
11 13 };
12 14
13 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 = {
16 .next = NULL,
17 .resource = {
17 //struct drvmgr_bus_res grlib_drv_resources =
18 //{
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 31 {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 0, &grlib_grspw_0n1_res[0]},
19 // {DRIVER_AMBAPP_GAISLER_APBUART_ID, 0, &grlib_drv_res_apbuart0[0]},
20 // {DRIVER_AMBAPP_GAISLER_APBUART_ID, 1, &grlib_drv_res_apbuart1[0]},
21 RES_EMPTY /* Mark end of device resource array */
32 {DRIVER_AMBAPP_GAISLER_GRSPW_ID, 1, &grlib_grspw_0n1_res[0]},
33 RES_EMPTY /* Mark end of resource array */
22 34 }
23 35 };
24
25
@@ -45,17 +45,21
45 45
46 46 /* If --drvmgr was enabled during the configuration of the RTEMS kernel */
47 47 #ifdef RTEMS_DRVMGR_STARTUP
48 #ifdef LEON3
49 /* Add Timer and UART Driver */
50 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
51 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER
52 #endif
53 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
54 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
55 #endif
56 #endif
57 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */
58 #include <drvmgr/drvmgr_confdefs.h>
48 #ifdef LEON3
49 /* Add Timer and UART Driver */
50
51 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
52 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER
53 #endif
54
55 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
56 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
57 #endif
58
59 #endif
60 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */
61
62 #include <drvmgr/drvmgr_confdefs.h>
59 63 #endif
60 64
61 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 660 void set_sy_lfr_watchdog_enabled( bool state )
649 661 {
650 662 if (state == true)
@@ -158,6 +158,7 rtems_task recv_task( rtems_task_argumen
158 158 PRINTF("in RECV *** packet lenght too short\n")
159 159 }
160 160 else {
161 PRINTF1("incoming TC with len: %d\n", len);
161 162 estimatedPacketLength = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes
162 163 currentTC_LEN_RCV[ 0 ] = (unsigned char) (estimatedPacketLength >> 8);
163 164 currentTC_LEN_RCV[ 1 ] = (unsigned char) (estimatedPacketLength );
@@ -168,7 +169,7 rtems_task recv_task( rtems_task_argumen
168 169 || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA)
169 170 || (parserCode == WRONG_SRC_ID) )
170 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 173 if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) )
173 174 &&
174 175 !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO))
@@ -347,6 +347,7 int action_load_filter_par(ccsdsTelecomm
347 347 // store PAS filter parameters
348 348 // sy_lfr_pas_filter_enabled
349 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 351 // sy_lfr_pas_filter_modulus
351 352 filterPar.sy_lfr_pas_filter_modulus = parameter_dump_packet.sy_lfr_pas_filter_modulus;
352 353 // sy_lfr_pas_filter_tbad
General Comments 0
You need to be logged in to leave comments. Login now