Other Parts Discussed in Thread: HALCOGEN
I am generating the drivers from HALCoGen for a simple DCAN_TX project. The following is my code:
/* USER CODE BEGIN (0) */ /* USER CODE END */ /* Include Files */ #include "HL_sys_common.h" /* USER CODE BEGIN (1) */ #include "HL_can.h" /* USER CODE END */ /** @fn void main(void) * @brief Application main function * @note This function is empty by default. * * This function is called after startup. * The user can use this function to implement the application. */ /* USER CODE BEGIN (2) */ #define D_SIZE 9 uint8_t tx_data[D_SIZE] = {'H','E','R','C','U','L','E','S','\0'}; uint32_t checkPackets(uint8_t *src_packet, uint8_t *dst_packet, uint32_t psize); /* USER CODE END */ int main(void) { /* USER CODE BEGIN (3) */ canInit(); canTransmit(canREG1, CANMESSAGE_BOX1, tx_data); while(1); /* USER CODE END */ return 0; } /* USER CODE BEGIN (4) */ uint32_t checkPackets(uint8_t *src_packet, uint8_t *dst_packet, uint32_t psize){ uint32_t err=0; uint32_t cnt=psize; while(cnt--){ if((*src_packet++) != (*dst_packet++)) err++; } return (err); } void canMessageNotification(canBASE_t *node, uint32_t messageBox) { return; } void canErrorNotification(canBASE_t *node, uint32_t notification) { return; } void esmGroup1Notification(unsigned channel) { return; } void esmGroup2Notification(unsigned channel) { return; } /* USER CODE END */
I am getting the following error:
#1965 cannot open source file "stdint.h"
which is included in the HL_hal_stdtypes.h file.