Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r8cf0fafa78ce14b5dbdf95510e957846660ac2b9 -r4c26b49a73736fa697bf7565dd7685c4e1cd599a --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 8cf0fafa78ce14b5dbdf95510e957846660ac2b9) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 4c26b49a73736fa697bf7565dd7685c4e1cd599a) @@ -23,27 +23,27 @@ #include "Comm.h" #include "Interrupts.h" -#include "OperationModes.h" -#include "SystemComm.h" -#include "SystemCommMessages.h" -#include "Interrupts.h" #include "OperationModes.h" +#include "SystemComm.h" +#include "SystemCommMessages.h" +#include "Interrupts.h" +#include "OperationModes.h" #include "Timers.h" #include "Utilities.h" -/** - * @addtogroup SystemComm - * @{ - */ - +/** + * @addtogroup SystemComm + * @{ + */ + // ********** private definitions ********** #define NUM_OF_CAN_OUT_BUFFERS 5 ///< Number of CAN buffers for transmit #define NUM_OF_CAN_IN_BUFFERS 7 ///< Number of CAN buffers for receiving -#define NUM_OF_MSG_IN_BUFFERS 7 ///< Number of Msg buffers for receiving +#define NUM_OF_MSG_IN_BUFFERS 7 ///< Number of Msg buffers for receiving #define CAN_XMIT_PACKET_TIMEOUT_MS 200 ///< If transmitted CAN frame does not cause a transmit complete interrupt within this time, re-send or move on -#define MAX_XMIT_RETRIES 5 ///< Maximum number of retries on no transmit complete interrupt timeout +#define MAX_XMIT_RETRIES 5 ///< Maximum number of retries on no transmit complete interrupt timeout #define UI_COMM_TIMEOUT_IN_MS 7500 ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD. #define UI_COMM_SERVICE_MODE_TIMEOUT_IN_MS (2 * SEC_PER_MIN * MS_PER_SECOND) ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD when in service mode. @@ -53,7 +53,7 @@ #define MAX_COMM_CRC_FAILURE_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< CRC error window #define MSG_NOT_ACKED_TIMEOUT_MS 250 ///< Maximum time for a Denali message that requires ACK to be ACK'd - + #define MSG_NOT_ACKED_MAX_RETRIES 10 ///< Maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm #define PENDING_ACK_LIST_SIZE 25 ///< Maximum number of Denali messages that can be pending ACK at any given time @@ -65,7 +65,7 @@ #pragma pack(push, 1) -/// Record for transmitted message that is pending acknowledgment from receiver. +/// Record for transmitted message that is pending acknowledgment from receiver. typedef struct { BOOL used; ///< Used. @@ -81,7 +81,7 @@ // ********** private data ********** -/// Array of out-going CAN buffers. +/// Array of out-going CAN buffers. const COMM_BUFFER_T CAN_OUT_BUFFERS[ NUM_OF_CAN_OUT_BUFFERS ] = { COMM_BUFFER_OUT_CAN_HD_ALARM, @@ -91,7 +91,7 @@ COMM_BUFFER_OUT_CAN_PC }; -/// Array of in-coming CAN buffers. +/// Array of in-coming CAN buffers. const COMM_BUFFER_T MSG_IN_BUFFERS[ NUM_OF_MSG_IN_BUFFERS ] = { COMM_BUFFER_IN_CAN_DG_ALARM, @@ -109,8 +109,8 @@ static volatile PENDING_ACK_RECORD_T pendingAckList[ PENDING_ACK_LIST_SIZE ]; ///< List of outgoing messages that are awaiting an ACK -static volatile BOOL hdIsOnlyCANNode = TRUE; ///< Flag indicating whether HD is alone on CAN bus. -static U32 canXmitRetryCtr = 0; ///< Counter for CAN transmit retries. +static volatile BOOL hdIsOnlyCANNode = TRUE; ///< Flag indicating whether HD is alone on CAN bus. +static U32 canXmitRetryCtr = 0; ///< Counter for CAN transmit retries. static volatile BOOL dgIsCommunicating = FALSE; ///< Has DG sent a message since last check static U32 timeOfLastDGCheckIn = 0; ///< Last time DG checked in static volatile BOOL uiIsCommunicating = FALSE; ///< Has UI sent a message since last check @@ -148,12 +148,12 @@ { U32 i; - // Initialize bad message CRC time windowed count - initTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC, MAX_COMM_CRC_FAILURES, MAX_COMM_CRC_FAILURE_WINDOW_MS ); - - // Initialize FPGA clock speed error time windowed count - initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); + // Initialize bad message CRC time windowed count + initTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC, MAX_COMM_CRC_FAILURES, MAX_COMM_CRC_FAILURE_WINDOW_MS ); + // Initialize FPGA clock speed error time windowed count + initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); + // Initialize pending ACK list for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { @@ -172,11 +172,11 @@ void checkInFromDG( void ) { dgIsCommunicating = TRUE; - timeOfLastDGCheckIn = getMSTimerCount(); - - if ( TRUE == isAlarmActive( ALARM_ID_HD_DG_COMM_TIMEOUT ) ) - { - clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); + timeOfLastDGCheckIn = getMSTimerCount(); + + if ( TRUE == isAlarmActive( ALARM_ID_HD_DG_COMM_TIMEOUT ) ) + { + clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); } } @@ -190,10 +190,10 @@ *************************************************************************/ void checkInFromUI( void ) { - if ( FALSE == uiDidCommunicate ) - { // Start DG check-in timer when UI first communicates - timeOfLastDGCheckIn = getMSTimerCount(); - } + if ( FALSE == uiDidCommunicate ) + { // Start DG check-in timer when UI first communicates + timeOfLastDGCheckIn = getMSTimerCount(); + } uiIsCommunicating = TRUE; timeOfLastUICheckIn = getMSTimerCount(); @@ -238,36 +238,36 @@ * @return TRUE if UI has communicated since power up, FALSE if not *************************************************************************/ BOOL uiCommunicated( void ) -{ -#ifdef SIMULATE_UI - uiDidCommunicate = TRUE; -#endif +{ +#ifdef SIMULATE_UI + uiDidCommunicate = TRUE; +#endif return uiDidCommunicate; -} - -/*********************************************************************//** - * @brief - * The isHDOnlyCANNode function determines whether the HD is the only node - * currently on the CAN bus. - * @details Inputs: hdIsOnlyCANNode - * @details Outputs: none - * @return TRUE if HD is only node on CAN bus, FALSE if not - *************************************************************************/ -BOOL isHDOnlyCANNode( void ) -{ - return hdIsOnlyCANNode; } /*********************************************************************//** * @brief + * The isHDOnlyCANNode function determines whether the HD is the only node + * currently on the CAN bus. + * @details Inputs: hdIsOnlyCANNode + * @details Outputs: none + * @return TRUE if HD is only node on CAN bus, FALSE if not + *************************************************************************/ +BOOL isHDOnlyCANNode( void ) +{ + return hdIsOnlyCANNode; +} + +/*********************************************************************//** + * @brief * The execSystemCommRx function manages received data from other sub-systems. * @details Inputs: none * @details Outputs: Incoming messages parsed and processed. * @return none *************************************************************************/ void execSystemCommRx( void ) -{ +{ // Parse messages from comm buffers and queue them processIncomingData(); @@ -297,39 +297,39 @@ *************************************************************************/ void execSystemCommTx( void ) { - // Do not transmit if no other nodes on CAN bus - if ( FALSE == hdIsOnlyCANNode ) - { - // If CAN transmitter is idle, start transmitting any pending packets - if ( FALSE == isCAN1TransmitInProgress() ) - { - transmitNextCANPacket(); - } - else - { - // Generally, transmitter should not be busy at time of this function call - check timeout just in case so we do not get stuck waiting forever - if ( TRUE == didTimeout( lastCANPacketSentTimeStamp, CAN_XMIT_PACKET_TIMEOUT_MS ) ) - { - // Assume last packet was not successfully transmitted. Re-send last packet. - if ( ++canXmitRetryCtr <= MAX_XMIT_RETRIES ) - { - // Ensure we have a previous CAN packet/channel to resend - canTransmit() channel param MUST be valid - if ( ( lastCANPacketSentChannel > COMM_BUFFER_NOT_USED ) && ( lastCANPacketSentChannel <= COMM_BUFFER_LAST_CAN_BUFFER ) ) - { - canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); - } - } - // We must be only node on CAN bus - nobody is ACKing our transmitted frames - else - { - hdIsOnlyCANNode = TRUE; // Set only CAN node flag - canXmitRetryCtr = MAX_XMIT_RETRIES; - signalCANXmitsCompleted(); // Clear pending xmit flag - clearCANXmitBuffers(); // Clear xmit buffers - nothing is going out right now - } // end - are we retrying xmit or are we alone on CAN bus - } // end - pending xmit timeout? - } // end - transmit in progress or not - } // end - DG not alone on CAN bus + // Do not transmit if no other nodes on CAN bus + if ( FALSE == hdIsOnlyCANNode ) + { + // If CAN transmitter is idle, start transmitting any pending packets + if ( FALSE == isCAN1TransmitInProgress() ) + { + transmitNextCANPacket(); + } + else + { + // Generally, transmitter should not be busy at time of this function call - check timeout just in case so we do not get stuck waiting forever + if ( TRUE == didTimeout( lastCANPacketSentTimeStamp, CAN_XMIT_PACKET_TIMEOUT_MS ) ) + { + // Assume last packet was not successfully transmitted. Re-send last packet. + if ( ++canXmitRetryCtr <= MAX_XMIT_RETRIES ) + { + // Ensure we have a previous CAN packet/channel to resend - canTransmit() channel param MUST be valid + if ( ( lastCANPacketSentChannel > COMM_BUFFER_NOT_USED ) && ( lastCANPacketSentChannel <= COMM_BUFFER_LAST_CAN_BUFFER ) ) + { + canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); + } + } + // We must be only node on CAN bus - nobody is ACKing our transmitted frames + else + { + hdIsOnlyCANNode = TRUE; // Set only CAN node flag + canXmitRetryCtr = MAX_XMIT_RETRIES; + signalCANXmitsCompleted(); // Clear pending xmit flag + clearCANXmitBuffers(); // Clear xmit buffers - nothing is going out right now + } // end - are we retrying xmit or are we alone on CAN bus + } // end - pending xmit timeout? + } // end - transmit in progress or not + } // end - DG not alone on CAN bus } /*********************************************************************//** @@ -348,15 +348,15 @@ // Message interrupt is for a transmit message box? if ( TRUE == isCANBoxForXmit( srcCANBox ) ) { - U32 bytesXmitted; - + U32 bytesXmitted; + bytesXmitted = transmitNextCANPacket(); // If nothing more to send, signal that transmitter is available if ( 0 == bytesXmitted ) { signalCANXmitsCompleted(); - } + } } else if ( TRUE == isCANBoxForRecv( srcCANBox ) ) { @@ -377,7 +377,7 @@ } else { - // Should not get here - not an active message box + // Should not get here - not an active message box SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_CAN_MESSAGE_BOX, srcCANBox ) } } @@ -432,26 +432,26 @@ } return result; -} - -/*********************************************************************//** - * @brief - * The clearCANXmitBuffers function clears all CAN transmit buffers. - * @details Inputs: CAN_OUT_BUFFERS[] - * @details Outputs: CAN transmit buffers cleared. - * @return none - *************************************************************************/ -static void clearCANXmitBuffers( void ) -{ - U32 i; - - for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) - { - clearBuffer( CAN_OUT_BUFFERS[ i ] ); - } } +/*********************************************************************//** + * @brief + * The clearCANXmitBuffers function clears all CAN transmit buffers. + * @details Inputs: CAN_OUT_BUFFERS[] + * @details Outputs: CAN transmit buffers cleared. + * @return none + *************************************************************************/ +static void clearCANXmitBuffers( void ) +{ + U32 i; + for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) + { + clearBuffer( CAN_OUT_BUFFERS[ i ] ); + } +} + + /************************************************************************* ********************** TRANSMIT SUPPORT FUNCTIONS ************************ *************************************************************************/ @@ -543,7 +543,7 @@ * The processIncomingData function parses out messages from the Input * Comm Buffers and adds them to the Received Message Queue. * @details Inputs: none - * @details Outputs:hdIsOnlyCANNode, rcvMsg, dgIsCommunicating, + * @details Outputs:hdIsOnlyCANNode, rcvMsg, dgIsCommunicating, * timeOfLastDGCheckIn, timeOfLastUICheckIn, uiDidCommunicate * @return none *************************************************************************/ @@ -572,9 +572,9 @@ if ( numOfBytesInBuffer >= MESSAGE_OVERHEAD_SIZE ) { // Peek at minimum of all bytes available or max message size (+1 for sync byte) U32 bytesPeeked = peekFromCommBuffer( MSG_IN_BUFFERS[ i ], data, MIN( numOfBytesInBuffer, sizeof( MESSAGE_WRAPPER_T ) + 1 ) ); - S32 msgSize = parseMessageFromBuffer( data, bytesPeeked ); - - hdIsOnlyCANNode = FALSE; // Since we are getting a message, this indicates we are not the only node on the CAN bus + S32 msgSize = parseMessageFromBuffer( data, bytesPeeked ); + + hdIsOnlyCANNode = FALSE; // Since we are getting a message, this indicates we are not the only node on the CAN bus canXmitRetryCtr = 0; if ( msgSize > 0 ) // Valid, complete message found? @@ -597,19 +597,19 @@ // Copy CRC portion of message data to the new message rcvMsg.crc = *dataPtr; // Add new message to queue for later processing - addToMsgQueue( MSG_Q_IN, &rcvMsg ); - // If message from DG broadcast channel, update DG comm status - if ( COMM_BUFFER_IN_CAN_DG_BROADCAST == MSG_IN_BUFFERS[ i ] ) - { - dgIsCommunicating = TRUE; - timeOfLastDGCheckIn = getMSTimerCount(); - } - // If message from UI channel, mark UI communication so HD can begin transmitting - if ( ( COMM_BUFFER_IN_CAN_UI_2_HD == MSG_IN_BUFFERS[ i ] ) || ( COMM_BUFFER_IN_CAN_UI_BROADCAST == MSG_IN_BUFFERS[ i ] ) ) - { - timeOfLastUICheckIn = getMSTimerCount(); - uiDidCommunicate = TRUE; + addToMsgQueue( MSG_Q_IN, &rcvMsg ); + // If message from DG broadcast channel, update DG comm status + if ( COMM_BUFFER_IN_CAN_DG_BROADCAST == MSG_IN_BUFFERS[ i ] ) + { + dgIsCommunicating = TRUE; + timeOfLastDGCheckIn = getMSTimerCount(); } + // If message from UI channel, mark UI communication so HD can begin transmitting + if ( ( COMM_BUFFER_IN_CAN_UI_2_HD == MSG_IN_BUFFERS[ i ] ) || ( COMM_BUFFER_IN_CAN_UI_BROADCAST == MSG_IN_BUFFERS[ i ] ) ) + { + timeOfLastUICheckIn = getMSTimerCount(); + uiDidCommunicate = TRUE; + } } else if ( -1 == msgSize ) // Candidate message with bad CRC found? { @@ -721,7 +721,7 @@ { BOOL isThereMsgRcvd = TRUE; // Assume TRUE at first to get into while loop MESSAGE_WRAPPER_T message; - + while ( TRUE == isThereMsgRcvd ) { // See if any messages received @@ -780,10 +780,10 @@ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_COMM_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif { - activateAlarmNoData( ALARM_ID_HD_UI_COMM_TIMEOUT ); - } + clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); + } + dgIsCommunicating = FALSE; } - if ( TRUE == didTimeout( timeOfLastDGCheckIn, DG_COMM_TIMEOUT_IN_MS ) ) { #ifndef RUN_WITHOUT_DG @@ -815,10 +815,10 @@ *************************************************************************/ static void checkTooManyBadMsgCRCs( void ) { - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); - } + if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); + } } /*********************************************************************//** @@ -861,8 +861,8 @@ { _enable_IRQ(); } - } - + } + return result; } @@ -923,7 +923,7 @@ pendingAckList[ i ].retries--; pendingAckList[ i ].timeStamp = getMSTimerCount(); addToCommBuffer( pendingAckList[ i ].channel, (U08*)pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); - } + } // If no retries left, alarm else { @@ -964,18 +964,18 @@ handleOffButtonConfirmMsgFromUI( message ); break; - case MSG_ID_ALARM_TRIGGERED: - handleAlarmTriggered( message ); - break; - - case MSG_ID_ALARM_CONDITION_CLEARED: - handleAlarmCleared( message ); - break; - - case MSG_ID_UI_ALARM_USER_ACTION_REQUEST: - handleAlarmUserAction( message ); + case MSG_ID_ALARM_TRIGGERED: + handleAlarmTriggered( message ); break; + case MSG_ID_ALARM_CONDITION_CLEARED: + handleAlarmCleared( message ); + break; + + case MSG_ID_UI_ALARM_USER_ACTION_REQUEST: + handleAlarmUserAction( message ); + break; + case MSG_ID_UI_CHECK_IN: handleUICheckIn( message ); break; @@ -990,12 +990,12 @@ case MSG_ID_USER_UF_SETTINGS_CHANGE_REQUEST: handleChangeUFSettingsRequest( message ); - break; - - case MSG_ID_USER_SALINE_BOLUS_REQUEST: - handleSalineBolusRequest( message ); break; + case MSG_ID_USER_SALINE_BOLUS_REQUEST: + handleSalineBolusRequest( message ); + break; + case MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE_REQUEST: handleChangeUFSettingsConfirmation( message ); break; @@ -1010,23 +1010,23 @@ case MSG_ID_FW_VERSIONS_REQUEST: handleFWVersionRequest( message ); - handleHDSerialNumberRequest(); - break; - - case MSG_ID_DG_VERSION_REPONSE: - handleDGVersionResponse( message ); - break; - - case MSG_ID_DG_HEATERS_DATA: - handleDGHeatersData( message ); + handleHDSerialNumberRequest(); break; + case MSG_ID_DG_VERSION_REPONSE: + handleDGVersionResponse( message ); + break; + + case MSG_ID_DG_HEATERS_DATA: + handleDGHeatersData( message ); + break; + case MSG_ID_DG_TEMPERATURE_DATA: handleDGTemperatureData( message ); break; - case MSG_ID_DG_FLOW_SENSORS_DATA: - handleDialysateFlowData( message ); + case MSG_ID_DG_FLOW_SENSORS_DATA: + handleDialysateFlowData( message ); break; case MSG_ID_DG_OP_MODE_DATA: @@ -1209,6 +1209,12 @@ handleReceiveROPermeateSampleReadyToDispenseFromDG( message ); break; + case MSG_ID_HD_SET_ENTER_BOOTLOADER: + case MSG_ID_HD_ENTER_BOOTLOADER_NOW: + case MSG_ID_HD_REBOOT_NOW: + handleRebootNowRequest( message ); + break; + case MSG_ID_UI_INSTITUTIONAL_RECORD_REQUEST: handleSendInstitutionalRecordToUI( message ); break; @@ -1224,7 +1230,7 @@ default: // Un-recognized or un-handled message ID received - ignore - break; + break; } // Handle any test messages if tester has logged in successfully @@ -1274,12 +1280,12 @@ case MSG_ID_BLOOD_FLOW_SEND_INTERVAL_OVERRIDE: handleTestBloodFlowBroadcastIntervalOverrideRequest( message ); - break; - - case MSG_ID_TREATMENT_TIME_REMAINING_OVERRIDE: - handleTestTreatmentTimeRemainingOverrideRequest( message ); break; + case MSG_ID_TREATMENT_TIME_REMAINING_OVERRIDE: + handleTestTreatmentTimeRemainingOverrideRequest( message ); + break; + case MSG_ID_BLOOD_PUMP_MEAS_SPEED_OVERRIDE: handleTestBloodPumpMeasuredSpeedOverrideRequest( message ); break; @@ -1847,7 +1853,7 @@ // The default cannot be reached in VectorCAST since the cases are run in a for loop default: // Unrecognized message ID received - ignore - break; + break; } } } Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r8cf0fafa78ce14b5dbdf95510e957846660ac2b9 -r4c26b49a73736fa697bf7565dd7685c4e1cd599a --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 8cf0fafa78ce14b5dbdf95510e957846660ac2b9) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 4c26b49a73736fa697bf7565dd7685c4e1cd599a) @@ -46,7 +46,7 @@ #include "Valves.h" #include "WatchdogMgmt.h" #include "HDDefs.h" -#include "TaskPriority.h" +#include "TaskPriority.h" /** * @addtogroup SystemCommMessages @@ -8579,6 +8579,30 @@ /*********************************************************************//** * @brief + * The handleSetBootloaderRequest function handles a + * request to set the flag to trigger update mode + * after a reboot. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleSetBootloaderRequest( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( 0 == message->hdr.payloadLen ) + { + result = setBootloaderFlag(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief * The handleTestHDDialinCheckIn function handles check in from Dialin. * @details Inputs: none * @details Outputs: message handled @@ -8683,6 +8707,28 @@ } /*********************************************************************//** + * The handleEnterBootloaderNowRequest function handles a + * request immediately jump to the bootloader application. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleEnterBootloaderNowRequest( MESSAGE_T *message ) +{ + BOOL result = (0 == message->hdr.payloadLen); + + // respond to request immediately with whether it was formatted correctly + sendTestAckResponseMsg((MSG_ID_T)message->hdr.msgID, result); + + if (result) + { + // Jump to the bootloader, there is no coming back from this. + startBootloader(); + } +} + +/*********************************************************************//** * @brief * The handleTestHDPendingACKOverrideRequest function handles a * request to override pending ACKs. @@ -8747,6 +8793,30 @@ } /*********************************************************************//** + * @brief + * The handleRebootNowRequest function handles a + * request to reboot the system. A software reset will cause the bootloader + * to stay active. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleRebootNowRequest( MESSAGE_T *message ) +{ + BOOL result = (0 == message->hdr.payloadLen); + + // respond to request immediately with whether it was formatted correctly + sendTestAckResponseMsg((MSG_ID_T)message->hdr.msgID, result); + + if (result) + { + // Trigger a software reset. + systemREG1->SYSECR = (0x2) << 14; + } +} + +/*********************************************************************//** * @brief * The handleGetHDInstitutionalRecord function handles a request to get the HD * institutional record. Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r8cf0fafa78ce14b5dbdf95510e957846660ac2b9 -r4c26b49a73736fa697bf7565dd7685c4e1cd599a --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 8cf0fafa78ce14b5dbdf95510e957846660ac2b9) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 4c26b49a73736fa697bf7565dd7685c4e1cd599a) @@ -14,11 +14,11 @@ * @date (original) 05-Nov-2019 * ***************************************************************************/ - -#ifndef __SYSTEM_COMM_MESSAGES_H__ -#define __SYSTEM_COMM_MESSAGES_H__ -#include "AirPump.h" +#ifndef __SYSTEM_COMM_MESSAGES_H__ +#define __SYSTEM_COMM_MESSAGES_H__ + +#include "AirPump.h" #include "AirTrap.h" #include "BloodFlow.h" #include "BloodLeak.h" @@ -27,13 +27,13 @@ #include "CommBuffers.h" #include "DGInterface.h" #include "DialInFlow.h" -#include "DialOutFlow.h" +#include "DialOutFlow.h" #include "Dialysis.h" -#include "Fans.h" +#include "Fans.h" #include "FluidLeak.h" #include "HDCommon.h" #include "MessageSupport.h" -#include "ModeInitPOST.h" +#include "ModeInitPOST.h" #include "ModePostTreat.h" #include "ModePreTreat.h" #include "ModeStandby.h" @@ -49,7 +49,7 @@ #include "Temperatures.h" #include "Valves.h" #include "Voltages.h" - + /** * @defgroup SystemCommMessages SystemCommMessages * @brief The system communication messages module provides helper functions @@ -62,7 +62,7 @@ // ********** public definitions ********** #define ACK_REQUIRED TRUE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. -#define ACK_NOT_REQUIRED FALSE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. +#define ACK_NOT_REQUIRED FALSE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. #pragma pack(push, 1) /// Payload record structure for ACK response. @@ -136,22 +136,22 @@ U32 minDialRate; ///< Minimum dialysate flow rate (in mL/min) U32 maxDialRate; ///< Maximum dialysate flow rate (in mL/min) } TREATMENT_PARAM_BROADCAST_PAYLOAD_T; - -// ********** public function prototypes ********** -// Serialize message +// ********** public function prototypes ********** + +// Serialize message U32 serializeMessage( MESSAGE_T msg, COMM_BUFFER_T buffer, BOOL ackReq ); -// ACK MSG +// ACK MSG BOOL sendACKMsg( MESSAGE_T *message ); -// MSG_ID_DG_CHECK_IN -void handleDGCheckIn( MESSAGE_T *message ); - -// MSG_ID_UI_CHECK_IN -void handleUICheckIn( MESSAGE_T *message ); - -// MSG_ID_REQUEST_FW_VERSIONS +// MSG_ID_DG_CHECK_IN +void handleDGCheckIn( MESSAGE_T *message ); + +// MSG_ID_UI_CHECK_IN +void handleUICheckIn( MESSAGE_T *message ); + +// MSG_ID_REQUEST_FW_VERSIONS void handleFWVersionRequest( MESSAGE_T *message ); // MSG_ID_REQUEST_FW_VERSIONS @@ -170,8 +170,8 @@ void handleHDServiceScheduleRequest( MESSAGE_T *message ); // MSG_ID_REQUEST_HD_USAGE_INFO -void handleHDUsageInfoRequest( MESSAGE_T *message ); - +void handleHDUsageInfoRequest( MESSAGE_T *message ); + // MSG_ID_DG_VERSION void handleDGVersionResponse( MESSAGE_T *message ); @@ -181,16 +181,16 @@ // MSG_ID_HD_EVENT BOOL sendEvent( HD_EVENT_ID_T event, EVENT_DATA_T dat1, EVENT_DATA_T dat2 ); -// MSG_ID_OFF_BUTTON_PRESS -BOOL sendOffButtonMsgToUI( U08 cmd ); -void handleOffButtonConfirmMsgFromUI( MESSAGE_T *message ); +// MSG_ID_OFF_BUTTON_PRESS +BOOL sendOffButtonMsgToUI( U08 cmd ); +void handleOffButtonConfirmMsgFromUI( MESSAGE_T *message ); // MSG_ID_ALARM_TRIGGERED void handleAlarmTriggered( MESSAGE_T *message ); // MSG_ID_ALARM_CLEARED void handleAlarmCleared( MESSAGE_T *message ); - + // MSG_ID_USER_REQUEST_ALARM_SILENCE void handleUIAlarmSilenceRequest( MESSAGE_T *message ); @@ -212,7 +212,7 @@ // MSG_ID_UI_POST_FINAL_TEST_RESULT void handleUIPOSTFinalResult( MESSAGE_T *message ); -// MSG_ID_LOAD_CELL_READINGS +// MSG_ID_LOAD_CELL_READINGS void handleLoadCellReadingsFromDG( MESSAGE_T *message ); // MSG_ID_DG_HEATERS_DATA @@ -237,8 +237,8 @@ void handleTreatmentParametersFromUI( MESSAGE_T *message ); // MSG_ID_HD_NEW_TREATMENT_PARAMS_RESPONSE -BOOL sendTreatmentParametersResponseMsg( BOOL accepted, U08 *rejectReasons, U32 byteLength ); - +BOOL sendTreatmentParametersResponseMsg( BOOL accepted, U08 *rejectReasons, U32 byteLength ); + // MSG_ID_UI_SET_UF_VOLUME_PARAMETER void handleUFVolumeSetRequest( MESSAGE_T *message ); @@ -248,40 +248,40 @@ // MSG_ID_UI_USER_CONFIRM_TREATMENT_PARAMS void handleUIUserConfirmTreatmentParameters( MESSAGE_T *message ); -// MSG_ID_USER_UF_PAUSE_RESUME_REQUEST -void handleUFPauseResumeRequest( MESSAGE_T *message ); +// MSG_ID_USER_UF_PAUSE_RESUME_REQUEST +void handleUFPauseResumeRequest( MESSAGE_T *message ); -// MSG_ID_USER_UF_PAUSE_RESUME_RESPONSE +// MSG_ID_USER_UF_PAUSE_RESUME_RESPONSE BOOL sendUFPauseResumeResponse( BOOL accepted, U32 reason, U32 ufState ); -// MSG_ID_USER_UF_SETTINGS_CHANGE_REQUEST -void handleChangeUFSettingsRequest( MESSAGE_T *message ); - -// MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE -BOOL sendChangeUFSettingsResponse( BOOL accepted, U32 reason, F32 volume_mL, U32 time_min, F32 ufRate_mL_min, S32 timeDiff, F32 rateDiff, F32 oldUFRate_mL_min ); - -// MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE -void handleChangeUFSettingsConfirmation( MESSAGE_T *message ); - -// MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE -BOOL sendChangeUFSettingsOptionResponse( BOOL accepted, U32 reason, F32 volume_mL, U32 time_min, F32 ufRate_mL_min ); - -// MSG_ID_USER_TREATMENT_TIME_CHANGE_REQUEST -void handleChangeTreatmentDurationRequest( MESSAGE_T *message ); - -// MSG_ID_USER_TREATMENT_TIME_CHANGE_RESPONSE -BOOL sendChangeTreatmentDurationResponse( BOOL accepted, U32 reason, U32 time_min, F32 volume_mL ); - +// MSG_ID_USER_UF_SETTINGS_CHANGE_REQUEST +void handleChangeUFSettingsRequest( MESSAGE_T *message ); + +// MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE +BOOL sendChangeUFSettingsResponse( BOOL accepted, U32 reason, F32 volume_mL, U32 time_min, F32 ufRate_mL_min, S32 timeDiff, F32 rateDiff, F32 oldUFRate_mL_min ); + +// MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE +void handleChangeUFSettingsConfirmation( MESSAGE_T *message ); + +// MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE +BOOL sendChangeUFSettingsOptionResponse( BOOL accepted, U32 reason, F32 volume_mL, U32 time_min, F32 ufRate_mL_min ); + +// MSG_ID_USER_TREATMENT_TIME_CHANGE_REQUEST +void handleChangeTreatmentDurationRequest( MESSAGE_T *message ); + +// MSG_ID_USER_TREATMENT_TIME_CHANGE_RESPONSE +BOOL sendChangeTreatmentDurationResponse( BOOL accepted, U32 reason, U32 time_min, F32 volume_mL ); + // MSG_ID_TREATMENT_TIME_REMAINING_OVERRIDE: void handleTestTreatmentTimeRemainingOverrideRequest( MESSAGE_T *message ); -// MSG_ID_TREATMENT_PARAM_CHANGE_RANGES -BOOL sendTreatmentParamsRangesToUI( U32 minTime, U32 maxTime, F32 minUFVol, F32 maxUFVol, U32 minDialRate, U32 maxDialRate ); +// MSG_ID_TREATMENT_PARAM_CHANGE_RANGES +BOOL sendTreatmentParamsRangesToUI( U32 minTime, U32 maxTime, F32 minUFVol, F32 maxUFVol, U32 minDialRate, U32 maxDialRate ); // MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA BOOL sendTreatmentPeriodicDataToUI( TREATMENT_LOG_DATA_PERIODIC_T * periodDataPtr ); -// MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_REQUEST +// MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_REQUEST void handleChangeBloodDialysateRateChangeRequest( MESSAGE_T *message ); // MSG_ID_USER_SALINE_BOLUS_REQUEST @@ -290,9 +290,9 @@ // MSG_ID_USER_SALINE_BOLUS_RESPONSE BOOL sendSalineBolusResponse( BOOL accepted, U32 rejReason, U32 bolusVol ); -// MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_RESPONSE -BOOL sendChangeBloodDialysateRateChangeResponse( BOOL accepted, U32 reason, U32 bloodRate, U32 dialRate ); - +// MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_RESPONSE +BOOL sendChangeBloodDialysateRateChangeResponse( BOOL accepted, U32 reason, U32 bloodRate, U32 dialRate ); + // MSG_ID_UI_PRESSURE_LIMITS_CHANGE_REQUEST void handleChangePressureLimitsRequest( MESSAGE_T *message ); @@ -427,37 +427,37 @@ // *********** public DG command functions ********** -// MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS -BOOL sendDialysateHeatingParamsToDG( DG_CMD_DIALYSATE_HEATING_PARAMS_T *params ); - -// MSG_ID_DG_SWITCH_RESERVOIR_CMD -BOOL sendDGSwitchReservoirCommand( DG_SWITCH_RSRVRS_CMD_T *cmd ); +// MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS +BOOL sendDialysateHeatingParamsToDG( DG_CMD_DIALYSATE_HEATING_PARAMS_T *params ); +// MSG_ID_DG_SWITCH_RESERVOIR_CMD +BOOL sendDGSwitchReservoirCommand( DG_SWITCH_RSRVRS_CMD_T *cmd ); + // MSG_ID_DG_CHANGE_VALVE_SETTING_CMD BOOL sendDGChangeValveSettingCommand( U32 valveSettingCmd ); - -// MSG_ID_DG_FILL_CMD -BOOL sendDGFillCommand( U32 cmd, U32 fillToVolumeMl, F32 targetFlowRateLPM ); - -// MSG_ID_DG_DRAIN_CMD -BOOL sendDGDrainCommand( DRAIN_RESERVOIR_CMD_PAYLOAD_T *drainCmdPtr ); - -// MSG_ID_STARTING_STOPPING_TREATMENT_CMD -BOOL sendDGStartStopCommand( BOOL start ); - -// MSG_ID_DG_START_STOP_TRIMMER_HEATER_CMD -BOOL sendDGStartStopTrimmerHeaterCommand( BOOL start ); - -// MSG_ID_DG_SAMPLE_WATER_CMD -BOOL sendDGSampleWaterCommand( SAMPLE_WATER_CMD_T cmd ); +// MSG_ID_DG_FILL_CMD +BOOL sendDGFillCommand( U32 cmd, U32 fillToVolumeMl, F32 targetFlowRateLPM ); + +// MSG_ID_DG_DRAIN_CMD +BOOL sendDGDrainCommand( DRAIN_RESERVOIR_CMD_PAYLOAD_T *drainCmdPtr ); + +// MSG_ID_STARTING_STOPPING_TREATMENT_CMD +BOOL sendDGStartStopCommand( BOOL start ); + +// MSG_ID_DG_START_STOP_TRIMMER_HEATER_CMD +BOOL sendDGStartStopTrimmerHeaterCommand( BOOL start ); + +// MSG_ID_DG_SAMPLE_WATER_CMD +BOOL sendDGSampleWaterCommand( SAMPLE_WATER_CMD_T cmd ); + // MSG_ID_DG_COMMAND_RESPONSE void handleDGCmdResp( MESSAGE_T *messagePtr ); // MSG_ID_UI_HD_SET_RTC_REQUEST: void handleUIClockSyncRequest( MESSAGE_T *message ); - -// MSG_ID_DG_OP_MODE + +// MSG_ID_DG_OP_MODE void handleDGOpMode( MESSAGE_T *message ); // MSG_ID_DG_START_STOP_FLUSH @@ -484,7 +484,7 @@ // MSG_ID_UI_REQUEST_SERVICE_MODE void handleUIServiceModeRequest( MESSAGE_T *message ); -// MSG_ID_ALARM_STATUS +// MSG_ID_ALARM_STATUS BOOL broadcastAlarmStatus( COMP_ALARM_STATUS_T almStatus ); // MSG_ID_HD_SEND_CALIBRATION_RECORD @@ -601,22 +601,22 @@ // MSG_ID_DIALYSATE_INLET_PUMP_ROTOR_COUNT_OVERRIDE void handleHDDialInPumpRotorCountOverrideRequest( MESSAGE_T *message ); -// MSG_ID_BLOOD_PUMP_MC_MEAS_SPEED_OVERRIDE -void handleTestBloodPumpMCMeasuredSpeedOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_BLOOD_PUMP_MC_MEAS_CURR_OVERRIDE -void handleTestBloodPumpMCMeasuredCurrentOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_BLOOD_FLOW_SEND_INTERVAL_OVERRIDE -void handleTestBloodFlowBroadcastIntervalOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_BLOOD_PUMP_MEAS_SPEED_OVERRIDE -void handleTestBloodPumpMeasuredSpeedOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_BLOOD_PUMP_MEAS_ROTOR_SPEED_OVERRIDE -void handleTestBloodPumpRotorMeasuredSpeedOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_DIAL_IN_FLOW_SET_PT_OVERRIDE +// MSG_ID_BLOOD_PUMP_MC_MEAS_SPEED_OVERRIDE +void handleTestBloodPumpMCMeasuredSpeedOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_BLOOD_PUMP_MC_MEAS_CURR_OVERRIDE +void handleTestBloodPumpMCMeasuredCurrentOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_BLOOD_FLOW_SEND_INTERVAL_OVERRIDE +void handleTestBloodFlowBroadcastIntervalOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_BLOOD_PUMP_MEAS_SPEED_OVERRIDE +void handleTestBloodPumpMeasuredSpeedOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_BLOOD_PUMP_MEAS_ROTOR_SPEED_OVERRIDE +void handleTestBloodPumpRotorMeasuredSpeedOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_DIAL_IN_FLOW_SET_PT_OVERRIDE void handleTestDialInFlowSetPointOverrideRequest( MESSAGE_T *message ); // MSG_ID_DIAL_OUT_FLOW_SET_PT_OVERRIDE @@ -994,6 +994,15 @@ // MSG_ID_HD_BLOOD_PUMP_HARD_STOP void handleBloodPumpHardStopRequest( MESSAGE_T *message ); +// MSG_ID_HD_SET_ENTER_BOOTLOADER +void handleSetBootloaderRequest( MESSAGE_T *message ); + +// MSG_ID_HD_ENTER_BOOTLOADER_NOW +void handleEnterBootloaderNowRequest( MESSAGE_T *message ); + +// MSG_ID_HD_REBOOT_NOW +void handleRebootNowRequest( MESSAGE_T *message ); + // MSG_ID_HD_ENABLE_VENOUS_BUBBLE_ALARM_DETECTION void handleEnableVenousBubbleAlarmDetectionRequest( MESSAGE_T *message ); @@ -1021,6 +1030,11 @@ // MSG_ID_HD_RECIRULATION_PCT_OVERRIDE void handleTestHDRecirulationPctOverrideRequest( MESSAGE_T* message ); +// MSG_ID_FW_SET_ENTER_BOOTLOADER +// MSG_ID_FW_ENTER_BOOTLOADER_NOW +// MSG_ID_FW_REBOOT_NOW +void handleRebootNowRequest( MESSAGE_T *message ); + // MSG_ID_HD_GET_INSTITUTIONAL_RECORD void handleGetHDInstitutionalRecord( MESSAGE_T *message ); @@ -1032,4 +1046,4 @@ /**@}*/ -#endif +#endif Index: firmware/source/sys_link.cmd =================================================================== diff -u -r1a178aef78168ee358e1326f4fb1daf81df83c17 -r4c26b49a73736fa697bf7565dd7685c4e1cd599a --- firmware/source/sys_link.cmd (.../sys_link.cmd) (revision 1a178aef78168ee358e1326f4fb1daf81df83c17) +++ firmware/source/sys_link.cmd (.../sys_link.cmd) (revision 4c26b49a73736fa697bf7565dd7685c4e1cd599a) @@ -1,36 +1,36 @@ /*----------------------------------------------------------------------------*/ /* sys_link.cmd */ /* */ -/* -* Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com -* -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions +/* +* Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com +* +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions * are met: * -* Redistributions of source code must retain the above copyright +* Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ @@ -67,12 +67,11 @@ #if 1 MEMORY { - VECTORS (X) : origin=0x00000000 length=0x00000020 - CRCMEM (RX) : origin=0x00000020 length=0x000001E0 - FLASH0 (RX) : origin=0x00000200 length=0x0013FE00 - STACKS (RW) : origin=0x08000000 length=0x00003400 - RAM (RW) : origin=0x08003400 length=0x0002cc00 - + VECTORS (X) : origin=0x00010020 length=0x00000020 + CRCMEM (RX) : origin=0x00010040 length=0x000001E0 + FLASH0 (RX) : origin=0x00010220 length=0x0012FE00 + STACKS (RW) : origin=0x08000000 length=0x00004c00 + RAM (RW) : origin=0x08004c00 length=0x0002b400 #endif /* USER CODE END */ } @@ -88,26 +87,26 @@ SECTIONS { .intvecs : {} > VECTORS - .text : {} > FLASH0 - .const : {} > FLASH0 - .cinit : {} > FLASH0 - .pinit : {} > FLASH0 + .text : {} > FLASH0 + .const : {} > FLASH0 + .cinit : {} > FLASH0 + .pinit : {} > FLASH0 .bss : {} > RAM .data : {} > RAM .sysmem : {} > RAM - + /* USER CODE BEGIN (4) */ #endif /* Override Sections with CRCs here */ #if 1 SECTIONS { .intvecs : {} > VECTORS, crc_table( _crc_table, algorithm=CRC32_C ) - .text : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) - .const : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) - .cinit : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) - .pinit : {} > FLASH0 + .text align(64) : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) + .const align(64) : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) + .cinit align(64) : {} > FLASH0, crc_table( _crc_table, algorithm=CRC32_C ) + .pinit align(64) : {} > FLASH0 .bss : {} > RAM .data : {} > RAM .sysmem : {} > RAM