Using MemTool to flash TC38xx target

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

cross mob
AhmedSaber
Level 2
Level 2
First like received First solution authored 10 replies posted

Hello,

We are trying to flash the TC387 target using the Infineon Memtool.
Initially, the BMHD0 Start address was configured to 0xA0000000
We need to flash the target with a SW which starts at 0x80900000
When I choose the Memtool PF0 it shows the memory range starts from 0xA0000000 which is not compliant with the SW address range, and the tool throws an error that there is Incompatibility.

I changed the start address of the BMHD0 in the UCB to be 0x80900000, and I see via the debugger that it has been changed successfully, was expecting that the Memtool will show the PF0 starts with 0x80000000 or 0x80900000
but the Memtool still shows the PF0 Memory range starts with 0xA0000000

TC38 UCB content Modified.png

 


What steps did I miss?

0 Likes
1 Solution
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

UCBs haven nothing to do with mapping in the hex file. 

Inside of the hexfile you have many sections. On the left side you can see all this sections. All this sections must be available in the device and must be enabled for programming in Memtool. Check in Memtool on entry upper/right if e.g. DF_UCBs is enabled. If not and the hex file contains values for DF_UCBs then you get such a warning. Please make sure that your hexfile contains valid values for UCB otherwise you can brick the device if you programm the UCB. What should be written is completely dependent of your application. Otherwise you can configure/write the UCBs via Memtool->Device->UCBs

View solution in original post

0 Likes
7 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

You can't change the startadress of PF0. This is always 0xA0000000 (cachable)/0x80000000 (non-cachable). The startaddress in BMHD define at which address the software started and not the flash.

0 Likes
AhmedSaber
Level 2
Level 2
First like received First solution authored 10 replies posted

Hello,
Okay then, understood, Thanks
But how can we use the Memtool to flash a SW starting from 0x80900000
While the Memtool is displaying the PF0 starting from 0xA0000000 and gives errors due to this incompatibility 
Is there a way to let the Memtool accept to flash this SW starting from 0x80900000
Thanks

index.jpg

0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

There is no error from memtool. You get only a warning that no all sections in your file are added to the flash. This can be invalid (in the selected device not available) addresses are in the hex file or the hex files contains section which is not enabled in Memtool (e.g. UCB). Please handle UCB programming very carefully because you can brick the device very easy with invalid data for UCB.

0 Likes
AhmedSaber
Level 2
Level 2
First like received First solution authored 10 replies posted

Then, If I'm sure that the addresses in the hex file are correct.
and need to flash them, then what shall I flash in the UCBs to have a correct mapping with the hex file addresses?

0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

UCBs haven nothing to do with mapping in the hex file. 

Inside of the hexfile you have many sections. On the left side you can see all this sections. All this sections must be available in the device and must be enabled for programming in Memtool. Check in Memtool on entry upper/right if e.g. DF_UCBs is enabled. If not and the hex file contains values for DF_UCBs then you get such a warning. Please make sure that your hexfile contains valid values for UCB otherwise you can brick the device if you programm the UCB. What should be written is completely dependent of your application. Otherwise you can configure/write the UCBs via Memtool->Device->UCBs

0 Likes
AhmedSaber
Level 2
Level 2
First like received First solution authored 10 replies posted

Okay, Good.

Memtool always shows only the non-cached PFLASH (0xA0000000 - 0xA09FFFFF).
If in my application I'm gonna use the cached PFlash (0x80000000 - 0x80FFFFFF)
How can I enable this in Memtool?

0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored

Memtool know that 0xA and 0x8 is the flash and will translate 0x8 to 0xA automatically.

Please note the TC38x has only 10MB PFLASH (0xA0000000 - 0xA09FFFFF; 0x80000000 - 0x809FFFFF). If your application use addresses higher than 0x809FFFFF then the application can't be usable for TC38x. In such case you can get the same warning in memtool

0 Likes