cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Traveo II Automotive Body Controller - FAQ – IDE - KBA232509

ChaitanyaV_61
Employee

Traveo II Automotive Body Controller - FAQ – IDE - KBA232509

Home Page: Traveo II Automotive Body Controller - FAQ – CDC -... - Cypress Developer Community

5. IDE

 

5.1. How do I start building Traveo II IAR projects in the Sample Driver Library (SDL)?

Follow these steps to build Traveo II IAR projects in SDL:

  • Install SDL package. Copy the SDL files to a folder which you will use to run the project.
  • Check corresponding IAR version required by SDL in ..\TVII_Sample_Driver_Library_x.x.x\Readme.txt.
  • Follow the steps in ..\TVII_Sample_Driver_Library_x.x.x\misc\tools\iar\Readme_Patch.txt to install Traveo II flash loader patch for IAR.
  • Select and open an IAR workspace from  ..\TVII_Sample_Driver_Library_x.x.x\[Traveo II device series]\tools\iar\flash
  • Build the open project in IAR.
5.2. How do I change the MPN for the device under test in the SDL GHS project?

Check the supported devices and revisions mentioned in the Readme.txt file in SDL. Ensure that the device being tested is listed under supported devices and revisions for that SDL version. Choose the required MPN and revision.

In the GHS project, the tviixxx_common.gpj file contains the macro DEVICE=MPN. Update MPN with the  part number of the required device.

Example: For 1M device, update the DEVICE macro, in the tviibe1m_common.gpj file, to CYT2B78CAE .

To differentiate between the revisions of a device, there are tviixxx_rev_x_template.gpj files corresponding to each revision supported by the SDL, where x in tviixxx_rev_x_template.gpj denotes the revision.

Example: For 1M device, the templates available are tviibe1m_rev_b_template.gpj,  tviibe1m_rev_c_template.gpj, and tviibe1m_rev_d_template.gpj templates.

5.3. How can I perform operations on the device using Miniprog4 and Auto Flash Utility?

To perform operations on the device using Miniprog4 and Auto Flash Utility, make sure that:

  • The device is powered.
  • No other debug interfaces are active or connected.
  • Miniprog4 is connected to the board and PC.
  • Auto Flash Utility is installed.

Use the following commands to achieve desired objectives. Run the commands from the path C:\Program Files (x86)\Cypress\Cypress Auto Flash Utility 1.0.

These commands were tested with 8M device in CYTVII-B-H-8M-320-CPU-REVC EVK. These can be used with other families of devices (such as 1M, 2M, and so on.). Make appropriate changes to parameters like the cfg (traveo2_8m.cfg) file, sector index, flash addresses, and flash size.

Sample Commands:

            Erase All:

 bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;erase_all;shutdown"

 Erase WorkFlash with address:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_address 0x14000000 262144; shutdown"

Erase CodeFlash with address:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_address 0x10000000 8585216; shutdown"

Full chip erase with address:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_address 0x14000000 262144; flash erase_address 0x10000000 8585216; shutdown"

Erase WorkFlash with sector reference: (if both CodeFlash and WorkFlash are in single bank mode, bank - 0 indicates CodeFlash, bank –1 indicates WorkFlash)

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_sector 1 0 last; shutdown"

Erase CodeFlash with sector reference: (if both CodeFlaskh and WorkFlash are in single bank mode, bank - 0 indicates CodeFlash, bank -1 indicates WorkFlash)

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_sector 0 0 last; shutdown"

Full chip erase with sector reference:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;flash erase_sector 1 0 last; flash erase_sector 0 0 last; shutdown"

Read memory location WorkFlash:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;dump_image M:/dump_work.bin 0x14000000 262144; shutdown"

Read memory location CodeFlash:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;dump_image M:/dump_code.bin 0x10000000 8585216; shutdown"

Read memory location WorkFlash and CodeFlash:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "kitprog3 acquire_config on 3 0 1" -c "init;reset init;dump_image M:/dump_work.bin 0x14000000 262144; dump_image M:/dump_code.bin 0x10000000 8585216; shutdown"

Program CM0+ core:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "program c:/cm0plus.elf.srec verify reset; exit”

Program CM7 core:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "program c:/cm7_0.elf.srec verify reset; exit”

Program Device:

bin\openocd.exe -s scripts -f interface/kitprog3.cfg -f target/traveo2_8m.cfg -c "program c:/cm0plus.elf.srec verify" -c "program c:/cm7_0.elf.srec verify reset; exit"

5.4. Can I use MiniProg4 tool for debugging beside flashing and erasing?

Yes, with IAR Embedded Workbench as the IDE, you can use MiniProg4 for debugging along with flashing. In IAR, go to Project > Options > Debugger > Driver and select CMSIS-DAP. Select CMSIS-DAP under Category, and go to Interface and select SWD. Note that JTAG is not supported by MiniProg4. Another option is to set up GDB server with Miniprog4 and AutoFlash utility and use it for debugging.

5.5. Is it possible to use GDB with Traveo II? If yes, how can I set it up?

Yes, you can connect the Traveo II device with Jlink  or MiniProg4 tool, and go to Auto Flash Utility, and issue the following command:

openocd -s ../scripts -f interface/jlink.cfg -f target/traveo2_1m_a0.cfg

Note that in above command, “traveo2_1m_a0.cfg” is for Traveo II 1M device. Replace it accordingly for other Traveo II devices.. Similarly replace jlink.cfg with kitprog3.cfg, if you are using Miniprog4 instead of jlink tool.]

This command will set up the GDB server and display the port number in the console (it is typically 3333). The IP is your localhost (127.0.0.1). This TCP/IP address can be provided to the GDB-based debugger tool, and thus can be used to debug the Traveo II device. Note that the GDB server should be kept up running else it will terminate the debug session.

5.6. I have installed the Cypress Sample Driver Library (SDL) and but I am unable to flash or debug the example project even after successful build. What could be the reason?

A possible reason could be that that the  proper flashloader (in IAR) or the .odb file (in GHS) for the target device is missing or not up to date. The SDL comes with patches for both IAR and GHS tool, which is located in  the ..\TVII_Sample_Driver_Library_x.x.x\misc\tools folder. See the readme.txt file in the corresponding folders (for IAR and GHS) and make sure that the patch is applied.

0 Likes
Version history
Revision #:
2 of 2
Last update:
‎Feb 28, 2021 08:07 PM
Updated by: