Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
rajeshkumar
Level 2
Level 2
First like received 10 sign-ins 5 replies posted

Hi Infineon Team,

We are using Aurix TC397XX controller and using Aurix Development studio to compile the code (iLLD).  We got the elf file as output to program into TC397XX controller. We have Lauterbach debugger flash tool to program the elf file, same time we are refferring the Lauterbach demo scripts for the TC397XX contoller and planning to use the cmm scripts for programming.

I found below statement in the Lauterbach docuement:

Boot Mode Headers (BMHD):
Do not reboot or unpower your device in case all BMHD (Boot Mode
Headers) do not contain valid information. This is normally the case
after having erased the internal program flash or loading an object or
binary file without a valid BMHD.

My question is, the ELF which was built on Aurix development studio has the BMHD? Or Do i need to enable BMHD as part of compilation procedure on Aurix development studio?

Pls clarify.

Thanks,

Rajesh

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
rajeshkumar
Level 2
Level 2
First like received 10 sign-ins 5 replies posted

Thanks for your input.

I checked the HEX and ELF files of my ADS. There is no address (0xAF400000) mentioned in the file when i open in hex editor.

Ifx_Cfg_SswBmhd.c file has the below info, is this correct? Do i need to change the start address as 0xAF400000

const Ifx_Ssw_Bmhd bmhd_0_orig =
{
0x00FE, /* 0x000: .bmi: Boot Mode Index (BMI) */
0xB359, /* 0x002: .bmhdid: Boot Mode Header ID (CODE) = B359H */
0xA0000000, /* 0x004: .stad: User Code start address */
0x31795570, /* 0x008: .crc: Check Result for the BMI Header (offset 000H - 007H) */
0xCE86AA8F, /* 0x00C: .crcInv: Inverted Check Result for the BMI Header (offset 000H - 007H) */

..

The lauterbach scripts has the correct address (0xAF400000) for the BMHD programming.

Herewith i have attached my outflies as a zip for your reference.

One more question regarding the binary file type needs to programmed, Do I need to use ELF or HEX file for programming?

 

Thanks,

Rajesh

 

View solution in original post

4 Replies
ugo_8a
Employee
Employee
10 solutions authored 25 sign-ins 25 replies posted

Hello , 

if you created the project in ADS, then you will see a file called Ifx_Cfg_SswBmhd.c this file contains the BMHD structure and the memory map area where it will be allocated. when you successfully compile, you can check the hex file and verify you have the BMHDs (0xAF400000).

Most of the debuggers by default will not allow you to write into the UCB area (where the BMHD are located) so you have to explicitly enable that area for programming. In Lauterbach you can check the flash script and set the UCB address ranges as "TARGET" once you program the BMHD you should set that area back to "NOP" to avoid programming UCBs multiple times.

lock attach
Attachments are accessible only for community members.
rajeshkumar
Level 2
Level 2
First like received 10 sign-ins 5 replies posted

Thanks for your input.

I checked the HEX and ELF files of my ADS. There is no address (0xAF400000) mentioned in the file when i open in hex editor.

Ifx_Cfg_SswBmhd.c file has the below info, is this correct? Do i need to change the start address as 0xAF400000

const Ifx_Ssw_Bmhd bmhd_0_orig =
{
0x00FE, /* 0x000: .bmi: Boot Mode Index (BMI) */
0xB359, /* 0x002: .bmhdid: Boot Mode Header ID (CODE) = B359H */
0xA0000000, /* 0x004: .stad: User Code start address */
0x31795570, /* 0x008: .crc: Check Result for the BMI Header (offset 000H - 007H) */
0xCE86AA8F, /* 0x00C: .crcInv: Inverted Check Result for the BMI Header (offset 000H - 007H) */

..

The lauterbach scripts has the correct address (0xAF400000) for the BMHD programming.

Herewith i have attached my outflies as a zip for your reference.

One more question regarding the binary file type needs to programmed, Do I need to use ELF or HEX file for programming?

 

Thanks,

Rajesh

 

Hi, I checked the hex file you uploaded and it does have a BMHD, so you are ready to go just make sure you can write into that memory region in your debugger.

ugo_8a_1-1649251856507.png

 

I worked through similar problem so, I'll give you some information.

BMHD is Dflash area, Firstly you can write with ELF or HEX or whatever you built

for me, I tried to enable LBISTEN, so I change this code  in Ifx_Cfg_SswBmhd.c

 

const Fbl_Ifx_Ssw_Bmhd bmhd_0_orig=
{
  0x01FE,     /**< \brief 0x000: .bmi: Boot Mode Index (BMI)*/
  0xB359,     /**< \brief 0x002: .bmhdid: Boot Mode Header ID (CODE) = B359H*/
  0xA0000000,   /**< \brief 0x004: .stad: User Code start address*/
  0xFA2586D5,   /**< \brief 0x008: .crc: Check Result for the BMI Header (offset 000H - 007H)*/
  0x05DA792A,   /**< \brief 0x00C: .crcInv: Inverted Check Result for the BMI Header (offset 000H - 007H)*/
 
also linker script(lsl) should be modified properly to allocate memory for bmhd_0_orig
 
Plus, you can also write this field through your debugger, like Lauterbach Trace32.
 
it seems you using this debugger, you can refer to this document "app_tricore_flash.pdf" which is located in your T32 installed path.
 
have a good day