Other Parts Discussed in Thread: C2000WARE
We designed a custom motor driver board based on the TMS320F2879D. During our last production cycle there was a parts shortage and needed to substitute the TMS320F2879S processor instead (We were only ever using a singe core on the 379D).
As part of the development effort I used the F2837xD_usb_flash_kernel example as a basis for implementing boot loader to update the application that is flashed in the device. When I went to follow the same steps but starting from the examples found under the /device_support/f2837xs tree I noticed that the example was removed in the f287xs tree (all of the examples from the /device_support/f2837xd/examples/dual directory were).
As a result, I am attempting to create my own 'F2837xS_usb_flash_kernel' example and need to confirm that I approached it correctly (or should I just be building against the F2837xd files using it on the single core)
The steps I took were:
- Made a copy of F2837xD_usb_flash_kernel_cpu01
- Changed all of the Linked Resources to point to the corresponding files in the f2837xs directories.
- Deleted F2837xD_Ipc.c and F2837xD_Ipc_Driver_Util.c (Don't exist in the f2837xs tree).
- Removed the DUAL build configuration (just using CPU1_RAM configuration).
- Modified c1_bootrom.h to:
// #include "F2837xD_device.h"
#include "F2837xS_device.h"
- Modified USB_Boot.c to:
//#include "F2837xD_Gpio_defines.h" #include "F2837xS_Gpio_defines.h"
- Modified Shared_Boot.c to:
//#include "F021_F2837xD_C28x.h" #include "F021_F2837xS_C28x.h"
- Modified Fapi_UserDefinedFunctions.c
//#include "F021_F2837xD_C28x.h" #include "F021_F2837xS_C28x.h"
- Made the following changes to F2837xD_usb_flash_kernels_cpu01.c
71c71 < #include "F2837xD_Ipc_drivers.h" --- > //#include "F2837xD_Ipc_drivers.h" 75,76c75,76 < #include "F021_F2837xD_C28x.h" < --- > //#include "F021_F2837xD_C28x.h" > #include "F021_F2837xS_C28x.h" 144c144,145 < InitFlash(); --- > //InitFlash(); > InitFlash_Bank0(); 152c153,154 < SeizeFlashPump(); --- > //SeizeFlashPump(); > SeizeFlashPump_Bank0(); 249c251,254 < oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 150); --- > // BUG:? Is 150 (MHz correct here) CPU's clock rate is 200MHz unless example is > // changing the system clock rate to 150MHz elsewhere in the code. > //oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 150); > oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, 200);
When I compile I get a error linking.
Building target: "F2837xS_usb_flash_kernels_cpu01.out"
Invoking: C2000 Linker
"/Applications/ti/ccs1240/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --cla_support=cla1 --tmu_support=tmu0 --vcu_support=vcu2 -g --define=CPU1 --display_error_number --diag_suppress=10063 --diag_warning=225 -z -m"F2837xS_usb_flash_kernels_cpu01.map" --stack_size=0x100 --warn_sections -i"/Applications/ti/ccs1240/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/lib" -i"/Applications/ti/ccs1240/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" -i"/Applications/ti/c2000/C2000Ware_5_00_00_00/device_support/f2837xd/common/cmd" -i"/Applications/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f2837xd/lib" -i"/Applications/ti/c2000/C2000Ware_5_00_00_00/device_support/f2837xd/headers/cmd" --reread_libs --disable_auto_rts --display_error_number --xml_link_info="F2837xS_usb_flash_kernels_cpu01_linkInfo.xml" --entry_point=code_start --rom_model -o "F2837xS_usb_flash_kernels_cpu01.out" "./F2837xD_usb_flash_kernels_cpu01.obj" "./F2837xS_DefaultISR.obj" "./F2837xS_GlobalVariableDefs.obj" "./F2837xS_Gpio.obj" "./F2837xS_PieCtrl.obj" "./F2837xS_PieVect.obj" "./F2837xS_SysCtrl.obj" "./F2837xS_usDelay.obj" "./Fapi_UserDefinedFunctions.obj" "./Shared_Boot.obj" "./USB_Boot.obj" "./USB_Boot_Funcs.obj" "./USB_Structs.obj" "./fwupgradec1toc2_start.obj" "/Applications/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f2837xs/lib/F021_API_F2837xS_FPU32.lib" "../flash_programming_cpu1_RAM.cmd" -llibc.a -lF2837xD_Headers_nonBIOS_cpu1.cmd
<Linking>
error #10056: symbol "_Fapi_setupEepromSectorEnable" redefined: first defined
in "./Fapi_UserDefinedFunctions.obj"; redefined in
"/Applications/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f2837xs/lib
/F021_API_F2837xS_FPU32.lib<FlashStateMachine.obj>"
error #10056: symbol "_Fapi_setupBankSectorEnable" redefined: first defined in
"./Fapi_UserDefinedFunctions.obj"; redefined in
"/Applications/ti/c2000/C2000Ware_5_00_00_00/libraries/flash_api/f2837xs/lib
/F021_API_F2837xS_FPU32.lib<FlashStateMachine.obj>"
When I examined the F021_API_F2837xS_FPU.lib and F2837xD_FPU.lib it seems as if the single core version of the library includes these functions while the dual core does not. Is there a reason for this? Are the functions included in the single core of the library the same as the ones I see in local copy of Fapi_UserDefinedFunctions.c? or perhaps the symbols intentionally removed from the Dual Core flash library and added as a local function to address a bug?
My second question comes from the changes I had to make in F2837xD_usb_flash_kernels_cpu01.c. The changes that I had to make for the call InitFlash() and SeizeFlashPump() seem to trace back to differences between F2837xD_SysCtrl.c and F2837xS_SysCtrl.c. For some reason the single core processor has calls for both _Bank0() and _Bank1() for these functions while the dual core version only has calls for _Bank0() so they dropped the differentiation. I could see the reverse being true, but it seems as if both parts have the same flash configuration. Am I missing something?