@@ -1,4 +1,4 | |||||
1 |
cmake_minimum_required (VERSION 3. |
|
1 | cmake_minimum_required (VERSION 3.5) | |
2 | project (LFR_FSW) |
|
2 | project (LFR_FSW) | |
3 |
|
3 | |||
4 | if(NOT CMAKE_BUILD_TYPE) |
|
4 | if(NOT CMAKE_BUILD_TYPE) |
@@ -51,11 +51,6 | |||||
51 | extern unsigned int lastValidEnterModeTime; |
|
51 | extern unsigned int lastValidEnterModeTime; | |
52 | extern unsigned char oneTcLfrUpdateTimeReceived; |
|
52 | extern unsigned char oneTcLfrUpdateTimeReceived; | |
53 |
|
53 | |||
54 | //**** |
|
|||
55 | // ISR |
|
|||
56 | rtems_isr commutation_isr1( rtems_vector_number vector ); |
|
|||
57 | rtems_isr commutation_isr2( rtems_vector_number vector ); |
|
|||
58 |
|
||||
59 | //*********** |
|
54 | //*********** | |
60 | // RTEMS TASK |
|
55 | // RTEMS TASK | |
61 | rtems_task actn_task( rtems_task_argument unused ); |
|
56 | rtems_task actn_task( rtems_task_argument unused ); |
@@ -1,4 +1,4 | |||||
1 |
cmake_minimum_required(VERSION 3. |
|
1 | cmake_minimum_required(VERSION 3.5) | |
2 | project(libgcov C) |
|
2 | project(libgcov C) | |
3 | include(sparc-rtems) |
|
3 | include(sparc-rtems) | |
4 | include(cppcheck) |
|
4 | include(cppcheck) | |
@@ -10,7 +10,7 set(LIB_GCOV_SOURCES | |||||
10 | libgcov.c |
|
10 | libgcov.c | |
11 | ) |
|
11 | ) | |
12 | if(Coverage) |
|
12 | if(Coverage) | |
13 |
|
|
13 | add_definitions(-DGCOV_USE_EXIT) | |
14 | add_definitions(-DGCOV_ENABLED) |
|
14 | add_definitions(-DGCOV_ENABLED) | |
15 | endif() |
|
15 | endif() | |
16 | add_library(gcov STATIC ${LIB_GCOV_SOURCES}) |
|
16 | add_library(gcov STATIC ${LIB_GCOV_SOURCES}) |
@@ -11,7 +11,7 option(Coverage "Enables code coverage" | |||||
11 |
|
11 | |||
12 |
|
12 | |||
13 | set(CMAKE_C_FLAGS_RELEASE "-O2") |
|
13 | set(CMAKE_C_FLAGS_RELEASE "-O2") | |
14 | set(CMAKE_C_FLAGS_DEBUG "-O2 -g -fno-inline") |
|
14 | set(CMAKE_C_FLAGS_DEBUG "-O2 -g3 -fno-inline") | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | if(fix-b2bst) |
|
17 | if(fix-b2bst) |
@@ -1,4 +1,4 | |||||
1 |
cmake_minimum_required (VERSION 3. |
|
1 | cmake_minimum_required (VERSION 3.5) | |
2 | project (fsw) |
|
2 | project (fsw) | |
3 |
|
3 | |||
4 | include(sparc-rtems) |
|
4 | include(sparc-rtems) | |
@@ -61,6 +61,7 option(FSW_lpp_dpu_destid "Set to debug | |||||
61 | option(FSW_debug_watchdog "Enable debug watchdog" OFF) |
|
61 | option(FSW_debug_watchdog "Enable debug watchdog" OFF) | |
62 | option(FSW_debug_tch "?" OFF) |
|
62 | option(FSW_debug_tch "?" OFF) | |
63 | option(FSW_Instrument_Scrubbing "Enable scrubbing counter" OFF) |
|
63 | option(FSW_Instrument_Scrubbing "Enable scrubbing counter" OFF) | |
|
64 | option(FSW_Enable_Dead_Code "Enable dead code compilation, this is used to hide by default unused code." OFF) | |||
64 |
|
65 | |||
65 | set(SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE) |
|
66 | set(SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE) | |
66 | set(SW_VERSION_N2 "2" CACHE STRING "Choose N2 FSW Version." FORCE) |
|
67 | set(SW_VERSION_N2 "2" CACHE STRING "Choose N2 FSW Version." FORCE) | |
@@ -95,6 +96,11 if(FSW_debug_tch) | |||||
95 |
|
|
96 | add_definitions(-DDEBUG_TCH) | |
96 | endif() |
|
97 | endif() | |
97 |
|
98 | |||
|
99 | if(FSW_Enable_Dead_Code) | |||
|
100 | add_definitions(-DENABLE_DEAD_CODE) | |||
|
101 | endif() | |||
|
102 | ||||
|
103 | ||||
98 |
|
104 | |||
99 |
|
105 | |||
100 | add_definitions(-DMSB_FIRST_TCH) |
|
106 | add_definitions(-DMSB_FIRST_TCH) |
@@ -66,6 +66,7 void timer_configure(unsigned char timer | |||||
66 | timer_set_clock_divider( timer, clock_divider); |
|
66 | timer_set_clock_divider( timer, clock_divider); | |
67 | } |
|
67 | } | |
68 |
|
68 | |||
|
69 | #ifdef ENABLE_DEAD_CODE | |||
69 | void timer_start(unsigned char timer) |
|
70 | void timer_start(unsigned char timer) | |
70 | { |
|
71 | { | |
71 | /** This function starts a GPTIMER timer. |
|
72 | /** This function starts a GPTIMER timer. | |
@@ -81,6 +82,7 void timer_start(unsigned char timer) | |||||
81 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | GPTIMER_RS; |
|
82 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | GPTIMER_RS; | |
82 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | GPTIMER_IE; |
|
83 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | GPTIMER_IE; | |
83 | } |
|
84 | } | |
|
85 | #endif | |||
84 |
|
86 | |||
85 | void timer_stop(unsigned char timer) |
|
87 | void timer_stop(unsigned char timer) | |
86 | { |
|
88 | { |
@@ -222,10 +222,6 int tc_check_type( unsigned char packetT | |||||
222 | { |
|
222 | { | |
223 | status = CCSDS_TM_VALID; |
|
223 | status = CCSDS_TM_VALID; | |
224 | } |
|
224 | } | |
225 | else |
|
|||
226 | { |
|
|||
227 | status = ILL_TYPE; |
|
|||
228 | } |
|
|||
229 |
|
225 | |||
230 | return status; |
|
226 | return status; | |
231 | } |
|
227 | } |
@@ -1433,6 +1433,7 void setCalibrationData( void ) | |||||
1433 | } |
|
1433 | } | |
1434 | } |
|
1434 | } | |
1435 |
|
1435 | |||
|
1436 | #ifdef ENABLE_DEAD_CODE | |||
1436 | void setCalibrationDataInterleaved( void ) |
|
1437 | void setCalibrationDataInterleaved( void ) | |
1437 | { |
|
1438 | { | |
1438 | /** This function is used to store the values used to drive the DAC in order to generate the SCM calibration signal |
|
1439 | /** This function is used to store the values used to drive the DAC in order to generate the SCM calibration signal | |
@@ -1477,6 +1478,7 void setCalibrationDataInterleaved( void | |||||
1477 | + ( (dataPtr[1] & CAL_DATA_MASK_INTER) << CAL_DATA_SHIFT_INTER); |
|
1478 | + ( (dataPtr[1] & CAL_DATA_MASK_INTER) << CAL_DATA_SHIFT_INTER); | |
1478 | } |
|
1479 | } | |
1479 | } |
|
1480 | } | |
|
1481 | #endif | |||
1480 |
|
1482 | |||
1481 | void setCalibrationReload( bool state) |
|
1483 | void setCalibrationReload( bool state) | |
1482 | { |
|
1484 | { | |
@@ -1503,6 +1505,7 void setCalibrationEnable( bool state ) | |||||
1503 | } |
|
1505 | } | |
1504 | } |
|
1506 | } | |
1505 |
|
1507 | |||
|
1508 | #ifdef ENABLE_DEAD_CODE | |||
1506 | void setCalibrationInterleaved( bool state ) |
|
1509 | void setCalibrationInterleaved( bool state ) | |
1507 | { |
|
1510 | { | |
1508 | // this bit drives the multiplexer |
|
1511 | // this bit drives the multiplexer | |
@@ -1515,6 +1518,7 void setCalibrationInterleaved( bool sta | |||||
1515 | time_management_regs->calDACCtrl = time_management_regs->calDACCtrl & MASK_SET_INTERLEAVED; // [1101 1111] |
|
1518 | time_management_regs->calDACCtrl = time_management_regs->calDACCtrl & MASK_SET_INTERLEAVED; // [1101 1111] | |
1516 | } |
|
1519 | } | |
1517 | } |
|
1520 | } | |
|
1521 | #endif | |||
1518 |
|
1522 | |||
1519 | void setCalibration( bool state ) |
|
1523 | void setCalibration( bool state ) | |
1520 | { |
|
1524 | { | |
@@ -1535,6 +1539,7 void setCalibration( bool state ) | |||||
1535 | void configureCalibration( bool interleaved ) |
|
1539 | void configureCalibration( bool interleaved ) | |
1536 | { |
|
1540 | { | |
1537 | setCalibration( false ); |
|
1541 | setCalibration( false ); | |
|
1542 | #ifdef ENABLE_DEAD_CODE | |||
1538 | if ( interleaved == true ) |
|
1543 | if ( interleaved == true ) | |
1539 | { |
|
1544 | { | |
1540 | setCalibrationInterleaved( true ); |
|
1545 | setCalibrationInterleaved( true ); | |
@@ -1543,6 +1548,7 void configureCalibration( bool interlea | |||||
1543 | setCalibrationDataInterleaved(); |
|
1548 | setCalibrationDataInterleaved(); | |
1544 | } |
|
1549 | } | |
1545 | else |
|
1550 | else | |
|
1551 | #endif | |||
1546 | { |
|
1552 | { | |
1547 | setCalibrationPrescaler( 0 ); // 25 MHz => 25 000 000 |
|
1553 | setCalibrationPrescaler( 0 ); // 25 MHz => 25 000 000 | |
1548 | setCalibrationDivisor( CAL_F_DIVISOR ); // => 160 256 (39 - 1) |
|
1554 | setCalibrationDivisor( CAL_F_DIVISOR ); // => 160 256 (39 - 1) | |
@@ -1648,22 +1654,6 void close_action(ccsdsTelecommandPacket | |||||
1648 | } |
|
1654 | } | |
1649 | } |
|
1655 | } | |
1650 |
|
1656 | |||
1651 | //*************************** |
|
|||
1652 | // Interrupt Service Routines |
|
|||
1653 | rtems_isr commutation_isr1( rtems_vector_number vector ) |
|
|||
1654 | { |
|
|||
1655 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
|||
1656 | PRINTF("In commutation_isr1 *** Error sending event to DUMB\n") |
|
|||
1657 | } |
|
|||
1658 | } |
|
|||
1659 |
|
||||
1660 | rtems_isr commutation_isr2( rtems_vector_number vector ) |
|
|||
1661 | { |
|
|||
1662 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
|||
1663 | PRINTF("In commutation_isr2 *** Error sending event to DUMB\n") |
|
|||
1664 | } |
|
|||
1665 | } |
|
|||
1666 |
|
||||
1667 | //**************** |
|
1657 | //**************** | |
1668 | // OTHER FUNCTIONS |
|
1658 | // OTHER FUNCTIONS | |
1669 | void updateLFRCurrentMode( unsigned char requestedMode ) |
|
1659 | void updateLFRCurrentMode( unsigned char requestedMode ) |
@@ -240,6 +240,7 int send_tm_lfr_tc_exe_not_executable( c | |||||
240 | return status; |
|
240 | return status; | |
241 | } |
|
241 | } | |
242 |
|
242 | |||
|
243 | #ifdef DENABLE_DEAD_CODE | |||
243 | int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ) |
|
244 | int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ) | |
244 | { |
|
245 | { | |
245 | /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue. |
|
246 | /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue. | |
@@ -305,6 +306,7 int send_tm_lfr_tc_exe_not_implemented( | |||||
305 |
|
306 | |||
306 | return status; |
|
307 | return status; | |
307 | } |
|
308 | } | |
|
309 | #endif | |||
308 |
|
310 | |||
309 | int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
311 | int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
310 | { |
|
312 | { |
General Comments 0
You need to be logged in to leave comments.
Login now