TI E2E Community
AM335xEVM example project won’t build and run in CCSv5 with TMS470 compiler
I’m using CCSv5 (version 5.1.0.09000) with the TMS470 compiler and I can’t get a simple project (eg. buzzerBeep) to build and run with on the EVM board with a Blackhawk USB560 JTAG emulator. I installed the tools on my Windows 7 64-bit machine using the SPRC932A install DVD.
I can successfully import and compile the buzzerBeep project as shown below, but there are errors with the post-build, namely because no directory tiobj2bin was installed by the DVD installer in the utils. Therefore there is no tiojb2bin.bat or mkhex4bin.exe on my hard drive.
Then I unsuccessfully tried to load the buzzerBeep.out into the debugger. Is the problem due to these missing utilities? If so, how can I get these missing files installed?
**** Build of configuration Debug for project buzzerBeep ****
C:\ti\ccsv5\utils\bin\gmake -k all
'Building file: C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c'
'Invoking: TMS470 Compiler'
"C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv7A8 -g --include_path="C:/ti/ccsv5/tools/compiler/tms470/include" --include_path="../../../../../../../include" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv7a/am335x" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="buzzerBeep.pp" "C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c"
'Finished building: C:/ti/AM335X_StarterWare_02_00_00_05/examples/evmAM335x/audio_buzzer/buzzerBeep.c'
'Building target: ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out'
'Invoking: TMS470 Linker'
"C:/ti/ccsv5/tools/compiler/tms470/bin/cl470" -mv7A8 -g --diag_warning=225 -me --abi=eabi --code_state=32 -z -m"buzzerBeep.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/tms470/lib" -i"C:/ti/ccsv5/tools/compiler/tms470/include" --reread_libs --ram_model -o "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out" "./buzzerBeep.obj" -l"libc.a" -l../buzzerBeep.cmd
'Finished building target: ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out'
C:/ti/ccsv5/utils/bin/gmake --no-print-directory post-build
"C:/ti/ccsv5/utils/tiobj2bin/tiobj2bin.bat" "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.out" "../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/audio_buzzer/buzzerBeep.bin" "C:/ti/ccsv5/tools/compiler/tms470/bin/ofd470.exe" "C:/ti/ccsv5/tools/compiler/tms470/bin/hex470.exe" "C:/ti/ccsv5/utils/tiobj2bin/mkhex4bin.exe"
The system cannot find the path specified.
gmake: [post-build] Error 1 (ignored)
**** Build Finished ****
I tried a different EVM board with the same Blackhawk debugger, and now everything is functioning properly.
I still don't understand why the original EVM board works just fine if I run the app from an SD card, copying it into DDR memory. and executing it from there.
How are the EVM boards different? Do they have different profile settings?
in the problematic evm,
Can you take the dump of EMIF registers (0x4C00_0000) and compare them in the following 2 scenarios.
1. boot the application with bootloader -> connect target with CCS -> get register dump
2. Conmnect target with CCS -> load gel file -> get register dump
Note: If this post answers your question, please click the Verify Answer button below. Thank you!
I did as Baskaran asked, and found that there are indeed differences. I changed the GEL file to match the register settings from the bootloader, and I am now able to debug applications stored in external DDR. The settings I changed in the GEL file were for DDR termination and DDR_PHY read latency.
Original GEL file values:
(line 802) #define OPP100_DDR2_READ_LATENCY 0x04 //CL=4 Max=(CL+7)-1 ie.11-1=10 Min=(CL+1)-1 ie.5-1=4 (line 807) #define OPP100_DDR2_SDRAM_CONFIG 0x40805332 //no ODT on DDR2 side
New GEL file values:
(line 802) #define OPP100_DDR2_READ_LATENCY 0x05 //CL=4 Max=(CL+7)-1 ie.11-1=10 Min=(CL+1)-1 ie.5-1=4 (line 807) #define OPP100_DDR2_SDRAM_CONFIG 0x43805332 //no ODT on DDR2 side
I made the same GEL file DDR setting changes that JayWhy suggested and now I can successfully use the debugger with both EVM boards.
This is awesome!
Thanks for you help.
Thanks for the update. Can you share the updated gel file, so that we can evaluate and if needed include the changes in the next release.
I had a similar behavior while step-debugging. I found that at one point, the T bit of the CPSR register was switched to 1 when the initial task of the OS is called. This causes the CPU to interpret the ARM instructions in Thumb. Since this doesn't make sense, the PC quickly jumps to unmapped memory locations and finally ends up at 0002008c: EAFFFFFE B 0x2008C.
I haven't been able to explain why the T bit of CPSR is set un the first place but I suspect that it requires Supervisor privileges to do the context switch and the CPU is already in user mode at this point.
Would anynone know how to prevent the CPU to go in User Mode in the _c_int0 boot code? I would like to stay in supervisor until my OS has started.
Same issue. Hardware and toolchain:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.