Other Parts Discussed in Thread: C2000WARE
Tool/software:

Figure 1

Figure 2
Hello expert, as soon as I add line 948, an error occurs, as shown in Figure 1. Do you know why?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:

Figure 1

Figure 2
Hello expert, as soon as I add line 948, an error occurs, as shown in Figure 1. Do you know why?
Hi Nie,
Without seeing the entire error message, I wouldn't know for sure, but is 'rData' and 'rTdata' defined as a local or global variable in this file before being called in the ISR? Is it defined in another file? Are the proper .h files included in the main.c?
Best Regards,
Aishwarya
>>Thank you very much for your reply.

Figure 1

Figure 2

Figure 3


Figure 4

Figure 5
<<<
**** Build of configuration FLASH for project F28P65x_PCS125_test_cpu2 ****
"C:\\ti\\ccs1250\\ccs\\utils\\bin\\gmake" -k -j 4 all -O
Building file: "../oscilco.c"
Invoking: C2000 Compiler
"C:/ti/ccs1250/ccs/tools/compiler/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu1 --vcu_support=vcrc -Ooff --fp_mode=relaxed --include_path="C:/ti/c2000/C2000Ware_5_01_00_00/device_support/f28p65x/headers/include" --include_path="D:/125KWshangweij/F28P65x_PCS125_test_cpu2" --include_path="C:/ti/c2000/C2000Ware_5_01_00_00" --include_path="C:/ti/ccs1250/ccs/tools/compiler/include" --include_path="D:/125KWshangweij/F28P65x_PCS125_test_multi/bsp" --advice:performance=all --define=DEBUG --define=CPU2 --define=_FLASH --define=generic_flash_lnk --define=_DUAL_HEADERS --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="oscilco.d_raw" --include_path="D:/125KWshangweij/F28P65x_PCS125_test_cpu2/FLASH/syscfg" --cmd_file="syscfg/board.opt" --cmd_file="syscfg/device_cmd.opt" --cmd_file="syscfg/c2000ware_libraries.opt" "../oscilco.c"
"../oscilco.c", line 7262: warning #225-D: function "SlowFault_EnableGet" declared implicitly
"../oscilco.c", line 12285: warning #994-D: missing return statement at end of non-void function "Hold_Regiaddress"
"../oscilco.c", line 12295: warning #552-D: variable "reg_cnt" was set but never used
"../oscilco.c", line 12350: warning #552-D: variable "crcdata" was set but never used
"../oscilco.c", line 12350: warning #552-D: variable "crcdatb" was set but never used
Finished building: "../oscilco.c"
Building target: "F28P65x_PCS125_test_cpu2.out"
Invoking: C2000 Linker
"C:/ti/ccs1250/ccs/tools/compiler/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu1 --vcu_support=vcrc -Ooff --fp_mode=relaxed --advice:performance=all --define=DEBUG --define=CPU2 --define=_FLASH --define=generic_flash_lnk --define=_DUAL_HEADERS --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"F28P65x_PCS125_test_cpu2.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"C:/ti/ccs1250/ccs/tools/compiler/lib" -i"C:/ti/c2000/C2000Ware_5_01_00_00" -i"D:/125KWshangweij/F28P65x_PCS125_test_cpu2/FLASH/syscfg" -i"C:/ti/ccs1250/ccs/tools/compiler/include" --reread_libs --define=_FLASH --define=generic_flash_lnk --define=CPU2 --diag_wrap=off --display_error_number --xml_link_info="F28P65x_PCS125_test_cpu2_linkInfo.xml" --entry_point=code_start --rom_model -o "F28P65x_PCS125_test_cpu2.out" "./CANC.obj" "./syscfg/board.obj" "./syscfg/device.obj" "./syscfg/device_cmd.obj" "./syscfg/c2000ware_libraries.obj" "./f28p65x_codestartbranch.obj" "./HistoryRecord.obj" "./Interactivecode.obj" "./MCANC .obj" "./MODOUBUS_SLAVE.obj" "./MYSCI_FRAM .obj" "./flash_25Q.obj" "./fram_MB85.obj" "./main.obj" "./oscilco.obj" "./rtc_8025.obj" "./bsp/Actuate.obj" "./bsp/Ain.obj" "./bsp/Fault.obj" "./bsp/Share.obj" "./bsp/f28p65x_globalvariabledefs.obj" "D:/125KWshangweij/F28P65x_PCS125_test_multi/bsp/f28p65x_headers_nonBIOS.cmd" -l"syscfg/device_cmd.cmd" -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -llibc.a
<Linking>
undefined first referenced
symbol in file
--------- ----------------
__c28xabi_ftoull ./oscilco.obj
__c28xabi_ulltof ./oscilco.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "F28P65x_PCS125_test_cpu2.out" not built
>> Compilation failure
makefile:159: recipe for target 'F28P65x_PCS125_test_cpu2.out' failed
makefile:155: recipe for target 'all' failed
gmake[1]: *** [F28P65x_PCS125_test_cpu2.out] Error 1
gmake: *** [all] Error 2
**** Build Finished ****
>>This is the compilation information
1. Figure 5 shows a compilation error, while Figure 4 shows a correct compilation
2.I debugged for a long time and found that it was these two functions that caused this error. (splitHold_Write, splitHold_Read) These two functions occupy a very large amount of memory. Specify the positions of these two functions as shown in Figure 3. May I ask if there are any good solutions
Nie,
Similar to figure 3, did you create a code section for 'splitHold_Read'? I don't see it in screenshots. Are both updated in your linker command file?
The error messages point to unresolved symbols related to floating-point to integer conversions. Are you including all the necessary libraries as well as modify compiler settings to include "--float_support=fpu32", for example?
In terms of enhancements, it possible to optimize these functions further to reduce memory usage? Could you allocate more memory overall in the linker command file?
Best Regards,
Aishwarya
Hello, thank you very much for your reply. I have found the cause of the error. Since my project only supports fpu32 and not fpu64, there is a 64-bit variable. I converted this 64-bit variable to a floating-point type and masked it, so no error was reported. 1.I still have a question now. Because I have a large function executed in the ADC interrupt, the ADC interrupt time is 66.us. The main function of this large function is the switch statement. There are 7,000 case situations in the switch. I want to know how long it will take to find the target case for this switch? Do you know how to calculate?
2. I designed a function by myself as shown in Figure 1. I don't know how to calculate the time?

Figure 1
Hi Nie,
Aishwarya is out of office. Please expect a delay in response until next week when she returns.
Best Regards,
Delaney
Nie,
Apologies for the delay as I've been out of office. You can refer to these links:
Profiling — C2000 C28x Optimization Guide
How to change ISR interrupt frequency?
increase code speed for execution
Ultimately, 7000 cases is a lot, and you should look into reducing that number. There should be a way to combine cases, such as some sort of if statement. You can also look into using different optimization levels (default is -O0), change the clock speed, etc, but with 7000 cases, this is probably not going to help performance that much. More information found in the C28x Optimization Guide and other E2Es as well.
Best Regards,
Aishwarya
Nie,
Checking in to see if the issue was resolved and/or you had any other questions.
Best Regards,
Aishwarya