I made a simple CAN_TX code where I am transmitting "HERCULES" through CAN4 through message box 1, but I am unable to compile my code and having the following errors:
Description Resource Path Location Type
gmake: Target 'all' not remade because of errors. DCAN_TX C/C++ Problem
gmake: *** [source/HL_system.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_vim.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_startup.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_pmm.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_phantom.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_pcr.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_main.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_sys_dma.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_pinmux.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_notification.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_nmpu.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_esm.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_errata.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_epc.obj] Error 1 DCAN_TX C/C++ Problem
gmake: *** [source/HL_can.obj] Error 1 DCAN_TX C/C++ Problem
#66 expected a ";" .ccsproject /DCAN_TX line 49, external location: C:\ti\ccsv6\tools\compiler\arp32_1.0.8\include\_lock.h C/C++ Problem
#66 expected a ";" .ccsproject /DCAN_TX line 50, external location: C:\ti\ccsv6\tools\compiler\arp32_1.0.8\include\_lock.h C/C++ Problem
#262-D explicit type is missing ("int" assumed) .ccsproject /DCAN_TX line 49, external location: C:\ti\ccsv6\tools\compiler\arp32_1.0.8\include\_lock.h C/C++ Problem
#262-D explicit type is missing ("int" assumed) .ccsproject /DCAN_TX line 50, external location: C:\ti\ccsv6\tools\compiler\arp32_1.0.8\include\_lock.h C/C++ Problem
#112-D statement is unreachable HL_sys_main.c /DCAN_TX/source line 81 C/C++ Problem
and the following is my main 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(canREG4, 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 */